featury 1.0.0.rc23 → 1.0.0.rc24

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: 0c1b72f8275c2ade5b4e3716b598937fa8c4f243dfa142c17c9cc675523b9f70
4
+ data.tar.gz: 6112766f0f732d53a04b807e6f5af30f5125077a41a5ca043f43c0145bbba708
5
5
  SHA512:
6
- metadata.gz: f5a226b8a0bebb9ac32e008efa173c69e867e0c50619587faccbb8df10dd93c8bf978867dfa41103de28d6e66cfd56f5bf9e7adb88a525b2e4db9876cc8d1c80
7
- data.tar.gz: 317bd03292e5fadf62dcc373e0ea30e2151d04a243e9af09de2c1ced1d04c09c3bd4e57d623c00786e15f01c2e1c47ca1f108d33bb6806870d5f7cb42ab8d03d
6
+ metadata.gz: 4d3f21be19cfb9090f9c79ac9ce52d060eaea14ea014384ed2a3f1911f962058d58e87e796c36a28575b24841bf610dd0c2565d16f7a3c0a73a7343f6273b866
7
+ data.tar.gz: 38df69d5f0c94cef5213279b39966c79c006dc1ddff5ccb54f715e51b07c4e42bd2d84858659e3273fe3ddf48efcbd08d244afa40908b5fbefb8a0d1bfb3cd58
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?`
@@ -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,7 +4,7 @@ module Featury
4
4
  module Features
5
5
  class Collection
6
6
  extend Forwardable
7
- def_delegators :@collection, :<<, :each, :map, :merge, :to_a
7
+ def_delegators :@collection, :<<, :each, :map, :merge, :to_a, :empty?
8
8
 
9
9
  def initialize(collection = Set.new)
10
10
  @collection = collection
@@ -4,7 +4,7 @@ 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
+ def_delegators :@collection, :<<, :each, :map, :flat_map, :filter, :to_h, :merge, :to_a, :all?, :empty?
8
8
 
9
9
  def initialize(collection = Set.new)
10
10
  @collection = collection
@@ -5,7 +5,7 @@ module Featury
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc23"
8
+ PRE = "rc24"
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.rc24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov