servactory 2.0.0.rc6 → 2.0.1
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 +4 -4
- data/lib/servactory/actions/dsl.rb +2 -2
- data/lib/servactory/context/workspace.rb +0 -3
- data/lib/servactory/inputs/input.rb +11 -12
- data/lib/servactory/internals/internal.rb +11 -12
- data/lib/servactory/outputs/output.rb +11 -12
- data/lib/servactory/version.rb +2 -2
- data/lib/servactory.rb +1 -1
- metadata +28 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a360afbf0c2646c3509ad3f37cb49e4a59453ded9f741a012965d962565285e4
|
4
|
+
data.tar.gz: 47a2bca86fc7622a7fa5e8a70bbb9cac4c179e3a43ee67ee050e6c5dd7b0cb21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6e1c489135e42759ee1bae986ed590aaf01164f8243a77b24a8a0b13d37056f4f5de3b86c1b741a94bbee8abe87656be6ad351818de32cc01a255af68d4db7e
|
7
|
+
data.tar.gz: 379633b8ddee7e378eafabacc9b97ced01375daa8612ce6b162c054674a6aac825093670602a92e2b03594c76f4f5dc22de9cbec25dcfa3770b0e73f102860fa
|
@@ -68,14 +68,14 @@ module Servactory
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def method_missing(name, *args, &block)
|
71
|
-
return
|
71
|
+
return method_missing_for_action_aliases(name, *args, &block) if config.action_aliases.include?(name)
|
72
72
|
|
73
73
|
return method_missing_for_shortcuts_for_make(name, *args, &block) if config.action_shortcuts.include?(name)
|
74
74
|
|
75
75
|
super
|
76
76
|
end
|
77
77
|
|
78
|
-
def
|
78
|
+
def method_missing_for_action_aliases(_alias_name, *args, &block) # rubocop:disable Lint/UnusedMethodArgument
|
79
79
|
method_name = args.first
|
80
80
|
method_options = args.last.is_a?(Hash) ? args.pop : {}
|
81
81
|
|
@@ -9,7 +9,6 @@ module Servactory
|
|
9
9
|
collection_of_inputs: collection_of_inputs
|
10
10
|
)
|
11
11
|
end
|
12
|
-
alias inp inputs
|
13
12
|
|
14
13
|
def internals
|
15
14
|
@internals ||= Internals.new(
|
@@ -17,7 +16,6 @@ module Servactory
|
|
17
16
|
collection_of_internals: collection_of_internals
|
18
17
|
)
|
19
18
|
end
|
20
|
-
alias int internals
|
21
19
|
|
22
20
|
def outputs
|
23
21
|
@outputs ||= Outputs.new(
|
@@ -25,7 +23,6 @@ module Servactory
|
|
25
23
|
collection_of_outputs: collection_of_outputs
|
26
24
|
)
|
27
25
|
end
|
28
|
-
alias out outputs
|
29
26
|
|
30
27
|
def fail_input!(input_name, message:)
|
31
28
|
raise self.class.config.input_error_class.new(
|
@@ -16,7 +16,6 @@ module Servactory
|
|
16
16
|
name,
|
17
17
|
*helpers,
|
18
18
|
as: nil,
|
19
|
-
type:,
|
20
19
|
collection_mode_class_names:,
|
21
20
|
hash_mode_class_names:,
|
22
21
|
option_helpers:,
|
@@ -30,7 +29,7 @@ module Servactory
|
|
30
29
|
|
31
30
|
options = apply_helpers_for_options(helpers: helpers, options: options) if helpers.present?
|
32
31
|
|
33
|
-
add_basic_options_with(
|
32
|
+
add_basic_options_with(options)
|
34
33
|
end
|
35
34
|
# rubocop:enable Style/KeywordParametersOrder
|
36
35
|
|
@@ -60,15 +59,15 @@ module Servactory
|
|
60
59
|
options.merge(prepared_options)
|
61
60
|
end
|
62
61
|
|
63
|
-
def add_basic_options_with(
|
62
|
+
def add_basic_options_with(options)
|
64
63
|
# Check Class: Servactory::Inputs::Validations::Required
|
65
64
|
add_required_option_with(options)
|
66
65
|
|
67
66
|
# Check Class: Servactory::Inputs::Validations::Type
|
68
|
-
add_types_option_with(
|
67
|
+
add_types_option_with(options)
|
69
68
|
add_default_option_with(options)
|
70
|
-
add_collection_option_with(
|
71
|
-
add_hash_option_with(
|
69
|
+
add_collection_option_with(options)
|
70
|
+
add_hash_option_with(options)
|
72
71
|
|
73
72
|
# Check Class: Servactory::Inputs::Validations::Inclusion
|
74
73
|
add_inclusion_option_with(options)
|
@@ -107,12 +106,12 @@ module Servactory
|
|
107
106
|
)
|
108
107
|
end
|
109
108
|
|
110
|
-
def add_types_option_with(
|
109
|
+
def add_types_option_with(options)
|
111
110
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
112
111
|
name: :types,
|
113
112
|
attribute: self,
|
114
113
|
validation_class: Servactory::Inputs::Validations::Type,
|
115
|
-
original_value: Array(type),
|
114
|
+
original_value: Array(options.fetch(:type)),
|
116
115
|
need_for_checks: true,
|
117
116
|
body_fallback: nil,
|
118
117
|
with_advanced_mode: false
|
@@ -137,7 +136,7 @@ module Servactory
|
|
137
136
|
)
|
138
137
|
end
|
139
138
|
|
140
|
-
def add_collection_option_with(
|
139
|
+
def add_collection_option_with(options) # rubocop:disable Metrics/MethodLength
|
141
140
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
142
141
|
name: :consists_of,
|
143
142
|
attribute: self,
|
@@ -145,7 +144,7 @@ module Servactory
|
|
145
144
|
define_methods: [
|
146
145
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
147
146
|
name: :collection_mode?,
|
148
|
-
content: ->(**) { collection_mode_class_names.include?(type) }
|
147
|
+
content: ->(**) { collection_mode_class_names.include?(options.fetch(:type)) }
|
149
148
|
)
|
150
149
|
],
|
151
150
|
define_conflicts: [
|
@@ -161,7 +160,7 @@ module Servactory
|
|
161
160
|
)
|
162
161
|
end
|
163
162
|
|
164
|
-
def add_hash_option_with(
|
163
|
+
def add_hash_option_with(options) # rubocop:disable Metrics/MethodLength
|
165
164
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
166
165
|
name: :schema,
|
167
166
|
attribute: self,
|
@@ -169,7 +168,7 @@ module Servactory
|
|
169
168
|
define_methods: [
|
170
169
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
171
170
|
name: :hash_mode?,
|
172
|
-
content: ->(**) { hash_mode_class_names.include?(type) }
|
171
|
+
content: ->(**) { hash_mode_class_names.include?(options.fetch(:type)) }
|
173
172
|
)
|
174
173
|
],
|
175
174
|
define_conflicts: [
|
@@ -9,7 +9,6 @@ module Servactory
|
|
9
9
|
|
10
10
|
def initialize(
|
11
11
|
name,
|
12
|
-
type:,
|
13
12
|
collection_mode_class_names:,
|
14
13
|
hash_mode_class_names:,
|
15
14
|
**options
|
@@ -18,7 +17,7 @@ module Servactory
|
|
18
17
|
@collection_mode_class_names = collection_mode_class_names
|
19
18
|
@hash_mode_class_names = hash_mode_class_names
|
20
19
|
|
21
|
-
add_basic_options_with(
|
20
|
+
add_basic_options_with(options)
|
22
21
|
end
|
23
22
|
|
24
23
|
def method_missing(name, *args, &block)
|
@@ -33,26 +32,26 @@ module Servactory
|
|
33
32
|
collection_of_options.names.include?(name) || super
|
34
33
|
end
|
35
34
|
|
36
|
-
def add_basic_options_with(
|
35
|
+
def add_basic_options_with(options)
|
37
36
|
# Check Class: Servactory::Internals::Validations::Type
|
38
|
-
add_types_option_with(
|
39
|
-
add_collection_option_with(
|
40
|
-
add_hash_option_with(
|
37
|
+
add_types_option_with(options)
|
38
|
+
add_collection_option_with(options)
|
39
|
+
add_hash_option_with(options)
|
41
40
|
end
|
42
41
|
|
43
|
-
def add_types_option_with(
|
42
|
+
def add_types_option_with(options)
|
44
43
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
45
44
|
name: :types,
|
46
45
|
attribute: self,
|
47
46
|
validation_class: Servactory::Internals::Validations::Type,
|
48
|
-
original_value: Array(type),
|
47
|
+
original_value: Array(options.fetch(:type)),
|
49
48
|
need_for_checks: true,
|
50
49
|
body_fallback: nil,
|
51
50
|
with_advanced_mode: false
|
52
51
|
)
|
53
52
|
end
|
54
53
|
|
55
|
-
def add_collection_option_with(
|
54
|
+
def add_collection_option_with(options) # rubocop:disable Metrics/MethodLength
|
56
55
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
57
56
|
name: :consists_of,
|
58
57
|
attribute: self,
|
@@ -60,7 +59,7 @@ module Servactory
|
|
60
59
|
define_methods: [
|
61
60
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
62
61
|
name: :collection_mode?,
|
63
|
-
content: ->(**) { collection_mode_class_names.include?(type) }
|
62
|
+
content: ->(**) { collection_mode_class_names.include?(options.fetch(:type)) }
|
64
63
|
)
|
65
64
|
],
|
66
65
|
need_for_checks: false,
|
@@ -71,7 +70,7 @@ module Servactory
|
|
71
70
|
)
|
72
71
|
end
|
73
72
|
|
74
|
-
def add_hash_option_with(
|
73
|
+
def add_hash_option_with(options) # rubocop:disable Metrics/MethodLength
|
75
74
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
76
75
|
name: :schema,
|
77
76
|
attribute: self,
|
@@ -79,7 +78,7 @@ module Servactory
|
|
79
78
|
define_methods: [
|
80
79
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
81
80
|
name: :hash_mode?,
|
82
|
-
content: ->(**) { hash_mode_class_names.include?(type) }
|
81
|
+
content: ->(**) { hash_mode_class_names.include?(options.fetch(:type)) }
|
83
82
|
)
|
84
83
|
],
|
85
84
|
need_for_checks: false,
|
@@ -9,7 +9,6 @@ module Servactory
|
|
9
9
|
|
10
10
|
def initialize(
|
11
11
|
name,
|
12
|
-
type:,
|
13
12
|
collection_mode_class_names:,
|
14
13
|
hash_mode_class_names:,
|
15
14
|
**options
|
@@ -18,7 +17,7 @@ module Servactory
|
|
18
17
|
@collection_mode_class_names = collection_mode_class_names
|
19
18
|
@hash_mode_class_names = hash_mode_class_names
|
20
19
|
|
21
|
-
add_basic_options_with(
|
20
|
+
add_basic_options_with(options)
|
22
21
|
end
|
23
22
|
|
24
23
|
def method_missing(name, *args, &block)
|
@@ -33,26 +32,26 @@ module Servactory
|
|
33
32
|
collection_of_options.names.include?(name) || super
|
34
33
|
end
|
35
34
|
|
36
|
-
def add_basic_options_with(
|
35
|
+
def add_basic_options_with(options)
|
37
36
|
# Check Class: Servactory::Outputs::Validations::Type
|
38
|
-
add_types_option_with(
|
39
|
-
add_collection_option_with(
|
40
|
-
add_hash_option_with(
|
37
|
+
add_types_option_with(options)
|
38
|
+
add_collection_option_with(options)
|
39
|
+
add_hash_option_with(options)
|
41
40
|
end
|
42
41
|
|
43
|
-
def add_types_option_with(
|
42
|
+
def add_types_option_with(options)
|
44
43
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
45
44
|
name: :types,
|
46
45
|
attribute: self,
|
47
46
|
validation_class: Servactory::Internals::Validations::Type,
|
48
|
-
original_value: Array(type),
|
47
|
+
original_value: Array(options.fetch(:type)),
|
49
48
|
need_for_checks: true,
|
50
49
|
body_fallback: nil,
|
51
50
|
with_advanced_mode: false
|
52
51
|
)
|
53
52
|
end
|
54
53
|
|
55
|
-
def add_collection_option_with(
|
54
|
+
def add_collection_option_with(options) # rubocop:disable Metrics/MethodLength
|
56
55
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
57
56
|
name: :consists_of,
|
58
57
|
attribute: self,
|
@@ -60,7 +59,7 @@ module Servactory
|
|
60
59
|
define_methods: [
|
61
60
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
62
61
|
name: :collection_mode?,
|
63
|
-
content: ->(**) { collection_mode_class_names.include?(type) }
|
62
|
+
content: ->(**) { collection_mode_class_names.include?(options.fetch(:type)) }
|
64
63
|
)
|
65
64
|
],
|
66
65
|
need_for_checks: false,
|
@@ -71,7 +70,7 @@ module Servactory
|
|
71
70
|
)
|
72
71
|
end
|
73
72
|
|
74
|
-
def add_hash_option_with(
|
73
|
+
def add_hash_option_with(options) # rubocop:disable Metrics/MethodLength
|
75
74
|
collection_of_options << Servactory::Maintenance::Attributes::Option.new(
|
76
75
|
name: :schema,
|
77
76
|
attribute: self,
|
@@ -79,7 +78,7 @@ module Servactory
|
|
79
78
|
define_methods: [
|
80
79
|
Servactory::Maintenance::Attributes::DefineMethod.new(
|
81
80
|
name: :hash_mode?,
|
82
|
-
content: ->(**) { hash_mode_class_names.include?(type) }
|
81
|
+
content: ->(**) { hash_mode_class_names.include?(options.fetch(:type)) }
|
83
82
|
)
|
84
83
|
],
|
85
84
|
need_for_checks: false,
|
data/lib/servactory/version.rb
CHANGED
data/lib/servactory.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: servactory
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.
|
22
|
+
version: '7.2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '6.0'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.
|
32
|
+
version: '7.2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: i18n
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +58,20 @@ dependencies:
|
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
60
|
version: '2.6'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: appraisal
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '2.5'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '2.5'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: pry
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -294,9 +314,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
314
|
version: 2.7.0
|
295
315
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
316
|
requirements:
|
297
|
-
- - "
|
317
|
+
- - ">="
|
298
318
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
319
|
+
version: '0'
|
300
320
|
requirements: []
|
301
321
|
rubygems_version: 3.4.17
|
302
322
|
signing_key:
|