servactory 2.9.0.rc8 → 2.9.0.rc9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/servactory/actions/dsl.rb +5 -5
- data/lib/servactory/inputs/collection.rb +1 -1
- data/lib/servactory/inputs/input.rb +1 -1
- data/lib/servactory/internals/collection.rb +1 -1
- data/lib/servactory/outputs/collection.rb +1 -1
- data/lib/servactory/tool_kit/dynamic_options/format.rb +3 -3
- data/lib/servactory/tool_kit/dynamic_options/must.rb +7 -7
- data/lib/servactory/utils.rb +2 -2
- data/lib/servactory/version.rb +1 -1
- metadata +8 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e1d8ccdc28a23da904db9c55ca2e6209e347613d553296a15118f3f81f92623
|
4
|
+
data.tar.gz: 7c6168e2eca8b0aad84eee59b1be99175b7dbe29201c4ca37c6ff04eba7e0a5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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](
|
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,
|
90
|
-
return method_missing_for_action_aliases(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,
|
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
|
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
|
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|
|
@@ -122,7 +122,7 @@ module Servactory
|
|
122
122
|
input_name: input.name,
|
123
123
|
value:,
|
124
124
|
option_name:,
|
125
|
-
format_name: option_value.
|
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.
|
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.
|
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.
|
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
|
84
|
+
is_option_message_proc ? option.message.call(**default_attributes, input:) : option.message
|
85
85
|
else
|
86
|
-
message_for_input_with(**default_attributes
|
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
|
90
|
+
is_option_message_proc ? option.message.call(**default_attributes, internal:) : option.message
|
91
91
|
else
|
92
|
-
message_for_internal_with(**default_attributes
|
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
|
96
|
+
is_option_message_proc ? option.message.call(**default_attributes, output:) : option.message
|
97
97
|
else
|
98
|
-
message_for_output_with(**default_attributes
|
98
|
+
message_for_output_with(**default_attributes, output:)
|
99
99
|
end
|
100
100
|
end
|
101
101
|
end
|
data/lib/servactory/utils.rb
CHANGED
@@ -63,7 +63,7 @@ module Servactory
|
|
63
63
|
# @param value [#to_s]
|
64
64
|
# @return [Boolean]
|
65
65
|
def true?(value)
|
66
|
-
|
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
|
-
|
91
|
+
value.present?
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
data/lib/servactory/version.rb
CHANGED
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.
|
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-
|
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: '
|
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: '
|
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.
|
373
|
+
version: 3.1.0
|
416
374
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
417
375
|
requirements:
|
418
376
|
- - ">="
|