slaw 4.1.0 → 4.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7b2b24c5c8bd91ce9c0a852f6bec6c81e3719830d65f9e0691044b303d019b7
4
- data.tar.gz: cf91c1517334866b6a9f8c62baed484c8ef8a35c10d0c3e1fc42ae104382e37c
3
+ metadata.gz: 872b9abcfdb880f255e429e07a51f465a86b1ce640639146066220f954baed9d
4
+ data.tar.gz: 5cc6f53df26d3893959d056dca4df32fa2328820975b0d3d1f5b02259b7e2bf5
5
5
  SHA512:
6
- metadata.gz: 9e123803b17d5ad1c4d6530daad110715312f83f83901bbc0bac859af3dee15a4345964a9e4b0fd83795c7ff4595d69ed58afab8bc333b2650c2d77316e4dfd7
7
- data.tar.gz: da86501ff2f5854d3433ac8a9c87613dd534ce2581206eb99984d2deeec2655da32980905bbf44bdc66723c17f03e13aff488b11f45d0672c5712968fcc9e12b
6
+ metadata.gz: ac9b7e1c43cfcabff3035c510f102cf7e0b43148234527ff0f6f093efaf43ef197197d3be07fb492449f96f95629b104ec5bfd33f2b1437302531f81ad8f77cb
7
+ data.tar.gz: 0ddb2245be02b53d08fc03bca1be7616a1cd100518686aa555c2a2fdc341408fdb0f59208685b07d15520c01461a116aefadbdc39ef52d3ab152a41288e3815a
data/README.md CHANGED
@@ -81,6 +81,10 @@ You can create your own grammar by creating a gem that provides these files and
81
81
 
82
82
  ## Changelog
83
83
 
84
+ ### 4.2.0 (7 Sept 2019)
85
+
86
+ * BODY is allowed to be empty
87
+
84
88
  ### 4.1.0 (4 June 2019)
85
89
 
86
90
  * BODY marks start of body
@@ -42,7 +42,7 @@ module Slaw
42
42
 
43
43
  rule body
44
44
  ('BODY' space? eol)?
45
- children:(chapter / part / section / subsection / generic_container)+ <Body>
45
+ children:(chapter / part / section / subsection / generic_container)* <Body>
46
46
  end
47
47
 
48
48
  rule chapter
data/lib/slaw/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Slaw
2
- VERSION = "4.1.0"
2
+ VERSION = "4.2.0"
3
3
  end
@@ -169,6 +169,31 @@ EOS
169
169
  </section>
170
170
  </body>'
171
171
  end
172
+
173
+ it 'should handle no body and a schedule' do
174
+ node = parse :act, <<EOS
175
+ this is in the preface
176
+
177
+ SCHEDULE
178
+
179
+ some stuff
180
+ EOS
181
+
182
+ b = ::Nokogiri::XML::Builder.new
183
+ b.root do |b|
184
+ node.to_xml(b)
185
+ end
186
+ xml = b.to_xml(encoding: 'UTF-8')
187
+
188
+ xml.should include('<body/>')
189
+ end
190
+
191
+ it 'should handle an empty body' do
192
+ node = parse :body, <<EOS
193
+ EOS
194
+
195
+ to_xml(node).should == '<body/>'
196
+ end
172
197
  end
173
198
 
174
199
  #-------------------------------------------------------------------------------
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slaw
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0
4
+ version: 4.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kempe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-04 00:00:00.000000000 Z
11
+ date: 2019-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake