feature_flagger 2.3.1 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -3
- data/lib/feature_flagger/control.rb +4 -0
- data/lib/feature_flagger/model.rb +5 -0
- data/lib/feature_flagger/storage/redis.rb +4 -0
- data/lib/feature_flagger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c5ec07e9555f2fd0ee0dbbe4bae6c128c35359efecaff3c1b6dcdd0fe2def25
|
4
|
+
data.tar.gz: 30e4dca71f43d7909aab25593b4fa033b8dfaeaf31d65c29dd25b082fe5b838d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a428802d9a3c81bc1989703e3b6049a15722fc3fd7e5f76dfeace95838a07e7ecd2cc1dbe622b062f0e72997572b189bde874e19b2c6b3f116a77f68b463c825
|
7
|
+
data.tar.gz: 3fb854addf8eba4f716d7e55b1ccb005d5afaa828959cebcb34ac68f75161ec73c1cb1c6e37530235026c5756b9d05208a2e524c0e429323ab7966cf1081b480
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
[![
|
1
|
+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ResultadosDigitais/feature_flagger/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ResultadosDigitais/feature_flagger/tree/main)
|
2
|
+
[![Code Climate](https://codeclimate.com/github/ResultadosDigitais/feature_flagger/badges/gpa.svg)](https://codeclimate.com/github/ResultadosDigitais/feature_flagger)
|
3
|
+
[![Issue Count](https://codeclimate.com/github/ResultadosDigitais/feature_flagger/badges/issue_count.svg)](https://codeclimate.com/github/ResultadosDigitais/feature_flagger)
|
4
|
+
|
2
5
|
|
3
6
|
# FeatureFlagger
|
4
7
|
|
@@ -115,7 +118,7 @@ account.unrelease(:email_marketing, :new_email_flow)
|
|
115
118
|
|
116
119
|
# If you try to check an inexistent rollout key it will raise an error.
|
117
120
|
account.released?(:email_marketing, :new_email_flow)
|
118
|
-
FeatureFlagger::KeyNotFoundError: ["account", "email_marketing", "new_email_flo"]
|
121
|
+
#=> FeatureFlagger::KeyNotFoundError: ["account", "email_marketing", "new_email_flo"]
|
119
122
|
|
120
123
|
# Check feature for a specific account id
|
121
124
|
Account.released_id?(42, :email_marketing, :new_email_flow)
|
@@ -141,9 +144,12 @@ Account.unrelease_to_all(:email_marketing, :new_email_flow)
|
|
141
144
|
# Return an array with all features released for all
|
142
145
|
Account.released_features_to_all
|
143
146
|
|
147
|
+
# Get the count of resource ids released
|
148
|
+
Account.release_count(:email_marketing, :new_email_flow)
|
149
|
+
#=> 30
|
150
|
+
|
144
151
|
# In order to bypass the cache if cache_store is configured
|
145
152
|
Account.released_features_to_all(skip_cache: true)
|
146
|
-
|
147
153
|
```
|
148
154
|
|
149
155
|
## Clean up action
|
@@ -67,6 +67,10 @@ module FeatureFlagger
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
+
def release_count(feature_key)
|
71
|
+
@storage.count(feature_key)
|
72
|
+
end
|
73
|
+
|
70
74
|
# DEPRECATED: this method will be removed from public api on v2.0 version.
|
71
75
|
# use instead the feature_keys method.
|
72
76
|
def search_keys(query)
|
@@ -53,6 +53,11 @@ module FeatureFlagger
|
|
53
53
|
FeatureFlagger.control.release(feature.key, resource_id)
|
54
54
|
end
|
55
55
|
|
56
|
+
def release_count(*feature_key)
|
57
|
+
feature = Feature.new(feature_key, feature_flagger_model_settings.entity_name)
|
58
|
+
FeatureFlagger.control.release_count(feature.key)
|
59
|
+
end
|
60
|
+
|
56
61
|
def unrelease_id(resource_id, *feature_key)
|
57
62
|
feature = Feature.new(feature_key, feature_flagger_model_settings.entity_name)
|
58
63
|
FeatureFlagger.control.unrelease(feature.key, resource_id)
|
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: 2.
|
4
|
+
version: 2.4.1
|
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: 2024-06-
|
12
|
+
date: 2024-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|