featury 1.0.0.rc20 → 1.0.0.rc22

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: 89e31c544583912d5448fd9fffbed08f5460691a921fdd3a6722dff1c6549ad1
4
- data.tar.gz: bcc393cbf53897b0b1168f1d125b22c8d725450a2952817c1e29a3e83c12d787
3
+ metadata.gz: 978b872baf023c8de159d5ecfa2928e59d1d28d950fd26c9ec9ca3dc43d116b8
4
+ data.tar.gz: 326784e9821c20af6dc91f765b069ae1574624b6035dabca6b76dc5331501492
5
5
  SHA512:
6
- metadata.gz: 554318ae7d5d7b0727e0e9ef262fb020178cf5e1602a87d7800e2ad798691d9581f02f2b1975ccaf9f5d168915dca91a6b10eb2c2d201d51e730aa48d2aadb0a
7
- data.tar.gz: 6c1cf235e2cd4d217f0a9c05140c70dd60f4c8d8615e8cce36e7e9be87298d6f970911c79a472085ca65271f48be00815c7cdf02c3ee6ffca8b8075f90a0c54e
6
+ metadata.gz: 18cd733daf8b0208364b6733d737b9720ca02f446cf899d486737d26fb2bee962cb748f642586bfbe06fbe9ed9d405c7453525493aced50a85da3f759200ecc2
7
+ data.tar.gz: 5f5cde128bbc8a04706c72b5cc560f0f5c9b033d92e53298f601c0bf849938b79bd313a92d2419dc1111a85de5adde6541e5d545e03f40e66e859221635a8bba
data/README.md CHANGED
@@ -169,6 +169,7 @@ info = User::OnboardingFeature.info
169
169
 
170
170
  ```ruby
171
171
  info.actions # Feature actions (all, web) of the current class.
172
+ info.resources # Feature resources of the current class.
172
173
  info.features # Feature flags of the current class.
173
174
  info.groups # Feature flag groups of the current class.
174
175
  info.tree # Tree of feature flags from the current class.
@@ -12,7 +12,11 @@ module Featury
12
12
 
13
13
  arguments.merge!(@with_arguments) if @with_arguments.is_a?(Hash)
14
14
 
15
- _call!(context, action, **arguments)
15
+ result = _call!(context, action, **arguments)
16
+
17
+ remove_instance_variable(:@with_arguments) if instance_variable_defined?(:@with_arguments)
18
+
19
+ result
16
20
  end
17
21
 
18
22
  def respond_to_missing?(method_name, *)
@@ -8,9 +8,10 @@ module Featury
8
8
  end
9
9
 
10
10
  module ClassMethods
11
- def info
11
+ def info # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
12
12
  Featury::Info::Result.new(
13
13
  actions: Featury::Info::Result::Actions.new(collection_of_actions),
14
+ resources: collection_of_resources.names,
14
15
  features: collection_of_features.full_names,
15
16
  groups: collection_of_groups.map(&:group),
16
17
  tree: collection_of_features.full_names.concat(
@@ -28,12 +28,14 @@ module Featury
28
28
  end
29
29
 
30
30
  attr_reader :actions,
31
+ :resources,
31
32
  :features,
32
33
  :groups,
33
34
  :tree
34
35
 
35
- def initialize(actions:, features:, groups:, tree:)
36
+ def initialize(actions:, resources:, features:, groups:, tree:)
36
37
  @actions = actions
38
+ @resources = resources
37
39
  @features = features
38
40
  @groups = groups
39
41
  @tree = tree
@@ -17,6 +17,10 @@ module Featury
17
17
  def only_option
18
18
  Collection.new(filter(&:option?))
19
19
  end
20
+
21
+ def names
22
+ map(&:name)
23
+ end
20
24
  end
21
25
  end
22
26
  end
@@ -5,7 +5,7 @@ module Featury
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc20"
8
+ PRE = "rc22"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
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.rc20
4
+ version: 1.0.0.rc22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.6.9
215
+ rubygems_version: 3.7.0
216
216
  specification_version: 4
217
217
  summary: A set of tools for building reliable services of any complexity
218
218
  test_files: []