easy_ab 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7997789a1d8a6b891bd1a41b5c048eaac8b84de0
4
- data.tar.gz: b807d1b355561d6855840e53fb5db407edba3028
3
+ metadata.gz: f87ddfb6f4894ca1611d3efeb0b38f636fba532b
4
+ data.tar.gz: 2288f1d27981f4cbfd4460b835e65ef8ad8dac83
5
5
  SHA512:
6
- metadata.gz: 5c1c971d134cb5ab3281a0a715276a906c5850bc2292f536e5032cdbd1ad97310b6053a32ff5c121854fd40af0d4fdb244af4c8afe8342931ef40e468214b7b5
7
- data.tar.gz: 2294fb66394dd857ef0938ccd09dc9a141d4c9e66905aa58ebc73e85a3a8bd1d2a8515104865207c50af4f4a8a58d37c59255f221f81e7f1d0af1187303eda60
6
+ metadata.gz: d9e1e94284427577422d86493157dbd97e63377903add57b5e8c17b76f3da46e684db408ce86c25ffa7910b735589b6423d2182161cf7b698cbc56a91b301f3d
7
+ data.tar.gz: cbea37f3b2c844b0d50b02aa24b722af9659530d8402f5fad249413fdf86d78457832fbc31b0575fea648d10dd377ca180dbe976431a899f6c254ceb117c3257
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.6.2 (2017-09-01)
2
+ - [BF] Calling ab_test multiple times with different experiment name in one request may cause unwanted result if the definitions of experiments contain scope or rules.
3
+
4
+ ## 0.6.1 (2017-08-31)
5
+ - Include EasyAb::RSpec with mailer type. Now you can use `#assign_variant!` in mailer spec
6
+
1
7
  ## 0.6.0 (2017-08-25)
2
8
  - Add new API (`assign_variant!`)
3
9
  - Rename spec helper #assign_variant to #assign_variant! and return instance of EasyAb::Grouping instead of true/false
@@ -17,14 +17,16 @@ module EasyAb
17
17
 
18
18
  # Obtain context for rules
19
19
  if experiment.rules.present?
20
- @rules_with_current_context ||= experiment.rules.map { |rule| Proc.new { instance_exec(&rule)} }
21
- options[:contexted_rules] = @rules_with_current_context
20
+ @rules_with_current_context ||= {}
21
+ @rules_with_current_context[experiment_name] ||= experiment.rules.map { |rule| Proc.new { instance_exec(&rule)} }
22
+ options[:contexted_rules] = @rules_with_current_context[experiment_name]
22
23
  end
23
24
 
24
25
  # Obtain context for scope
25
26
  if experiment.scope.present?
26
- @scope ||= Proc.new { instance_exec(&experiment.scope) }
27
- options[:scope] = @scope
27
+ @scope ||= {}
28
+ @scope[experiment_name] ||= Proc.new { instance_exec(&experiment.scope) }
29
+ options[:scope] = @scope[experiment_name]
28
30
  end
29
31
 
30
32
  @variant_cache ||= {}
@@ -1,3 +1,3 @@
1
1
  module EasyAb
2
- VERSION = '0.6.1'
2
+ VERSION = '0.6.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Chu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-31 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core