split 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/split/engine.rb +4 -4
- data/lib/split/experiment.rb +2 -2
- data/lib/split/version.rb +1 -1
- data/spec/experiment_spec.rb +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51ebd6a368635471d5c3f820488065669ac7dc1ad7ed7eba61f2c4154ca42b7
|
4
|
+
data.tar.gz: 7fabe9a63a07037b144b91a11c89675d48a6ec9a5883e47bf8193584c461d003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c32cc9c769184b79716956046604e8f63de0fba0a87036f6cf2809803e74c376887db47e3a472d9b5acfb5172eb5d0bcea1c700bf74f799a5d259e0cf3dd49
|
7
|
+
data.tar.gz: b930240fd33d85f594fef51f756100f925581fc1ead0dd910a1a51417362c68ab03aea6adbb1b50076db78114a1bc842fd2cd2d4a9462b9d50aa43c25b166df8
|
data/lib/split/engine.rb
CHANGED
@@ -4,10 +4,10 @@ module Split
|
|
4
4
|
initializer "split" do |app|
|
5
5
|
if Split.configuration.include_rails_helper
|
6
6
|
ActiveSupport.on_load(:action_controller) do
|
7
|
-
include Split::Helper
|
8
|
-
helper Split::Helper
|
9
|
-
include Split::CombinedExperimentsHelper
|
10
|
-
helper Split::CombinedExperimentsHelper
|
7
|
+
::ActionController::Base.send :include, Split::Helper
|
8
|
+
::ActionController::Base.helper Split::Helper
|
9
|
+
::ActionController::Base.send :include, Split::CombinedExperimentsHelper
|
10
|
+
::ActionController::Base.helper Split::CombinedExperimentsHelper
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/lib/split/experiment.rb
CHANGED
@@ -25,7 +25,7 @@ module Split
|
|
25
25
|
alternatives: load_alternatives_from_configuration,
|
26
26
|
goals: Split::GoalsCollection.new(@name).load_from_configuration,
|
27
27
|
metadata: load_metadata_from_configuration,
|
28
|
-
resettable: exp_config
|
28
|
+
resettable: exp_config[:resettable],
|
29
29
|
algorithm: exp_config[:algorithm]
|
30
30
|
}
|
31
31
|
else
|
@@ -62,7 +62,7 @@ module Split
|
|
62
62
|
alts = load_alternatives_from_configuration
|
63
63
|
options[:goals] = Split::GoalsCollection.new(@name).load_from_configuration
|
64
64
|
options[:metadata] = load_metadata_from_configuration
|
65
|
-
options[:resettable] = exp_config
|
65
|
+
options[:resettable] = exp_config[:resettable]
|
66
66
|
options[:algorithm] = exp_config[:algorithm]
|
67
67
|
end
|
68
68
|
end
|
data/lib/split/version.rb
CHANGED
data/spec/experiment_spec.rb
CHANGED
@@ -35,12 +35,6 @@ describe Split::Experiment do
|
|
35
35
|
expect(experiment.resettable).to be_truthy
|
36
36
|
end
|
37
37
|
|
38
|
-
it "should be resettable when loading from configuration" do
|
39
|
-
allow(Split.configuration).to receive(:experiment_for).with('some_experiment') { { alternatives: %w(a b) } }
|
40
|
-
|
41
|
-
expect(Split::Experiment.new('some_experiment')).to be_resettable
|
42
|
-
end
|
43
|
-
|
44
38
|
it "should save to redis" do
|
45
39
|
experiment.save
|
46
40
|
expect(Split.redis.exists('basket_text')).to be true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: split
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|