8000 feat(Decide): Add Decide API by oakbani · Pull Request #274 · optimizely/ruby-sdk · GitHub
[go: up one dir, main page]

Skip to content

feat(Decide): Add Decide API #274

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

Merged
merged 49 commits into from
Dec 14, 2020
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4f8765b
feat(Decide): Add Optimizely User Context
oakbani Oct 21, 2020
a7b78d8
line at EOF
oakbani Oct 21, 2020
c5f138c
Merge branch 'master' into oakbani/decide/user-context
oakbani Oct 22, 2020
c8d3a35
feat(Decide): Add Decide API
oakbani Oct 23, 2020
f770ce7
fix
oakbani Oct 23, 2020
244c4f3
nil by []
oakbani Oct 23, 2020
1bd6df7
fix enabled
oakbani Oct 23, 2020
ddd5349
add to_json in entities
oakbani Oct 27, 2020
98ced8c
Made it work with
zashraf1985 Oct 30, 2020
e7366f4
fixed decide_all api
zashraf1985 Oct 30, 2020
03a397f
fixed decide_for_keys
zashraf1985 Nov 2, 2020
3e9e417
fixed some failing unit tests
zashraf1985 Nov 2, 2020
ab824c7
added some test cases
zashraf1985 Nov 3, 2020
507dac6
added decide temporary tags
zashraf1985 Nov 4, 2020
13833de
added pending to forcefully fail unfinished tests
zashraf1985 Nov 4, 2020
b981f64
added some unit tests for decide
zashraf1985 Nov 4, 2020
d102a14
added unit tests for decide api
zashraf1985 Nov 5, 2020
7fb2ddf
added tests for ignoring user profile service option
zashraf1985 Nov 6, 2020
16a509d
added few more tests and some cleanup
zashraf1985 Nov 6, 2020
f6437b7
added a null check before cloning attributes
zashraf1985 Nov 6, 2020
8000
ac90cd0
simplified the null check
zashraf1985 Nov 6, 2020
4026855
changed array append to push to support old ruby versions
zashraf1985 Nov 6, 2020
d6be7c2
added support for ENABLED_FLAGS_ONLY decide option
zashraf1985 Nov 12, 2020
752114d
Added unit tests for decide_for_keys and decide_all
zashraf1985 Nov 13, 2020
ee32ee1
added flag decisions support in decide api
zashraf1985 Nov 13, 2020
57ac8a0
added getters to OptimizelyDecision
zashraf1985 Nov 13, 2020
a300b3e
Merge branch 'master' into oakbani/decide-internal
zashraf1985 Nov 17, 2020
0070d3b
added unit tests for flag decisionss support in decide API
zashraf1985 Nov 17, 2020
6727d30
added sdk ready check to all apis
zashraf1985 Nov 17, 2020
d9a5549
added a check to include reasons
zashraf1985 Nov 18, 2020
cd1648e
added decide reasons
zashraf1985 Nov 18, 2020
8ec1619
fixed a minor issue with decide reasons
zashraf1985 Nov 19, 2020
a041cb6
Merge branch 'master' into oakbani/decide-internal
zashraf1985 Nov 24, 2020
7d122a4
removed some logs from decide reasons
zashraf1985 Nov 24, 2020
c40237f
additional null check for optimizely object
zashraf1985 Nov 24, 2020
7f6d985
fixed failing FSC test for some events
zashraf1985 Nov 24, 2020
b793012
merged the send impression calls under one check
zashraf1985 Nov 25, 2020
0a38bdd
fixed failing FSC test
zashraf1985 Nov 25, 2020
c401588
modified some tests
zashraf1985 Nov 25, 2020
cffa963
added event payload tests
zashraf1985 Nov 26, 2020
43b14ee
Added tests for include_reasons
zashraf1985 Nov 26, 2020
245637e
fixed a test title
zashraf1985 Nov 26, 2020
b76af55
added unit tests for default_decide_options
zashraf1985 Nov 30, 2020
5057b3f
added sdk not ready tests for decide_all and decide_for_keys
zashraf1985 Nov 30, 2020
92afe26
incorporated some review changes
zashraf1985 Dec 7, 2020
1ef9539
added a synchronize block when setting attributes
zashraf1985 Dec 7, 2020
89c3d6b
Added doc comments
zashraf1985 Dec 8, 2020
315d4aa
lint fixes
zashraf1985 Dec 9, 2020
f58d8bd
clone and sync user attributes and context
zashraf1985 Dec 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed decide_for_keys
  • Loading branch information
zashraf1985 committed Nov 2, 2020
commit 03a397f3177762cfd3e7860ed938f90898d42ebd
4 changes: 2 additions & 2 deletions lib/optimizely/optimizely_user_context.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def decide(key, options = nil)
end

def decide_for_keys(keys, options = nil)
decisions = []
decisions = {}
keys.each do |key|
decisions = decisions.push(@optimizely_client.decide(self, key, options))
decisions[key] = @optimizely_client.decide(self, key, options)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check "ENABLED_FLAGS_ONLY" here too. Probably we can consider decide_all depends on decide_for_keys.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

end
decisions
end
Expand Down
0