featury 1.0.0.rc14 → 1.0.0.rc15
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 +13 -1
- data/lib/featury/actions/service/factory.rb +1 -1
- data/lib/featury/base.rb +1 -0
- data/lib/featury/callbacks/workspace.rb +2 -2
- data/lib/featury/features/collection.rb +2 -2
- data/lib/featury/features/feature.rb +4 -2
- data/lib/featury/info/dsl.rb +25 -0
- data/lib/featury/info/result.rb +15 -0
- data/lib/featury/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbbace100047ab60a1b441ad2812b3fcbaeaa71c98d4e9a2e6d8a822c5591968
|
4
|
+
data.tar.gz: 3d4374fd97c7e11e64772694dadea54fd6cbc7e5e919521e09da2595cef40eb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b59e1f386a652e903301b9cd1a180bf17ed0086aa676eac215b99bc296915cfb4850f17a076697461427b7a9f398e48016c6b81c70a7bf598629af7bd9f9484b
|
7
|
+
data.tar.gz: 31bfe86e8a32193ee3e7a727a7214193a6ecd7edea92208afdc29c7381543c8538af191c0d73aeeaf7c32bd8a5da052204341f48b7e842b21a06ee0502a790cb
|
data/README.md
CHANGED
@@ -50,7 +50,7 @@ class ApplicationFeature < Featury::Base
|
|
50
50
|
Slack::API::Notify.call!(action:, features:)
|
51
51
|
end
|
52
52
|
|
53
|
-
after do |action:, features:|
|
53
|
+
after :enabled?, :disabled? do |action:, features:|
|
54
54
|
Slack::API::Notify.call!(action:, features:)
|
55
55
|
end
|
56
56
|
end
|
@@ -137,6 +137,18 @@ In the preceding example, there might be a scenario where the payment system is
|
|
137
137
|
undergoing technical maintenance and therefore is temporarily shut down.
|
138
138
|
Consequently, the onboarding process for new users will be halted until further notice.
|
139
139
|
|
140
|
+
#### Information about features
|
141
|
+
|
142
|
+
```ruby
|
143
|
+
info = User::OnboardingFeature.info
|
144
|
+
```
|
145
|
+
|
146
|
+
```ruby
|
147
|
+
info.features # Feature flags within one class.
|
148
|
+
info.groups # Feature groups within one class.
|
149
|
+
info.tree # Tree of feature flags starting from the current class.
|
150
|
+
```
|
151
|
+
|
140
152
|
## Contributing
|
141
153
|
|
142
154
|
This project is intended to be a safe, welcoming space for collaboration.
|
@@ -65,7 +65,7 @@ module Featury
|
|
65
65
|
[resource.name, inputs.public_send(resource.name)]
|
66
66
|
end
|
67
67
|
|
68
|
-
inputs.action.block.call(features: inputs.collection_of_features.
|
68
|
+
inputs.action.block.call(features: inputs.collection_of_features.full_names, **options)
|
69
69
|
end
|
70
70
|
|
71
71
|
def groups_are_true
|
data/lib/featury/base.rb
CHANGED
@@ -9,7 +9,7 @@ module Featury
|
|
9
9
|
Featury::Callbacks::Service.call!(
|
10
10
|
action: action.name,
|
11
11
|
callbacks: collection_of_callbacks.before,
|
12
|
-
features: collection_of_features.
|
12
|
+
features: collection_of_features.full_names
|
13
13
|
)
|
14
14
|
|
15
15
|
result = super
|
@@ -17,7 +17,7 @@ module Featury
|
|
17
17
|
Featury::Callbacks::Service.call!(
|
18
18
|
action: action.name,
|
19
19
|
callbacks: collection_of_callbacks.after,
|
20
|
-
features: collection_of_features.
|
20
|
+
features: collection_of_features.full_names
|
21
21
|
)
|
22
22
|
|
23
23
|
result
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Featury
|
4
|
+
module Info
|
5
|
+
module DSL
|
6
|
+
def self.included(base)
|
7
|
+
base.extend(ClassMethods)
|
8
|
+
end
|
9
|
+
|
10
|
+
module ClassMethods
|
11
|
+
def info
|
12
|
+
Featury::Info::Result.new(
|
13
|
+
features: collection_of_features.full_names,
|
14
|
+
groups: collection_of_groups.map(&:group),
|
15
|
+
tree: collection_of_features.full_names.concat(
|
16
|
+
collection_of_groups.map do |group|
|
17
|
+
group.group.info.tree
|
18
|
+
end
|
19
|
+
)
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
data/lib/featury/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: featury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
@@ -179,6 +179,8 @@ files:
|
|
179
179
|
- lib/featury/groups/collection.rb
|
180
180
|
- lib/featury/groups/dsl.rb
|
181
181
|
- lib/featury/groups/group.rb
|
182
|
+
- lib/featury/info/dsl.rb
|
183
|
+
- lib/featury/info/result.rb
|
182
184
|
- lib/featury/resources/collection.rb
|
183
185
|
- lib/featury/resources/dsl.rb
|
184
186
|
- lib/featury/resources/resource.rb
|