feature_flagger 2.3.1 → 2.4.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba0fc912265faa3ff3efd8e80c11e5b88e9f31e639cedf622c1b12555ffb255f
|
4
|
+
data.tar.gz: 4eb395b1a8a3db3202753e0d82d08f9cca6152c5e3407818c21f11df40fdad55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c408e257049b29129eb70335b92840cd1fc014b6e465fc295be23c885fa2cde8631ef847cad433becdaabd261901e8fd6f2abccab3d47ae7be769374f7e338a
|
7
|
+
data.tar.gz: 36ab49913a82bb84097fcc2ecd70e651be7a2ab8a85211f5999f94ca0ac46042888fc0642098947adc1fbb1f32ae7cd656a566ee29c64c0ed39b146cf0f0ecf6
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
[](https://dl.circleci.com/status-badge/redirect/gh/ResultadosDigitais/feature_flagger/tree/main)
|
2
|
+
[](https://codeclimate.com/github/ResultadosDigitais/feature_flagger)
|
3
|
+
[](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)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
1
3
|
module FeatureFlagger
|
2
4
|
module ManifestSources
|
3
5
|
class WithYamlFile
|
@@ -7,7 +9,7 @@ module FeatureFlagger
|
|
7
9
|
end
|
8
10
|
|
9
11
|
def resolved_info
|
10
|
-
@resolved_info ||= ::YAML.load_file(@yaml_path) if @yaml_path
|
12
|
+
@resolved_info ||= ::YAML.load_file(@yaml_path, permitted_classes: [Date]) if @yaml_path
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -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.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:
|
12
|
+
date: 2025-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
- !ruby/object:Gem::Version
|
171
171
|
version: 2.0.0
|
172
172
|
requirements: []
|
173
|
-
rubygems_version: 3.4.
|
173
|
+
rubygems_version: 3.4.10
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Partial release your features.
|