-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make rules engine code public #612
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-v3.1.2 #612 +/- ##
==============================================
- Coverage 85.32% 85.27% -0.05%
==============================================
Files 102 104 +2
Lines 4571 4570 -1
==============================================
- Hits 3900 3897 -3
- Misses 671 673 +2 |
|
||
/// A rules engine for Launch rules | ||
class LaunchRulesEngine { | ||
private let LOG_TAG = "\(RulesConstants.LOG_MODULE_PREFIX) - LaunchRulesEngine" | ||
public class LaunchRulesEngine { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to find a better name for LaunchRulesEngine
public struct RuleConsequence { | ||
let id: String | ||
let type: String | ||
var detailDict: [String: Any?] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change this var name to details
?
@@ -0,0 +1,24 @@ | |||
/* | |||
Copyright 2020 Adobe. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2021
|
||
init(name: String, extensionRuntime: ExtensionRuntime) { | ||
public init(name: String, extensionRuntime: ExtensionRuntime) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to get some in-code documentation here, especially for public apis
} | ||
|
||
guard let rules = JSONRulesParser.parse(data) else { | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to combine guard
s and print log.
Description
public func replaceRules(with rules: [LaunchRule])
public func process(event: Event) -> Event
func replaceRules(from urlString: String)
func replaceRulesWithCache(from urlString: String)
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: