dsl_compose 1.14.0 → 1.14.2
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/README.md +27 -0
- data/lib/dsl_compose/interpreter.rb +5 -3
- data/lib/dsl_compose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 623399acb76c51f12e07ed2ac76358334298cd9714a222ad271a3c90b1cc2aa2
|
4
|
+
data.tar.gz: 42069e337ec7435aea513ffd42f7303d62d62900f84de3e9822129e895fb3e92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a68c4971e5ac2057e31df63d28ec097c9f5a0ceaca2dc80d9a5997e50373218831c5aeb3733d9b005b9cb2a849d30065e28b5844e376e2fc8093667cf12cf887
|
7
|
+
data.tar.gz: '097c77a640d68e46057911d0b75067fd215d251e6fc218982ee8f4d37ff315cb87e3e6f1db1079806d881018ef84a900f1cd17178b04f20616127bb56545750a'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.14.2](https://github.com/craigulliott/dsl_compose/compare/v1.14.1...v1.14.2) (2023-07-19)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* fixed parser usage notes not being cleared as expected ([#43](https://github.com/craigulliott/dsl_compose/issues/43)) ([3d31ab1](https://github.com/craigulliott/dsl_compose/commit/3d31ab1a8dc238144749c18847d5e655461fca06))
|
9
|
+
|
10
|
+
## [1.14.1](https://github.com/craigulliott/dsl_compose/compare/v1.14.0...v1.14.1) (2023-07-19)
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* Clearing the parser_usage_notes when also clearing the DSLs. ([#41](https://github.com/craigulliott/dsl_compose/issues/41)) ([bbdb445](https://github.com/craigulliott/dsl_compose/commit/bbdb445ed9fa4b495f8aa5bf0b889707680858d0))
|
16
|
+
|
3
17
|
## [1.14.0](https://github.com/craigulliott/dsl_compose/compare/v1.13.1...v1.14.0) (2023-07-19)
|
4
18
|
|
5
19
|
|
data/README.md
CHANGED
@@ -247,6 +247,16 @@ MyParser < DSLCompose::Parser
|
|
247
247
|
# which extend the provided base class, but do not have their own children) then
|
248
248
|
# use `for_final_children_of` instead of `for_children_of`
|
249
249
|
for_children_of SomeBaseClass do |child_class:|
|
250
|
+
description <<-DESCRIPTION
|
251
|
+
You can optionally provide a description of anything specific that your parser
|
252
|
+
does in this block, this description will be used when generating documentation
|
253
|
+
|
254
|
+
This description accepts markdown.
|
255
|
+
|
256
|
+
Do not add a description here if the parser does not have any business logic here
|
257
|
+
other than making calls to `for_dsl`, `for_dsl_or_inherited_dsl` or `for_inherited_dsl`
|
258
|
+
DESCRIPTION
|
259
|
+
|
250
260
|
# `for_dsl` accepts a DSL name or an array of DSL names and will yield it's
|
251
261
|
# provided block once for each time a DSL of that name has been used
|
252
262
|
# directly on the child_class.
|
@@ -266,6 +276,16 @@ MyParser < DSLCompose::Parser
|
|
266
276
|
# consider a DSL to have been executed on the actual class it was used, and
|
267
277
|
# any classes which are descendants of that class
|
268
278
|
for_dsl [:dsl1, :dsl2] do |dsl_name:, a_dsl_argument:|
|
279
|
+
description <<-DESCRIPTION
|
280
|
+
You can optionally provide a description of anything specific that your parser
|
281
|
+
does in this block, this description will be used when generating documentation.
|
282
|
+
|
283
|
+
This description accepts markdown.
|
284
|
+
|
285
|
+
Do not add a description here if the parser does not have any business logic here
|
286
|
+
other than making calls to `for_method`
|
287
|
+
DESCRIPTION
|
288
|
+
|
269
289
|
# `for_method` accepts a method name or an array of method names and will
|
270
290
|
# yield it's provided block once for each time a method with this name is
|
271
291
|
# executed within the DSL.
|
@@ -277,6 +297,13 @@ MyParser < DSLCompose::Parser
|
|
277
297
|
# are provided then the requested dsl argument must be present on all DSLs
|
278
298
|
# otherwise an error will be raised.
|
279
299
|
for_method :some_method_name do |method_name:, a_method_argument:|
|
300
|
+
description <<-DESCRIPTION
|
301
|
+
You can optionally provide a description of anything specific that your parser
|
302
|
+
does in this block, this description will be used when generating documentation.
|
303
|
+
|
304
|
+
This description accepts markdown.
|
305
|
+
DESCRIPTION
|
306
|
+
|
280
307
|
# your business logic goes here
|
281
308
|
...
|
282
309
|
end
|
@@ -61,11 +61,13 @@ module DSLCompose
|
|
61
61
|
@executions.filter { |e| e.dsl.name == dsl_name && ((on_current_class && e.klass == klass) || (on_ancestor_class && klass < e.klass)) }
|
62
62
|
end
|
63
63
|
|
64
|
-
# removes all executions from the interpreter,
|
65
|
-
# within a test suite when dynamically creating
|
66
|
-
# wanting to clear the interpreter before the
|
64
|
+
# removes all executions from the interpreter, and any parser_usage_notes
|
65
|
+
# this is primarily used from within a test suite when dynamically creating
|
66
|
+
# classes for tests and then wanting to clear the interpreter before the
|
67
|
+
# next test.
|
67
68
|
def clear
|
68
69
|
@executions = []
|
70
|
+
@parser_usage_notes = {}
|
69
71
|
end
|
70
72
|
|
71
73
|
def to_h dsl_name
|
data/lib/dsl_compose/version.rb
CHANGED