feature_flagger 0.7.1 → 0.7.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 +4 -4
- data/README.md +4 -0
- data/lib/feature_flagger/model.rb +6 -3
- data/lib/feature_flagger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a86dad466ea3472db2912775bba5d1b7412b86d
|
4
|
+
data.tar.gz: fe6eefd07a2d78b1b52661ff06a15399c30881ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 176eaee71d771fbe687ae92e099f39f1fc268eef4cc8ff8c382692d6af4a027243472046f49efdf40727811f3b1c569cc70482efd558be9ff86a15c7c9bf49dc
|
7
|
+
data.tar.gz: 22593e2d0c21ed1b7712d6bb8c7dc38efafe9e3cad89b939674188271b96605eda29d2ac2625ac4dcfdb8a785664ed64db9a311aeab47f058f466391243d4c2f
|
data/README.md
CHANGED
@@ -75,6 +75,10 @@ account.unrelease(:email_marketing, :new_email_flow)
|
|
75
75
|
account.rollout?(:email_marketing, :new_email_flow)
|
76
76
|
FeatureFlagger::KeyNotFoundError: ["account", "email_marketing", "new_email_flo"]
|
77
77
|
|
78
|
+
# Check feature for a specific account id
|
79
|
+
Account.released_id?(42, :email_marketing, :new_email_flow)
|
80
|
+
#=> true
|
81
|
+
|
78
82
|
# Get an array with all released Account ids
|
79
83
|
Account.all_released_ids_for(:email_marketing, :new_email_flow)
|
80
84
|
|
@@ -13,9 +13,7 @@ module FeatureFlagger
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def rollout?(*feature_key)
|
16
|
-
|
17
|
-
feature = Feature.new(feature_key, resource_name)
|
18
|
-
FeatureFlagger.control.rollout?(feature.key, id)
|
16
|
+
self.class.released_id?(id, feature_key)
|
19
17
|
end
|
20
18
|
|
21
19
|
# <b>DEPRECATED:</b> Please use <tt>release</tt> instead.
|
@@ -43,6 +41,11 @@ module FeatureFlagger
|
|
43
41
|
end
|
44
42
|
|
45
43
|
module ClassMethods
|
44
|
+
def released_id?(resource_id, *feature_key)
|
45
|
+
feature = Feature.new(feature_key, rollout_resource_name)
|
46
|
+
FeatureFlagger.control.rollout?(feature.key, resource_id)
|
47
|
+
end
|
48
|
+
|
46
49
|
def all_released_ids_for(*feature_key)
|
47
50
|
feature_key.flatten!
|
48
51
|
feature = Feature.new(feature_key, rollout_resource_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: feature_flagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Sousa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|