arturo 2.2.2 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0370ea2ce790571bcba6951daebc8a7687365f13
4
- data.tar.gz: e34a2809fd0a7f0eed077ec3ed609f538183bb43
3
+ metadata.gz: 4624ac43327363d7ca57fe40f5af1bdc987db5cd
4
+ data.tar.gz: 540a689b5338d59e1635042c111c133f3fbab00e
5
5
  SHA512:
6
- metadata.gz: 0f5e79b9e464e897bdbe0212cc51960daee1465856a6ba45bfd5822c0884a2f95d6bd7e7f5354d1476ba012bb95ad972ab8163ee5122e4c298ba3c03fe737280
7
- data.tar.gz: 9f3107915ca5285a7464bfcd5309dd6ba3c35b575c9a39f33d63a9a5aea8469018a81484dde7154558c074383d5f511b6da07bf027828aca032bce48e3c12dbe
6
+ metadata.gz: 61c88a69a0ede466a7b1d1fbe3448ac34c1576ba56f6080da83039e2564dfd61fccb52909ee80a1e5d56cfd90a3d255ea950075a4efda4fd7bc117a3a30e20ac
7
+ data.tar.gz: 13c037207a89491d695bc549963c8cb18f39b34602edeca9d980c58f3b275d075eb7ba9e022ca0a8d2cb82d16bbbb6247802b21be0fc5460f9ac06c451e5e3cd
@@ -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
- protected
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Arturo
3
- VERSION = '2.2.2'
3
+ VERSION = '2.3.0'
4
4
  end
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.2.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-07-28 00:00:00.000000000 Z
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: []