dsl_compose 2.7.0 → 2.8.0
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/CHANGELOG.md +7 -0
- data/lib/dsl_compose/parser.rb +20 -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: c6fea0a926ea88fad5e75633a95629a75105580958b512baae3362c47aa2384c
|
4
|
+
data.tar.gz: '03486a86365c848b0815d768eb7de00478bebeb8b87d9412a4b06db67857ebcd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 550d159aca95511d2409fb085ba865f9230ac67fb29ddece4e2f7bbfcf054033e8ce598d6f2ff00d088c27a266c14fdaf1f4405808a6a99fe7ed6888bfeef6a8
|
7
|
+
data.tar.gz: 69c5444f0064dbe31a3da9be2a0712fc419758d3ca661ecf70a22429e80d4581e451a1840a28a7fc2d44902b183d20dc9069036d0f062ad78465de6c58a86a4c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [2.8.0](https://github.com/craigulliott/dsl_compose/compare/v2.7.0...v2.8.0) (2023-08-31)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* adding a rerun_all singleton method to re-execute all parsers in the system (useful from within specs) ([d0c4ee3](https://github.com/craigulliott/dsl_compose/commit/d0c4ee3cc41da45e774a17ab9d57990dbbf59603))
|
9
|
+
|
3
10
|
## [2.7.0](https://github.com/craigulliott/dsl_compose/compare/v2.6.1...v2.7.0) (2023-08-29)
|
4
11
|
|
5
12
|
|
data/lib/dsl_compose/parser.rb
CHANGED
@@ -32,12 +32,17 @@ module DSLCompose
|
|
32
32
|
# children of their own)
|
33
33
|
def self.for_children_of base_class, final_children_only: false, rerun: false, &block
|
34
34
|
unless rerun
|
35
|
-
|
36
|
-
@runs << {
|
35
|
+
run = {
|
37
36
|
base_class: base_class,
|
38
37
|
final_children_only: final_children_only,
|
39
38
|
block: block
|
40
39
|
}
|
40
|
+
|
41
|
+
@@all_runs ||= []
|
42
|
+
@@all_runs << run
|
43
|
+
|
44
|
+
@runs ||= []
|
45
|
+
@runs << run
|
41
46
|
end
|
42
47
|
|
43
48
|
# we parse the provided block in the context of the ForChildrenOfParser class
|
@@ -56,7 +61,7 @@ module DSLCompose
|
|
56
61
|
# this method is used to rerun the parser, this is most useful from within a test suite
|
57
62
|
# when you are testing the parser itself
|
58
63
|
def self.rerun
|
59
|
-
# rerun each
|
64
|
+
# rerun each parser for this specific class
|
60
65
|
@runs&.each do |run|
|
61
66
|
base_class = run[:base_class]
|
62
67
|
block = run[:block]
|
@@ -64,5 +69,17 @@ module DSLCompose
|
|
64
69
|
for_children_of base_class, rerun: true, final_children_only: final_children_only, &block
|
65
70
|
end
|
66
71
|
end
|
72
|
+
|
73
|
+
# this method is used to rerun all of the parsers, this is most useful from within a test suite
|
74
|
+
# when you are testing the parser itself
|
75
|
+
def self.rerun_all
|
76
|
+
# rerun each parser for all classes (call this method directly on the parser object `DSLCompose::Parser.rerun_all`)
|
77
|
+
@all_runs&.each do |run|
|
78
|
+
base_class = run[:base_class]
|
79
|
+
block = run[:block]
|
80
|
+
final_children_only = run[:final_children_only]
|
81
|
+
for_children_of base_class, rerun: true, final_children_only: final_children_only, &block
|
82
|
+
end
|
83
|
+
end
|
67
84
|
end
|
68
85
|
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.
|
4
|
+
version: 2.8.0
|
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-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: class_spec_helper
|