dsl_compose 2.14.1 → 2.14.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/dsl_compose/interpreter/execution/arguments.rb +8 -3
- data/lib/dsl_compose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddbe8b1e65763bba6eb8893aae605c7a3767c2d14f5aa5e120340cca933c6b1b
|
4
|
+
data.tar.gz: bdec4caaf6784bb0721fbd00593b0112d79f9fbf9c807f97bb89c3c713341053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81c959506de138f0d4598d152d5d9b66756e0018bb0cee870fc749a49cbdcca6132c4252b7cb0c38308c517ead07102fe644ac12301aff743d3054e32efff404
|
7
|
+
data.tar.gz: 4f02a341c854c005c2212b6387b40f5ce805fe1c5aabf277d69ce91b0d85e34cb003c805d6fad3681b33964c5cc8c6952216d2152b57165ade6e793db242ad4e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.14.3](https://github.com/craigulliott/dsl_compose/compare/v2.14.2...v2.14.3) (2023-09-27)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* better error if passing a scalar arg instead of kwargs ([7a47775](https://github.com/craigulliott/dsl_compose/commit/7a47775e7b13329c82c2497a017d2d67c5c56d75))
|
9
|
+
|
10
|
+
## [2.14.2](https://github.com/craigulliott/dsl_compose/compare/v2.14.1...v2.14.2) (2023-09-11)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* freezing default arguments so that code within parsers can not modify the underlying values ([12674de](https://github.com/craigulliott/dsl_compose/commit/12674def81b7370f7e06b8036fea308dff95f30d))
|
16
|
+
|
3
17
|
## [2.14.1](https://github.com/craigulliott/dsl_compose/compare/v2.14.0...v2.14.1) (2023-09-11)
|
4
18
|
|
5
19
|
|
@@ -38,6 +38,11 @@ module DSLCompose
|
|
38
38
|
|
39
39
|
# process all the required arguments which are kwargs
|
40
40
|
required_kwargs = arguments.required_arguments.filter { |a| a.kwarg }
|
41
|
+
|
42
|
+
if required_kwargs.any? && !all_kwargs.is_a?(Hash)
|
43
|
+
raise MissingRequiredArgumentsError, "This has required keyword arguments, but no keyword arguments were provided"
|
44
|
+
end
|
45
|
+
|
41
46
|
required_kwargs.each do |required_kwarg|
|
42
47
|
if all_kwargs.key? required_kwarg.name
|
43
48
|
# add the keyword argument to the required args
|
@@ -73,7 +78,7 @@ module DSLCompose
|
|
73
78
|
# unless the argument is an array or a boolean, in which case it defaults
|
74
79
|
# to an empty array or false
|
75
80
|
if optional_argument.array
|
76
|
-
@arguments[optional_argument.name] = []
|
81
|
+
@arguments[optional_argument.name] = [].freeze
|
77
82
|
elsif optional_argument.type == :boolean
|
78
83
|
@arguments[optional_argument.name] = false
|
79
84
|
end
|
@@ -164,7 +169,7 @@ module DSLCompose
|
|
164
169
|
# If the argument accepts an array of values, then automatically convert valid singular values
|
165
170
|
# into an array.
|
166
171
|
@arguments[optional_argument_name] = if optional_argument.array && !optional_arg_value.is_a?(Array)
|
167
|
-
[optional_arg_value]
|
172
|
+
[optional_arg_value].freeze
|
168
173
|
else
|
169
174
|
optional_arg_value
|
170
175
|
end
|
@@ -254,7 +259,7 @@ module DSLCompose
|
|
254
259
|
# If the argument accepts an array of values, then automatically convert valid singular values
|
255
260
|
# into an array.
|
256
261
|
@arguments[argument_name] = if required_argument.array && !required_arg_value.is_a?(Array)
|
257
|
-
[required_arg_value]
|
262
|
+
[required_arg_value].freeze
|
258
263
|
else
|
259
264
|
required_arg_value
|
260
265
|
end
|
data/lib/dsl_compose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsl_compose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.14.
|
4
|
+
version: 2.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig Ulliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: class_spec_helper
|