featury 1.0.0.rc5 → 1.0.0.rc7

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: 4109a155154dfe53461c79450a8a458f75c310cd4059c7aba50f5ccf44934152
4
- data.tar.gz: ebe758de6245459700faeded72efe9537b27b7b4a1f63bd958c8cea28bbb1a01
3
+ metadata.gz: 1522d4964ade14279e3d80cd642467e9adfd97cfcb6c707338daec190c2b5c70
4
+ data.tar.gz: e79b1c3e707f71c4bd68fcca458e785a9075a1599a02b9b135f0849da29eb0a8
5
5
  SHA512:
6
- metadata.gz: bf21d12a7491f66f223624615b9d56fc1006e009d855513a32eeda2f4e07cc359523a4dd62d36ff9845356bf8b340afba6f9f9813599784a7a528170cba29f3f
7
- data.tar.gz: bbe7138eb5e70b8dc4a0220b683717f8f1b53ac5e1c8f85504ec2e78b6f55c324780e5ce3cca705b11cd8b06cb23ead7ec24480b284be1ad8e5271ae1062a18e
6
+ metadata.gz: a29e826900541ef82f730670bee43146ca0460ae0e2383ba4744fd12ce8829e42ab73ba8e6216a2357b710574bde3e56a9b7efe326c252e175cd8df6e1726007
7
+ data.tar.gz: 44ca9a9bfc65266304327fed24bd9137aec8bc1824eb0317fa0f25ca2d680c4cedc6b5cee77c0fe2ba17dfc84fbef66cedf818ff7c60c12dd0a09fc257100103
data/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
  <a href="https://github.com/servactory/featury/releases"><img src="https://img.shields.io/github/release-date/servactory/featury" alt="Release Date"></a>
4
4
  </p>
5
5
 
6
- ## For what?
6
+ ## Purpose
7
7
 
8
- Featury is designed for grouping and managing multiple features in projects.
9
- You can use any ready-made solution or your own.
10
- Feature is easily customizable to suit projects and their goals.
8
+ Featury is designed to group and manage multiple features within a project.
9
+ It provides the flexibility to utilize any pre-existing solution or create your own.
10
+ It's easily adjustable to align with the unique needs and objectives of your project.
11
11
 
12
12
  [//]: # (## Documentation)
13
13
 
@@ -25,8 +25,8 @@ gem "featury"
25
25
 
26
26
  #### Basic class for your features
27
27
 
28
- For example, you use Flipper for features.
29
- In this case, the base class might look like this:
28
+ For instance, assume that you are utilizing Flipper for managing features.
29
+ In such scenario, the base class could potentially be structured as follows:
30
30
 
31
31
  ```ruby
32
32
  class ApplicationFeature < Featury::Base
@@ -58,14 +58,10 @@ class UserFeature::Onboarding < ApplicationFeature
58
58
 
59
59
  prefix :user_onboarding
60
60
 
61
- features(
62
- :passage, # => :user_onboarding_passage
63
- )
61
+ features :passage # => :user_onboarding_passage
64
62
 
65
- groups(
66
- BillingFeature,
67
- PaymentSystemFeature
68
- )
63
+ groups BillingFeature,
64
+ PaymentSystemFeature
69
65
  end
70
66
  ```
71
67
 
@@ -73,9 +69,8 @@ end
73
69
  class BillingFeature < ApplicationFeature
74
70
  prefix :billing
75
71
 
76
- features(
77
- :work # => :billing_work
78
- )
72
+ features :api, # => :billing_api
73
+ :webhooks # => :billing_webhooks
79
74
  end
80
75
  ```
81
76
 
@@ -83,22 +78,21 @@ end
83
78
  class PaymentSystemFeature < ApplicationFeature
84
79
  prefix :payment_system
85
80
 
86
- features(
87
- :work # => :payment_system_work
88
- )
81
+ features :api, # => :payment_system_api
82
+ :webhooks # => :payment_system_webhooks
89
83
  end
90
84
  ```
91
85
 
92
- The `resource` method can indicate how the transmitted information should be processed.
93
- In addition to the options that Servactory brings, there are options for specifying the processing mode of the transmitted data.
86
+ The `resource` method provides an indication of how the transmitted information ought to be processed.
87
+ Besides the options provided by [Servactory](https://github.com/servactory/servactory), additional ones are available for stipulating the processing mode of the transmitted data.
94
88
 
95
- If it is necessary for a resource to be transferred as an option for a feature flag, then use the `option` option:
89
+ If a resource needs to be conveyed as a feature flag option, utilize the `option` parameter:
96
90
 
97
- ```ruby
91
+ ```ruby
98
92
  resource :user, type: User, option: true
99
93
  ```
100
94
 
101
- If it is necessary for a resource to be transferred to a nested group, then use the `nested` option:
95
+ To transfer a resource to a nested group, utilize the `nested` option:
102
96
 
103
97
  ```ruby
104
98
  resource :user, type: User, nested: true
@@ -106,17 +100,17 @@ resource :user, type: User, nested: true
106
100
 
107
101
  #### Working with the features of your project
108
102
 
109
- Each of these actions will be applied to all feature flags.
110
- And the result of these calls will be based on the result of all feature flags.
103
+ Each of these actions will be applied to every feature flag.
104
+ Subsequently, the outcome of these actions will be contingent upon the combined results of all feature flags.
111
105
 
112
106
  ```ruby
113
107
  UserFeature::Onboarding.enabled?(user:) # => true
114
108
  UserFeature::Onboarding.disabled?(user:) # => false
115
109
  UserFeature::Onboarding.enable(user:) # => true
116
- UserFeature::Onboarding.disable(user:) # => false
110
+ UserFeature::Onboarding.disable(user:) # => true
117
111
  ```
118
112
 
119
- You can also use the `with` method to pass arguments if needed.
113
+ You can also utilize the `with` method to pass necessary arguments.
120
114
 
121
115
  ```ruby
122
116
  feature = UserFeature::Onboarding.with(user:)
@@ -124,15 +118,16 @@ feature = UserFeature::Onboarding.with(user:)
124
118
  feature.enabled? # => true
125
119
  feature.disabled? # => false
126
120
  feature.enable # => true
127
- feature.disable # => false
121
+ feature.disable # => true
128
122
  ```
129
123
 
130
- If one of the feature flags is turned off, for example,
131
- through your automation, then the main feature class will
132
- return `false` when asked "is it enabled?".
124
+ If a feature flag is deactivated, possibly via automation processes,
125
+ the primary feature class subsequently responds with `false` when
126
+ queried about its enablement status.
133
127
 
134
- In the example above, this could be the payment system and its shutdown due to technical work.
135
- In this case, all onboarding of new users will be suspended.
128
+ In the preceding example, there might be a scenario where the payment system is
129
+ undergoing technical maintenance and therefore is temporarily shut down.
130
+ Consequently, the onboarding process for new users will be halted until further notice.
136
131
 
137
132
  ## Contributing
138
133
 
@@ -20,7 +20,7 @@ module Featury
20
20
  def action(name)
21
21
  collection_of_actions << Action.new(
22
22
  name,
23
- block: ->(features:, **options) { yield(features: features, **options) }
23
+ block: ->(features:, **options) { yield(features:, **options) }
24
24
  )
25
25
  end
26
26
 
@@ -16,12 +16,12 @@ module Featury
16
16
  )
17
17
  service_result = Service::Builder.build_and_call!(
18
18
  context: self,
19
- action: action,
20
- incoming_arguments: incoming_arguments,
21
- collection_of_resources: collection_of_resources,
22
- collection_of_conditions: collection_of_conditions,
23
- collection_of_features: collection_of_features,
24
- collection_of_groups: collection_of_groups
19
+ action:,
20
+ incoming_arguments:,
21
+ collection_of_resources:,
22
+ collection_of_conditions:,
23
+ collection_of_features:,
24
+ collection_of_groups:
25
25
  )
26
26
 
27
27
  super && service_result.success? && service_result.all_true?
@@ -30,12 +30,12 @@ module Featury
30
30
  def _call!(context, action, **arguments)
31
31
  context.send(
32
32
  :_call!,
33
- action: action,
33
+ action:,
34
34
  incoming_arguments: arguments.symbolize_keys,
35
- collection_of_resources: collection_of_resources,
36
- collection_of_conditions: collection_of_conditions,
37
- collection_of_features: collection_of_features,
38
- collection_of_groups: collection_of_groups
35
+ collection_of_resources:,
36
+ collection_of_conditions:,
37
+ collection_of_features:,
38
+ collection_of_groups:
39
39
  )
40
40
  end
41
41
  end
@@ -20,12 +20,12 @@ module Featury
20
20
  collection_of_groups:
21
21
  )
22
22
  call!(
23
- action: action,
24
- incoming_arguments: incoming_arguments,
25
- collection_of_resources: collection_of_resources,
26
- collection_of_conditions: collection_of_conditions,
27
- collection_of_features: collection_of_features,
28
- collection_of_groups: collection_of_groups
23
+ action:,
24
+ incoming_arguments:,
25
+ collection_of_resources:,
26
+ collection_of_conditions:,
27
+ collection_of_features:,
28
+ collection_of_groups:
29
29
  )
30
30
  end
31
31
 
@@ -5,7 +5,7 @@ module Featury
5
5
  MAJOR = 1
6
6
  MINOR = 0
7
7
  PATCH = 0
8
- PRE = "rc5"
8
+ PRE = "rc7"
9
9
 
10
10
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: featury
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc5
4
+ version: 1.0.0.rc7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-23 00:00:00.000000000 Z
11
+ date: 2024-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.1'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.2'
22
+ version: '8.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.1'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.2'
32
+ version: '8.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: i18n
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: 2.6.0
53
+ version: 2.9.0
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 2.6.0
60
+ version: 2.9.0
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: zeitwerk
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -129,61 +129,19 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '3.12'
131
131
  - !ruby/object:Gem::Dependency
132
- name: rubocop
132
+ name: servactory-rubocop
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - "~>"
136
- - !ruby/object:Gem::Version
137
- version: '1.57'
138
- type: :development
139
- prerelease: false
140
- version_requirements: !ruby/object:Gem::Requirement
141
- requirements:
142
- - - "~>"
143
- - !ruby/object:Gem::Version
144
- version: '1.57'
145
- - !ruby/object:Gem::Dependency
146
- name: rubocop-performance
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: '1.19'
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: '1.19'
159
- - !ruby/object:Gem::Dependency
160
- name: rubocop-rake
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '0.6'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: '0.6'
173
- - !ruby/object:Gem::Dependency
174
- name: rubocop-rspec
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - "~>"
135
+ - - ">="
178
136
  - !ruby/object:Gem::Version
179
- version: '2.24'
137
+ version: '0.5'
180
138
  type: :development
181
139
  prerelease: false
182
140
  version_requirements: !ruby/object:Gem::Requirement
183
141
  requirements:
184
- - - "~>"
142
+ - - ">="
185
143
  - !ruby/object:Gem::Version
186
- version: '2.24'
144
+ version: '0.5'
187
145
  description: A set of tools for building reliable services of any complexity
188
146
  email:
189
147
  - profox.rus@gmail.com
@@ -242,14 +200,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
200
  requirements:
243
201
  - - ">="
244
202
  - !ruby/object:Gem::Version
245
- version: 3.0.0
203
+ version: 3.1.0
246
204
  required_rubygems_version: !ruby/object:Gem::Requirement
247
205
  requirements:
248
206
  - - ">="
249
207
  - !ruby/object:Gem::Version
250
208
  version: '0'
251
209
  requirements: []
252
- rubygems_version: 3.5.11
210
+ rubygems_version: 3.5.22
253
211
  signing_key:
254
212
  specification_version: 4
255
213
  summary: A set of tools for building reliable services of any complexity