dsl_compose 1.14.0 → 1.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fe38926f435f6f7978468bb08e0b91ebbd6962d5863032a7cb49095856c3c50
4
- data.tar.gz: c4523746ddbef25e5c64e8b47ea624393d6efa25f0c6b795a0d69ea7910d2683
3
+ metadata.gz: ddb7398a7cd392f48c54e7ee60404342857d7d010247926ca006d84ad5caa1ac
4
+ data.tar.gz: d4515e288a0eea8be71a869434c1f28a20f2cec3943a33c9c6615028b223b970
5
5
  SHA512:
6
- metadata.gz: ef54cc72949be0609a9bd1feacad07b202c90b183f6be89c6494c19a95944639ccc0cba3986375a16234803aa96f4e90721abc2308fa75e20ace407504bfedce
7
- data.tar.gz: 4143b1a1d0d84597da9fa29ef745a9ca0002fc4bc6107a9206b700453f511cdc1e7a0bc6eea16af69e169cc3c220ff43bbbdd5b8603df58704bcc9d51fa5d58b
6
+ metadata.gz: 8512aec08f472d946b2c9a84b6e824bbc1d46db610f3bb908766e05a324833e3c07feeb05638153633d23bccbe1f0e66e8132721e7056e903beaed1a42ef866c
7
+ data.tar.gz: a2897b08ed6b226a06c8fbf2e07277b68fc1476b7467db663c06acacaa3a1e92db64b3aaac782fb2ada0657605dfecccb47bce6517339d60a49016a48ccd9726
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.14.1](https://github.com/craigulliott/dsl_compose/compare/v1.14.0...v1.14.1) (2023-07-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * 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))
9
+
3
10
  ## [1.14.0](https://github.com/craigulliott/dsl_compose/compare/v1.13.1...v1.14.0) (2023-07-19)
4
11
 
5
12
 
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, this is primarily used from
65
- # within a test suite when dynamically creating classes for tests and then
66
- # wanting to clear the interpreter before the next test.
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DSLCompose
4
- VERSION = "1.14.0"
4
+ VERSION = "1.14.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dsl_compose
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.0
4
+ version: 1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig Ulliott