metanorma-iec 2.0.8 → 2.1.2

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.
@@ -23,7 +23,7 @@ RSpec.describe Metanorma::Iec do
23
23
  <pagebreak/></sections>
24
24
  </iec-standard>
25
25
  OUTPUT
26
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
26
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
27
27
  .to be_equivalent_to xmlpp(output)
28
28
  end
29
29
 
@@ -43,7 +43,7 @@ RSpec.describe Metanorma::Iec do
43
43
  </sections>
44
44
  </iec-standard>
45
45
  OUTPUT
46
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
46
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
47
47
  .to be_equivalent_to xmlpp(output)
48
48
  end
49
49
 
@@ -59,7 +59,7 @@ RSpec.describe Metanorma::Iec do
59
59
  </sections>
60
60
  </iec-standard>
61
61
  OUTPUT
62
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
62
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
63
63
  .to be_equivalent_to xmlpp(output)
64
64
  end
65
65
 
@@ -87,7 +87,7 @@ RSpec.describe Metanorma::Iec do
87
87
  </sections>
88
88
  </iec-standard>
89
89
  OUTPUT
90
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
90
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
91
91
  .to be_equivalent_to xmlpp(output)
92
92
  end
93
93
 
@@ -121,7 +121,7 @@ RSpec.describe Metanorma::Iec do
121
121
  </bibliography>
122
122
  </iec-standard>
123
123
  OUTPUT
124
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
124
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
125
125
  .to be_equivalent_to xmlpp(output)
126
126
  end
127
127
 
@@ -139,7 +139,7 @@ RSpec.describe Metanorma::Iec do
139
139
  </sections>
140
140
  </iec-standard>
141
141
  OUTPUT
142
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, OPTIONS))))
142
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
143
143
  .to be_equivalent_to xmlpp(output)
144
144
  end
145
145
  end
data/spec/spec_helper.rb CHANGED
@@ -37,6 +37,13 @@ def strip_guid(xml)
37
37
  end
38
38
 
39
39
  def xmlpp(xml)
40
+ c = HTMLEntities.new
41
+ xml &&= xml.split(/(&\S+?;)/).map do |n|
42
+ if /^&\S+?;$/.match?(n)
43
+ c.encode(c.decode(n), :hexadecimal)
44
+ else n
45
+ end
46
+ end.join
40
47
  s = ""
41
48
  f = REXML::Formatters::Pretty.new(2)
42
49
  f.compact = true
@@ -167,8 +174,9 @@ BLANK_HDR = <<~"HDR".freeze
167
174
  </owner>
168
175
  </copyright>
169
176
  <ext>
170
- <doctype>article</doctype>
177
+ <doctype>standard</doctype>
171
178
  <editorialgroup>
179
+ <agency>IEC</agency>
172
180
  <technical-committee/>
173
181
  <subcommittee/>
174
182
  <workgroup/>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 2.1.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: 2.1.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-jing
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -298,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
298
298
  - !ruby/object:Gem::Version
299
299
  version: '0'
300
300
  requirements: []
301
- rubygems_version: 3.3.9
301
+ rubygems_version: 3.3.7
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: metanorma-iec lets you write IEC standards in AsciiDoc.