featury 1.0.0.rc19 → 1.0.0.rc21

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: 90d7f0c59fc6810d609fa806bb5fa60cda2894c66bacbfd8f6015c05f9d8d376
4
- data.tar.gz: 21fbdbca92e6583fc9f02261c2de3344d1c91740b0dc72df6810c2102a9a907c
3
+ metadata.gz: 2b4b65fd3d2c327710e1c220afdbbc120731125b102c84ede6d3ca5c6830a0f9
4
+ data.tar.gz: 4625ce42357a29996352d1bc1f283a7e283ff63bb117f79ff24371c45721f63b
5
5
  SHA512:
6
- metadata.gz: 3909dee49e854c7c4b380f23a1f7fb70028a3c84c16d99bd1a1978f152d40684b28f5df2249cbd7c0627fb6b148b4f73a3967382e7914fe4186f683f26899d37
7
- data.tar.gz: 513add3e16f4a5fabd4790ac161f3d5e6a2252c3580ec2f7be01d5219c5cfccfecce5cfe147a3b233b689facfe1469e553250c0315d82b48a41f6fb07ced2d1e
6
+ metadata.gz: a98aa053e4efe4e272091c9bb02217a737b4eafa37f972036debf5daef5af7dcb112d16b96715e95ff77004246fe3ee6c53eed85524f3871a06277cfee2774c2
7
+ data.tar.gz: 22cd7e4c02041c2d24391815ece9eef662f6f4ccbfe8e755d7a0ca8ee4cdfd3bd49fb00cc8649df3e92d2abf2938a5a7362a652afd84d2282d506150a04f0651
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.
@@ -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(
@@ -12,9 +12,9 @@ module Featury
12
12
 
13
13
  def initialize(collection_of_actions)
14
14
  @all = collection_of_actions.names
15
- @enabled = collection_of_actions.web_enabled.name
16
- @enable = collection_of_actions.web_enable.name
17
- @disable = collection_of_actions.web_disable.name
15
+ @enabled = collection_of_actions.web_enabled&.name
16
+ @enable = collection_of_actions.web_enable&.name
17
+ @disable = collection_of_actions.web_disable&.name
18
18
  end
19
19
  end
20
20
 
@@ -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 = "rc19"
8
+ PRE = "rc21"
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.rc19
4
+ version: 1.0.0.rc21
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: []