arturo 2.2.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arturo/feature.rb +3 -5
- data/lib/arturo/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4624ac43327363d7ca57fe40f5af1bdc987db5cd
|
4
|
+
data.tar.gz: 540a689b5338d59e1635042c111c133f3fbab00e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61c88a69a0ede466a7b1d1fbe3448ac34c1576ba56f6080da83039e2564dfd61fccb52909ee80a1e5d56cfd90a3d255ea950075a4efda4fd7bc117a3a30e20ac
|
7
|
+
data.tar.gz: 13c037207a89491d695bc549963c8cb18f39b34602edeca9d980c58f3b275d075eb7ba9e022ca0a8d2cb82d16bbbb6247802b21be0fc5460f9ac06c451e5e3cd
|
data/lib/arturo/feature.rb
CHANGED
@@ -55,7 +55,7 @@ module Arturo
|
|
55
55
|
return false if feature_recipient.nil?
|
56
56
|
return false if blacklisted?(feature_recipient)
|
57
57
|
return true if whitelisted?(feature_recipient)
|
58
|
-
passes_threshold?(feature_recipient)
|
58
|
+
passes_threshold?(feature_recipient, deployment_percentage || 0)
|
59
59
|
end
|
60
60
|
|
61
61
|
def name
|
@@ -79,10 +79,8 @@ module Arturo
|
|
79
79
|
maximum(:updated_at)
|
80
80
|
end
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
def passes_threshold?(feature_recipient)
|
85
|
-
threshold = self.deployment_percentage || 0
|
82
|
+
# made public so as to allow for thresholds stored outside of the model
|
83
|
+
def passes_threshold?(feature_recipient, threshold)
|
86
84
|
return true if threshold == 100
|
87
85
|
return false if threshold == 0 || !feature_recipient.id
|
88
86
|
(((feature_recipient.id + (self.id || 1) + 17) * 13) % 100) < threshold
|
data/lib/arturo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arturo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -120,6 +120,20 @@ dependencies:
|
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: bump
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
130
|
+
type: :development
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
123
137
|
description: Deploy features incrementally to your users
|
124
138
|
email: james.a.rosen@gmail.com
|
125
139
|
executables: []
|