optimizely_server_side 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Readme.md +8 -4
- data/lib/optimizely_server_side/experiment.rb +1 -1
- data/optimizely_server_side.gemspec +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395cfc72480c54d7496ff48ce7f682705d88d4ac
|
4
|
+
data.tar.gz: d987a1ef921031138855b6b5eb27e67bb906a705
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a73a00dad7f421378571df87d7e153878092c7eac2c8564f1ff8ad8fe7fbde23abfc7f5b2a7d6858e9d4fd7fd6b57106bd4a2ed56e6be951dddf9419e99791b
|
7
|
+
data.tar.gz: 37d648f8125bdab609eb42ca5b0b45025a91e3ed7ba541647c276d84fecc396a9ed794cc959ca1958e1f01883dbe82619c9fe9c3543dfa4231ca840d29c5e6ec
|
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -89,13 +89,15 @@ class ApplicationController < ActionController::Base
|
|
89
89
|
```ruby
|
90
90
|
# in any app/view/foo.html.erb
|
91
91
|
<% experiment(EXPERIMENT_KEY) do |config| %>
|
92
|
+
|
92
93
|
<% config.variation_one(VARIATION_ONE_KEY) do %>
|
93
|
-
<%= render partial: 'variation_one_experience'
|
94
|
+
<%= render partial: 'variation_one_experience' %>
|
94
95
|
<% end %>
|
95
96
|
|
96
97
|
<% config.variation_default(VARIATION_DEFAULT_KEY, primary: true) do %>
|
97
|
-
<%= render partial: 'variation_default_experience'
|
98
|
+
<%= render partial: 'variation_default_experience' %>
|
98
99
|
<% end %>
|
100
|
+
|
99
101
|
<% end %>
|
100
102
|
```
|
101
103
|
|
@@ -133,13 +135,15 @@ You can call you own method names with `variation_` . Below i have `config.varia
|
|
133
135
|
```ruby
|
134
136
|
# in any app/view/foo.html.erb
|
135
137
|
<% experiment(EXPERIMENT_KEY) do |config| %>
|
138
|
+
|
136
139
|
<% config.variation_best_experience(VARIATION_ONE_KEY) do %>
|
137
|
-
<%= render partial: 'variation_one_experience'
|
140
|
+
<%= render partial: 'variation_one_experience' %>
|
138
141
|
<% end %>
|
139
142
|
|
140
143
|
<% config.variation_pathetic_experience(VARIATION_DEFAULT_KEY, primary: true) do %>
|
141
|
-
<%= render partial: 'variation_default_experience'
|
144
|
+
<%= render partial: 'variation_default_experience' %>
|
142
145
|
<% end %>
|
146
|
+
|
143
147
|
<% end %>
|
144
148
|
|
145
149
|
```
|
@@ -37,7 +37,7 @@ module OptimizelyServerSide
|
|
37
37
|
# In case of running test the applicable variation key is present
|
38
38
|
# In case of fallback / paused test we pick the primary variation
|
39
39
|
def applicable_variation
|
40
|
-
ActiveSupport::Notifications.instrument "oss.variation", variation: @
|
40
|
+
ActiveSupport::Notifications.instrument "oss.variation", variation: @selected_variation_key do
|
41
41
|
if @variations.any?(&variation_selector)
|
42
42
|
@variations.find(&variation_selector).call
|
43
43
|
else
|
@@ -2,8 +2,8 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'optimizely_server_side'
|
5
|
-
s.version = '0.0.
|
6
|
-
s.date = '2016-08-
|
5
|
+
s.version = '0.0.8'
|
6
|
+
s.date = '2016-08-16'
|
7
7
|
s.summary = "Optimizely server side. A wrapper on top of optimizely's ruby sdk for easy caching of server side config "
|
8
8
|
s.description = "Optimizely server side. A A/B test wrapper on top of optimizely's ruby sdk for easy caching of server side config and exposing few more utility helpers. Handling of fallbacks and marking primary experiments. "
|
9
9
|
s.authors = ["Ankit Gupta"]
|
@@ -20,3 +20,5 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.add_runtime_dependency 'optimizely-sdk' , '~> 0.1.1'
|
21
21
|
s.add_runtime_dependency 'activesupport', '~> 4.2', '>= 4.2.6'
|
22
22
|
end
|
23
|
+
|
24
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optimizely_server_side
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ankit Gupta
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|