Skip to content

Commit

Permalink
Merge pull request adobe#20 from adobe/dev
Browse files Browse the repository at this point in the history
dev > main
  • Loading branch information
shalehaha authored Sep 24, 2020
2 parents 412222f + 23bb167 commit b8a7681
Show file tree
Hide file tree
Showing 31 changed files with 17 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ playground.xcworkspace
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm
.swiftpm

.build/

Expand Down
7 changes: 0 additions & 7 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

This file was deleted.

153 changes: 0 additions & 153 deletions .swiftpm/xcode/xcshareddata/xcschemes/RulesEngine-Package.xcscheme

This file was deleted.

77 changes: 0 additions & 77 deletions .swiftpm/xcode/xcshareddata/xcschemes/RulesEngine.xcscheme

This file was deleted.

6 changes: 3 additions & 3 deletions SwiftRulesEngine.podspec → AEPRulesEngine.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "SwiftRulesEngine"
s.name = "AEPRulesEngine"
s.version = "0.0.1"
s.summary = "SwiftRulesEngine"
s.summary = "AEPRulesEngine"
s.description = <<-DESC
A simple, generic, extensible Rules Engine in Swift
DESC
Expand All @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '10.0'

s.swift_version = '5.0'
s.source_files = 'Sources/SwiftRulesEngine/**/*.swift'
s.source_files = 'Sources/AEPRulesEngine/**/*.swift'


end
32 changes: 6 additions & 26 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,19 @@
import PackageDescription

let package = Package(
name: "SwiftRulesEngine",
name: "AEPRulesEngine",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SwiftRulesEngine",
targets: ["SwiftRulesEngine"]
)
//
// .library(
// name: "RulesDSL",
// targets: ["RulesDSL"])
.library(name: "AEPRulesEngine", targets: ["AEPRulesEngine"]),
.library(name: "AEPRulesEngineDynamic", type: .dynamic, targets: ["AEPRulesEngine"]),
.library(name: "AEPRulesEngineStatic", type: .static, targets: ["AEPRulesEngine"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
// .package(url: "https://github.com/Realm/SwiftLint", from: "0.28.1")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftRulesEngine",
dependencies: []
),
.testTarget(
name: "SwiftRulesEngineTests",
dependencies: ["SwiftRulesEngine"]
),
// .target(
// name: "RulesDSL",
// dependencies: []),
// .testTarget(
// name: "RulesDSLTests",
// dependencies: ["RulesEngine", "RulesDSL"])
.target(name: "AEPRulesEngine", dependencies: []),
.testTarget(name: "AEPRulesEngineTests", dependencies: ["AEPRulesEngine"]),
]
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rules Engine
# AEPRulesEngine

## Overview

Expand Down Expand Up @@ -37,7 +37,7 @@ let condition = ComparisonExpression(lhs: "abc", operationName: "equals", rhs: "
let rule = ConsequenceRule(id: "sample-rule", condition: condition)
rulesEngine.addRules(rules: [rule])
```
However, a rule like this doesn't make much sense, without the ability to dynamically fetch a value it will always be true or false.
However, a rule like this doesn't make much sense, without the ability to dynamically fetch a value it will always be true or false.

```
let mustache = Operand<String>(mustache: "{{company}}")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Foundation
import XCTest

@testable import SwiftRulesEngine
@testable import AEPRulesEngine
struct CustomOperand: Traversable {
func get(key:String) -> Any? {
return key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Foundation
import XCTest

@testable import SwiftRulesEngine
@testable import AEPRulesEngine

class ParserTests: XCTestCase {
override func setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Foundation
import XCTest

@testable import SwiftRulesEngine
@testable import AEPRulesEngine

class RulesEngineDebugTests: XCTestCase {
override func setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import Foundation
import XCTest

@testable import SwiftRulesEngine
@testable import AEPRulesEngine

class RulesEngineTests: XCTestCase {
override func setUp() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import Foundation

@testable import SwiftRulesEngine
@testable import AEPRulesEngine
import XCTest

extension Array: Traversable {
Expand Down

0 comments on commit b8a7681

Please sign in to comment.