vanity 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7481c8ea284e72b569511d54af761ad1626fdfe9246dbb0750fdf56d5f04b2ba
4
- data.tar.gz: 8ebab61bbb360d445e30d555114a006608693499878cf9655b6765b0148959da
3
+ metadata.gz: 0456d4b28fe4ce9c097421b2b808846d4347b1f09221224b971d887ac426d118
4
+ data.tar.gz: 8b1af8dbe98eee9d186940c402228d7ba80463b3c6f141c8bee6efa0901c1b3b
5
5
  SHA512:
6
- metadata.gz: 930f5cd9d45efdbd8bb9463cfe40914d3e6f87a57cd481d1accc5c7bd328aaf2d52e18a132665dc5100deda3f80662bcc96d94ffab76499c05a1c7b5a14aaf68
7
- data.tar.gz: 0aa058369c4f8218be1837d24bbc9c68e5f27110e9829a97aab1e8183d5748e0f614be9901de4f9fd8b266dceb0342efbe57baef9b320cd17c69db1574575dfc
6
+ metadata.gz: 1f5a94133798c016357e41cc3c57edafc4b74402b54803531074c10ee7595d8218cbb02d34adf911c32e82265d3ee3215201bd8fb6a880e7b51d85784e080330
7
+ data.tar.gz: 59e988be523633654f628e212f5953d1a92d140f9e2e2dc1ecfe827b48475814f6690f0f399e6511396ca7c81e4d206fb392698778ff3674907cacdd2bb4b5d7
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 3.0.2 (2022-01-27)
2
+
3
+ * Fix AbTest#alternative_for to always prefer persisted participants (@tgrathwell)
4
+
1
5
  == 3.0.1 (2022-01-26)
2
6
 
3
7
  * Update template rendering and update_attributes for Rails 6.1 compatibility (@bensheldon)
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vanity (3.0.1)
4
+ vanity (3.0.2)
5
5
  i18n
6
6
 
7
7
  GEM
@@ -43,7 +43,7 @@ GEM
43
43
  activesupport (>= 2.2.0)
44
44
  crack (>= 0.1.6)
45
45
  hitimes (1.2.2)
46
- i18n (1.9.0)
46
+ i18n (1.9.1)
47
47
  concurrent-ruby (~> 1.0)
48
48
  integration (0.1.0)
49
49
  jdbc-sqlite3 (3.8.7)
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: ..
9
9
  specs:
10
- vanity (3.0.1)
10
+ vanity (3.0.2)
11
11
  i18n
12
12
 
13
13
  GEM
@@ -601,9 +601,10 @@ module Vanity
601
601
  # identity, and randomly distributed alternatives for each identity (in the
602
602
  # same experiment).
603
603
  def alternative_for(identity)
604
+ existing_assignment = connection.ab_assigned @id, identity
605
+ return existing_assignment if existing_assignment
606
+
604
607
  if @use_probabilities
605
- existing_assignment = connection.ab_assigned @id, identity
606
- return existing_assignment if existing_assignment
607
608
  random_outcome = rand()
608
609
  @use_probabilities.each do |alternative, max_prob|
609
610
  return alternative.id if random_outcome < max_prob
@@ -1,5 +1,5 @@
1
1
  module Vanity
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.2"
3
3
 
4
4
  module Version
5
5
  version = VERSION.to_s.split(".").map { |i| i.to_i }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vanity
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Assaf Arkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-27 00:00:00.000000000 Z
11
+ date: 2022-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -295,7 +295,7 @@ metadata: {}
295
295
  post_install_message: To get started run vanity --help
296
296
  rdoc_options:
297
297
  - "--title"
298
- - Vanity 3.0.1
298
+ - Vanity 3.0.2
299
299
  - "--main"
300
300
  - README.md
301
301
  - "--webcvs"
@@ -313,8 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  - !ruby/object:Gem::Version
314
314
  version: '0'
315
315
  requirements: []
316
- rubyforge_project:
317
- rubygems_version: 2.7.6.3
316
+ rubygems_version: 3.3.6
318
317
  signing_key:
319
318
  specification_version: 4
320
319
  summary: Experience Driven Development framework for Ruby