servactory 2.9.0.rc8 → 2.9.0.rc9

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: cbd8f1aab15e1cfd99b746c96f357f075b15e494490ea4bcae946545b76b5e5b
4
- data.tar.gz: 896768b2f5b685940ca50d40914a3ab5059f11c35d6b4d284daf2ca4e6cdfc17
3
+ metadata.gz: 1e1d8ccdc28a23da904db9c55ca2e6209e347613d553296a15118f3f81f92623
4
+ data.tar.gz: 7c6168e2eca8b0aad84eee59b1be99175b7dbe29201c4ca37c6ff04eba7e0a5b
5
5
  SHA512:
6
- metadata.gz: 6ee297769b7a30216bb9e3cde31701a3660090cd3229510de6f632a5c350e007e90ff6c8920168d181a7551a101443e7c17e19c5858c8d16c814f31a74c27b15
7
- data.tar.gz: c5a5ff1006fe27c33651546e6b42eb7e936dcbaacfb96034eeaa65f20800e43e1c17fe4317f26100864ebec51cdc9089e77114673f61cf8720ae614883aa7f88
6
+ metadata.gz: 659c2b63682ff324211aec48646fd3b7ebdead9c2dddf0d0b4bee89a07554664e66a216a86aa4ae0f7847874e32207da30d99de29a942994137f185431caa461
7
+ data.tar.gz: 768a253f140c3b0ef1a20321cb5853b6b624e90364eb5c67547077efe27422be57a5eda247d1b93700c45c069ce8dd63ef4a71e7c065e2fa0d3deba437c83203
data/README.md CHANGED
@@ -80,7 +80,7 @@ end
80
80
 
81
81
  This project is intended to be a safe, welcoming space for collaboration.
82
82
  Contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
83
- We recommend reading the [contributing guide](./website/docs/CONTRIBUTING.md) as well.
83
+ We recommend reading the [contributing guide](https://servactory.com/CONTRIBUTING) as well.
84
84
 
85
85
  ## License
86
86
 
@@ -86,15 +86,15 @@ module Servactory
86
86
  collection_of_stages << current_stage
87
87
  end
88
88
 
89
- def method_missing(name, *args, &block)
90
- return method_missing_for_action_aliases(name, *args, &block) if config.action_aliases.include?(name)
89
+ def method_missing(name, ...)
90
+ return method_missing_for_action_aliases(name, ...) if config.action_aliases.include?(name)
91
91
 
92
- return method_missing_for_shortcuts_for_make(name, *args, &block) if config.action_shortcuts.include?(name)
92
+ return method_missing_for_shortcuts_for_make(name, ...) if config.action_shortcuts.include?(name)
93
93
 
94
94
  super
95
95
  end
96
96
 
97
- def method_missing_for_action_aliases(_alias_name, *args, &block) # rubocop:disable Lint/UnusedMethodArgument
97
+ def method_missing_for_action_aliases(_alias_name, *args)
98
98
  method_name = args.first
99
99
  method_options = args.last.is_a?(Hash) ? args.pop : {}
100
100
 
@@ -103,7 +103,7 @@ module Servactory
103
103
  make(method_name, **method_options)
104
104
  end
105
105
 
106
- def method_missing_for_shortcuts_for_make(shortcut_name, *args, &block) # rubocop:disable Lint/UnusedMethodArgument
106
+ def method_missing_for_shortcuts_for_make(shortcut_name, *args)
107
107
  method_options = args.last.is_a?(Hash) ? args.pop : {}
108
108
 
109
109
  args.each do |method_name|
@@ -15,7 +15,7 @@ module Servactory
15
15
  end
16
16
 
17
17
  def except(*names)
18
- Collection.new(filter { |input| !names.include?(input.internal_name) })
18
+ Collection.new(filter { |input| names.exclude?(input.internal_name) })
19
19
  end
20
20
 
21
21
  def names
@@ -40,7 +40,7 @@ module Servactory
40
40
  **options
41
41
  )
42
42
  @name = name
43
- @internal_name = as.present? ? as : name
43
+ @internal_name = as.presence || name
44
44
  @hash_mode_class_names = hash_mode_class_names
45
45
  @option_helpers = option_helpers
46
46
 
@@ -15,7 +15,7 @@ module Servactory
15
15
  end
16
16
 
17
17
  def except(*names)
18
- Collection.new(filter { |internal| !names.include?(internal.name) })
18
+ Collection.new(filter { |internal| names.exclude?(internal.name) })
19
19
  end
20
20
 
21
21
  def names
@@ -15,7 +15,7 @@ module Servactory
15
15
  end
16
16
 
17
17
  def except(*names)
18
- Collection.new(filter { |internal| !names.include?(internal.name) })
18
+ Collection.new(filter { |internal| names.exclude?(internal.name) })
19
19
  end
20
20
 
21
21
  def names
@@ -122,7 +122,7 @@ module Servactory
122
122
  input_name: input.name,
123
123
  value:,
124
124
  option_name:,
125
- format_name: option_value.present? ? option_value : option_value.inspect
125
+ format_name: option_value.presence || option_value.inspect
126
126
  )
127
127
  end
128
128
 
@@ -135,7 +135,7 @@ module Servactory
135
135
  internal_name: internal.name,
136
136
  value:,
137
137
  option_name:,
138
- format_name: option_value.present? ? option_value : option_value.inspect
138
+ format_name: option_value.presence || option_value.inspect
139
139
  )
140
140
  end
141
141
 
@@ -148,7 +148,7 @@ module Servactory
148
148
  output_name: output.name,
149
149
  value:,
150
150
  option_name:,
151
- format_name: option_value.present? ? option_value : option_value.inspect
151
+ format_name: option_value.presence || option_value.inspect
152
152
  )
153
153
  end
154
154
  end
@@ -17,7 +17,7 @@ module Servactory
17
17
  if data.is_a?(Hash) && data.key?(body_key)
18
18
  data.delete(body_key)
19
19
  else
20
- data.present? ? data : body_fallback
20
+ data.presence || body_fallback
21
21
  end
22
22
 
23
23
  @message = (data.is_a?(Hash) && data.key?(:message) ? data.delete(:message) : nil)
@@ -81,21 +81,21 @@ module Servactory
81
81
 
82
82
  if Servactory::Utils.really_input?(input)
83
83
  if is_option_message_present
84
- is_option_message_proc ? option.message.call(**default_attributes.merge(input:)) : option.message
84
+ is_option_message_proc ? option.message.call(**default_attributes, input:) : option.message
85
85
  else
86
- message_for_input_with(**default_attributes.merge(input:))
86
+ message_for_input_with(**default_attributes, input:)
87
87
  end
88
88
  elsif Servactory::Utils.really_internal?(internal)
89
89
  if is_option_message_present
90
- is_option_message_proc ? option.message.call(**default_attributes.merge(internal:)) : option.message
90
+ is_option_message_proc ? option.message.call(**default_attributes, internal:) : option.message
91
91
  else
92
- message_for_internal_with(**default_attributes.merge(internal:))
92
+ message_for_internal_with(**default_attributes, internal:)
93
93
  end
94
94
  elsif Servactory::Utils.really_output?(output)
95
95
  if is_option_message_present
96
- is_option_message_proc ? option.message.call(**default_attributes.merge(output:)) : option.message
96
+ is_option_message_proc ? option.message.call(**default_attributes, output:) : option.message
97
97
  else
98
- message_for_output_with(**default_attributes.merge(output:))
98
+ message_for_output_with(**default_attributes, output:)
99
99
  end
100
100
  end
101
101
  end
@@ -63,7 +63,7 @@ module Servactory
63
63
  # @param value [#to_s]
64
64
  # @return [Boolean]
65
65
  def true?(value)
66
- !FALSE_VALUES.include?(value)
66
+ FALSE_VALUES.exclude?(value)
67
67
  end
68
68
 
69
69
  # @param value [#to_s]
@@ -88,7 +88,7 @@ module Servactory
88
88
  else
89
89
  return false if FALSE_VALUES.include?(value)
90
90
 
91
- !value.blank?
91
+ value.present?
92
92
  end
93
93
  end
94
94
  end
@@ -5,7 +5,7 @@ module Servactory
5
5
  MAJOR = 2
6
6
  MINOR = 9
7
7
  PATCH = 0
8
- PRE = "rc8"
8
+ PRE = "rc9"
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: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.0.rc8
4
+ version: 2.9.0.rc9
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-10-27 00:00:00.000000000 Z
11
+ date: 2024-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -199,61 +199,19 @@ dependencies:
199
199
  - !ruby/object:Gem::Version
200
200
  version: '3.12'
201
201
  - !ruby/object:Gem::Dependency
202
- name: rubocop
202
+ name: servactory-rubocop
203
203
  requirement: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - "~>"
206
- - !ruby/object:Gem::Version
207
- version: '1.57'
208
- type: :development
209
- prerelease: false
210
- version_requirements: !ruby/object:Gem::Requirement
211
- requirements:
212
- - - "~>"
213
- - !ruby/object:Gem::Version
214
- version: '1.57'
215
- - !ruby/object:Gem::Dependency
216
- name: rubocop-performance
217
- requirement: !ruby/object:Gem::Requirement
218
- requirements:
219
- - - "~>"
220
- - !ruby/object:Gem::Version
221
- version: '1.19'
222
- type: :development
223
- prerelease: false
224
- version_requirements: !ruby/object:Gem::Requirement
225
- requirements:
226
- - - "~>"
227
- - !ruby/object:Gem::Version
228
- version: '1.19'
229
- - !ruby/object:Gem::Dependency
230
- name: rubocop-rake
231
- requirement: !ruby/object:Gem::Requirement
232
- requirements:
233
- - - "~>"
234
- - !ruby/object:Gem::Version
235
- version: '0.6'
236
- type: :development
237
- prerelease: false
238
- version_requirements: !ruby/object:Gem::Requirement
239
- requirements:
240
- - - "~>"
241
- - !ruby/object:Gem::Version
242
- version: '0.6'
243
- - !ruby/object:Gem::Dependency
244
- name: rubocop-rspec
245
- requirement: !ruby/object:Gem::Requirement
246
- requirements:
247
- - - "~>"
205
+ - - ">="
248
206
  - !ruby/object:Gem::Version
249
- version: '2.24'
207
+ version: '0.1'
250
208
  type: :development
251
209
  prerelease: false
252
210
  version_requirements: !ruby/object:Gem::Requirement
253
211
  requirements:
254
- - - "~>"
212
+ - - ">="
255
213
  - !ruby/object:Gem::Version
256
- version: '2.24'
214
+ version: '0.1'
257
215
  - !ruby/object:Gem::Dependency
258
216
  name: steep
259
217
  requirement: !ruby/object:Gem::Requirement
@@ -412,7 +370,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
412
370
  requirements:
413
371
  - - ">="
414
372
  - !ruby/object:Gem::Version
415
- version: 3.0.0
373
+ version: 3.1.0
416
374
  required_rubygems_version: !ruby/object:Gem::Requirement
417
375
  requirements:
418
376
  - - ">="