experimental 0.2.4 → 0.2.5

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: e6f19002ed06a98a4c9631cc51015526b03f9667
4
- data.tar.gz: 9c317be06e52f75e66958a7a1ddf57659cf542dc
3
+ metadata.gz: bfb5dca3b1f51e5d7c288e7d61c91bdf770b7f8b
4
+ data.tar.gz: ed36f94920862534016e94a3af96cb450abe69d3
5
5
  SHA512:
6
- metadata.gz: 23a6c14d60ff60c92a5f40e2db007e4ebf8b65b48867e28afd77611b66724f52f3d6c8fdc98f57ba87aaadbb3bdf35652754123d7df835e3f58c7b723fcd31e1
7
- data.tar.gz: 80792907f97d4d5d62a31ef7eb5ada47834c1af1f24a0098ae5bc8443b08b1c810647860092ad0b466f082c00bb91561b9c531b9060a32a7f149e7d82bbae0ff
6
+ metadata.gz: 8df805c7887851dfe3d08670355b6165b98ce5e6f4afd9d6a850cd61cc4ced9fe5ab5f0f72a12dee77031ad7e4d44eeb5d7a7746038b8ea6943a3c1a276b8c12
7
+ data.tar.gz: 56bd5327657737cb6400291aafefa48704d6d90c286aea3bdb18c306e4f941cae57c07941326bbd15f02ff38617576860dc3ed3ec5892b9dfa7fefed8ad85452
@@ -111,7 +111,7 @@ module Experimental
111
111
  end
112
112
 
113
113
  def bucket_number(subject)
114
- top_8 = Digest::SHA1.hexdigest("#{name}#{subject.id}")[0..7]
114
+ top_8 = Digest::SHA1.hexdigest("#{name}#{subject.experiment_seed_value}")[0..7]
115
115
  top_8.to_i(16) % num_buckets
116
116
  end
117
117
 
@@ -15,5 +15,9 @@ module Experimental
15
15
  def in_bucket?(name, bucket)
16
16
  in_experiment?(name) && experiment_bucket(name) == bucket
17
17
  end
18
+
19
+ def experiment_seed_value
20
+ id
21
+ end
18
22
  end
19
23
  end
@@ -1,5 +1,5 @@
1
1
  module Experimental
2
- VERSION = [0, 2, 4]
2
+ VERSION = [0, 2, 5]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: experimental
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - HowAboutWe.com
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-03-13 00:00:00.000000000 Z
14
+ date: 2014-03-27 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -103,9 +103,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.2.0
106
+ rubygems_version: 2.2.1
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Adds support for database-backed AB tests in Rails apps
110
110
  test_files: []
111
- has_rdoc: