featury 1.0.0.rc23 → 1.0.0.rc25

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: 27dc6bc9325c7a843d205decf9c24a8c0e01a90702563040909d598af3085637
4
- data.tar.gz: 28c116058f78a60e1bd87e628316cd8a7e85b4d914762e833cd4daf2dcec96a0
3
+ metadata.gz: 9aaf473cce229df8453a2a3aade938b73dca43bf5d2d94ad986e45e0e7055dba
4
+ data.tar.gz: fd1df43ff7f0e206edd62b20365ad4a99151144f286ecfe237c98377484e007c
5
5
  SHA512:
6
- metadata.gz: f5a226b8a0bebb9ac32e008efa173c69e867e0c50619587faccbb8df10dd93c8bf978867dfa41103de28d6e66cfd56f5bf9e7adb88a525b2e4db9876cc8d1c80
7
- data.tar.gz: 317bd03292e5fadf62dcc373e0ea30e2151d04a243e9af09de2c1ced1d04c09c3bd4e57d623c00786e15f01c2e1c47ca1f108d33bb6806870d5f7cb42ab8d03d
6
+ metadata.gz: c3e509c946798efa61ed4b096455a0d8136e24690400f4420d8325fafcd4b3f3a360ef678258b98939d9ecf04a1aa1ebafc2cbe937cc1ee92d1ca45ae381ebe9
7
+ data.tar.gz: 60593252eb4ca349300bd7d4bc81c9d1ada2f6133dc41c5b67ad3cfbc1837eef5049e62afb1fd855514538877b338b181991f6ec0587e7e05606b28e5808f337
data/README.md CHANGED
@@ -56,7 +56,7 @@ class ApplicationFeature < Featury::Base
56
56
  features.all? { |feature| Flipper.disable(feature, *options.values) }
57
57
  end
58
58
 
59
- action :add do |features:, **options|
59
+ action :add, web: :regular do |features:, **options|
60
60
  features.all? { |feature| Flipper.add(feature, *options.values) }
61
61
  end
62
62
 
@@ -184,7 +184,7 @@ info = User::OnboardingFeature.info
184
184
  ```ruby
185
185
  # Feature actions information (all actions and web actions)
186
186
  info.actions.all # All actions: [:enabled?, :disabled?, :enable, :disable, :add]
187
- info.actions.web.all # Web actions: [:enabled?, :disabled?, :enable, :disable]
187
+ info.actions.web.all # Web actions: [:enabled?, :disabled?, :enable, :disable, :add]
188
188
 
189
189
  # Access specific web actions by their web: option name
190
190
  info.actions.web.enabled # Returns the method name (:enabled?) that was defined with `web: :enabled?`
@@ -4,6 +4,7 @@ module Featury
4
4
  module Actions
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :filter, :each, :map, :merge, :find
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -31,10 +31,25 @@ module Featury
31
31
 
32
32
  input :action, type: Featury::Actions::Action
33
33
 
34
- input :collection_of_resources, type: Featury::Resources::Collection
35
- input :collection_of_conditions, type: Featury::Conditions::Collection
36
- input :collection_of_features, type: Featury::Features::Collection
37
- input :collection_of_groups, type: Featury::Groups::Collection
34
+ input :collection_of_resources,
35
+ type: Featury::Resources::Collection,
36
+ required: false,
37
+ default: Featury::Resources::Collection.new
38
+
39
+ input :collection_of_conditions,
40
+ type: Featury::Conditions::Collection,
41
+ required: false,
42
+ default: Featury::Conditions::Collection.new
43
+
44
+ input :collection_of_features,
45
+ type: Featury::Features::Collection,
46
+ required: false,
47
+ default: Featury::Features::Collection.new
48
+
49
+ input :collection_of_groups,
50
+ type: Featury::Groups::Collection,
51
+ required: false,
52
+ default: Featury::Groups::Collection.new
38
53
 
39
54
  output :all_true, type: [TrueClass, FalseClass]
40
55
 
@@ -4,6 +4,7 @@ module Featury
4
4
  module Callbacks
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :filter, :each, :map, :merge, :find
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -4,6 +4,7 @@ module Featury
4
4
  module Conditions
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :each, :merge, :all?
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -4,7 +4,8 @@ module Featury
4
4
  module Features
5
5
  class Collection
6
6
  extend Forwardable
7
- def_delegators :@collection, :<<, :each, :map, :merge, :to_a
7
+
8
+ def_delegators :@collection, :<<, :each, :map, :merge, :to_a, :empty?
8
9
 
9
10
  def initialize(collection = Set.new)
10
11
  @collection = collection
@@ -4,7 +4,8 @@ module Featury
4
4
  module Groups
5
5
  class Collection
6
6
  extend Forwardable
7
- def_delegators :@collection, :<<, :each, :map, :flat_map, :filter, :to_h, :merge, :to_a, :all?
7
+
8
+ def_delegators :@collection, :<<, :each, :map, :flat_map, :filter, :to_h, :merge, :to_a, :all?, :empty?
8
9
 
9
10
  def initialize(collection = Set.new)
10
11
  @collection = collection
@@ -4,6 +4,7 @@ module Featury
4
4
  module Resources
5
5
  class Collection
6
6
  extend Forwardable
7
+
7
8
  def_delegators :@collection, :<<, :each, :map, :filter, :to_h, :merge
8
9
 
9
10
  def initialize(collection = Set.new)
@@ -5,7 +5,7 @@ module Featury
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc23"
8
+ PRE = "rc25"
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.rc23
4
+ version: 1.0.0.rc25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
@@ -49,14 +49,14 @@ dependencies:
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '2.15'
52
+ version: '2.16'
53
53
  type: :runtime
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: '2.15'
59
+ version: '2.16'
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: zeitwerk
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -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.7.0
215
+ rubygems_version: 3.7.1
216
216
  specification_version: 4
217
217
  summary: A set of tools for building reliable services of any complexity
218
218
  test_files: []