dsl_compose 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/dsl_compose/interpreter/execution/arguments.rb +0 -2
- data/lib/dsl_compose/interpreter/execution/method_calls.rb +2 -2
- data/lib/dsl_compose/interpreter/execution.rb +2 -2
- data/lib/dsl_compose/interpreter.rb +2 -2
- data/lib/dsl_compose/parser/for_children_of_parser/for_dsl_parser/for_method_parser.rb +2 -2
- data/lib/dsl_compose/parser/for_children_of_parser/for_dsl_parser.rb +2 -2
- data/lib/dsl_compose/parser/for_children_of_parser.rb +2 -2
- 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: 5ab97e49cd1581273bc3555e75d7610cab0764024f5c87445cf7da2f48af97d4
|
4
|
+
data.tar.gz: bc8e659445fad939868276749ae23c8e5cd3a44d7afb45989d4cd5dac4b487a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e7e18eec99d3b458d1a03e5a9feff3aad70696318d706bf17064646ceeb152d45f4b0b954aef83cb5edcf501502d76821a44c2da58f88d60a91cba31ae18c70
|
7
|
+
data.tar.gz: 8412d42847af88966b8e523ccda0c37f2724d71c319b244cb1a1f206694899b0cad65e5aaf48d9252e597dd9c1afc8ae50f3bc13e6d4b0459669340f7d242dbb
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.6.1](https://github.com/craigulliott/dsl_compose/compare/v2.6.0...v2.6.1) (2023-08-29)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* renaming `description` to `add_documentation` for dynamically creating documentation from within parsers ([3e24194](https://github.com/craigulliott/dsl_compose/commit/3e2419492e61d94ea7d3c1f34ef4990fc0f6682a))
|
9
|
+
|
3
10
|
## [2.6.0](https://github.com/craigulliott/dsl_compose/compare/v2.5.2...v2.6.0) (2023-08-23)
|
4
11
|
|
5
12
|
|
@@ -148,7 +148,6 @@ module DSLCompose
|
|
148
148
|
else
|
149
149
|
optional_arg_value
|
150
150
|
end
|
151
|
-
|
152
151
|
rescue => e
|
153
152
|
raise e, "Error processing optional argument #{optional_argument_name}: #{e.message}", e.backtrace
|
154
153
|
end
|
@@ -239,7 +238,6 @@ module DSLCompose
|
|
239
238
|
else
|
240
239
|
required_arg_value
|
241
240
|
end
|
242
|
-
|
243
241
|
rescue => e
|
244
242
|
raise e, "Error processing required argument #{argument_name}: #{e.message}", e.backtrace
|
245
243
|
end
|
@@ -14,12 +14,12 @@ module DSLCompose
|
|
14
14
|
@method_calls.filter { |mc| mc.method_name == method_name }.any?
|
15
15
|
end
|
16
16
|
|
17
|
-
def add_method_call
|
17
|
+
def add_method_call(dsl_method, ...)
|
18
18
|
# make sure we always have a variable which can be used in the exception message
|
19
19
|
dsl_method_name = nil
|
20
20
|
dsl_method_name = dsl_method.name
|
21
21
|
|
22
|
-
method_call = MethodCall.new(dsl_method,
|
22
|
+
method_call = MethodCall.new(dsl_method, ...)
|
23
23
|
@method_calls << method_call
|
24
24
|
method_call
|
25
25
|
rescue => e
|
@@ -59,7 +59,7 @@ module DSLCompose
|
|
59
59
|
private
|
60
60
|
|
61
61
|
# catch and process any method calls within the DSL block
|
62
|
-
def method_missing
|
62
|
+
def method_missing(method_name, ...)
|
63
63
|
# if the method does not exist, then this will raise a MethodDoesNotExistError
|
64
64
|
dsl_method = @dsl.dsl_method method_name
|
65
65
|
|
@@ -68,7 +68,7 @@ module DSLCompose
|
|
68
68
|
raise MethodIsUniqueError, "This method `#{method_name}` is unique and can only be called once within this DSL"
|
69
69
|
end
|
70
70
|
|
71
|
-
@method_calls.add_method_call
|
71
|
+
@method_calls.add_method_call(dsl_method, ...)
|
72
72
|
end
|
73
73
|
|
74
74
|
def respond_to_missing?(method_name, *args)
|
@@ -40,14 +40,14 @@ module DSLCompose
|
|
40
40
|
# Execute/process a dynamically defined DSL on a class.
|
41
41
|
# `klass` is the class in which the DSL is being used, not
|
42
42
|
# the class in which the DSL was defined.
|
43
|
-
def execute_dsl
|
43
|
+
def execute_dsl(klass, dsl, ...)
|
44
44
|
# make sure we have these variables for the exception message below
|
45
45
|
class_name = nil
|
46
46
|
class_name = klass.name
|
47
47
|
dsl_name = nil
|
48
48
|
dsl_name = dsl.name
|
49
49
|
|
50
|
-
execution = Execution.new(klass, dsl,
|
50
|
+
execution = Execution.new(klass, dsl, ...)
|
51
51
|
@executions << execution
|
52
52
|
execution
|
53
53
|
rescue => e
|
@@ -107,8 +107,8 @@ module DSLCompose
|
|
107
107
|
# takes a description of what this parser does and stores it against the DSL definition
|
108
108
|
# of the current @child_class, this is used to generate documentation for what the parser
|
109
109
|
# has done with the DSL
|
110
|
-
def
|
111
|
-
@method_call.add_parser_usage_note
|
110
|
+
def add_documentation documentation
|
111
|
+
@method_call.add_parser_usage_note documentation
|
112
112
|
end
|
113
113
|
end
|
114
114
|
end
|
@@ -142,8 +142,8 @@ module DSLCompose
|
|
142
142
|
# takes a description of what this parser does and stores it against the DSL definition
|
143
143
|
# of the current @child_class, this is used to generate documentation for what the parser
|
144
144
|
# has done with the DSL
|
145
|
-
def
|
146
|
-
@dsl_execution.add_parser_usage_note
|
145
|
+
def add_documentation documentation
|
146
|
+
@dsl_execution.add_parser_usage_note documentation
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
@@ -125,8 +125,8 @@ module DSLCompose
|
|
125
125
|
# takes a description of what this parser does and stores it against the DSL definition
|
126
126
|
# of the current @child_class, this is used to generate documentation for what the parser
|
127
127
|
# has done with the DSL
|
128
|
-
def
|
129
|
-
@base_class.dsls.add_parser_usage_note @child_class,
|
128
|
+
def add_documentation documentation
|
129
|
+
@base_class.dsls.add_parser_usage_note @child_class, documentation
|
130
130
|
end
|
131
131
|
end
|
132
132
|
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.6.
|
4
|
+
version: 2.6.1
|
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-08-
|
11
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: class_spec_helper
|