rollout 0.1.1 → 0.2.0

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.
Files changed (5) hide show
  1. data/README.rdoc +3 -3
  2. data/VERSION +1 -1
  3. data/lib/rollout.rb +1 -1
  4. data/rollout.gemspec +2 -2
  5. metadata +5 -5
data/README.rdoc CHANGED
@@ -57,9 +57,9 @@ If you're rolling out a new feature, you might want to test the waters by slowly
57
57
 
58
58
  The algorithm for determining which users get let in is this:
59
59
 
60
- user.id % (100 / percentage) == 0
60
+ user.id % 10 < percentage / 10
61
61
 
62
- So, for 20%, it's every 5th user.
62
+ So, for 20%, users 0, 1, 10, 11, 20, 21, etc would be allowed in. Those users would remain in as the percentage increases.
63
63
 
64
64
  Deactivate all percentages like this:
65
65
 
@@ -71,7 +71,7 @@ Deactivate everybody at once:
71
71
 
72
72
  $rollout.deactivate_all
73
73
 
74
- For some of our less stable features, we are actually measuring the error rate using redis, and deactivating them automatically when it raises above a certain threshold. It's pretty cool.
74
+ For some of our less stable features, we are actually measuring the error rate using redis, and deactivating them automatically when it raises above a certain threshold. It's pretty cool. See http://github.com/jamesgolick/degrade for the failure detection code.
75
75
 
76
76
  == Note on Patches/Pull Requests
77
77
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
data/lib/rollout.rb CHANGED
@@ -73,6 +73,6 @@ class Rollout
73
73
  percentage = @redis.get(percentage_key(feature))
74
74
  return false if percentage.nil?
75
75
 
76
- user.id % (100 / percentage.to_i) == 0
76
+ user.id % 10 < percentage.to_i / 10
77
77
  end
78
78
  end
data/rollout.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rollout}
8
- s.version = "0.1.1"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Golick"]
12
- s.date = %q{2010-07-17}
12
+ s.date = %q{2010-07-18}
13
13
  s.description = %q{Conditionally roll out features with redis.}
14
14
  s.email = %q{jamesgoick@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Golick
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-17 00:00:00 -07:00
18
+ date: 2010-07-18 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency