metanorma-iec 1.3.11 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -96,94 +96,6 @@ end
96
96
  OUTPUT
97
97
  end
98
98
 
99
- it "processes stem-only terms as admitted" do
100
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
101
- #{ASCIIDOC_BLANK_HDR}
102
- == Terms and Definitions
103
-
104
- === stem:[t_90]
105
-
106
- stem:[t_91]
107
-
108
- Time
109
- INPUT
110
- #{@blank_hdr}
111
- <sections>
112
- <terms id="_" obligation="normative">
113
- <title>Terms and definitions</title>
114
- <p id="_">For the purposes of this document,
115
- the following terms and definitions apply.</p>
116
- #{TERMS_BOILERPLATE}
117
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
118
- <mi>t</mi>
119
- </mrow>
120
- <mrow>
121
- <mn>90</mn>
122
- </mrow>
123
- </msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
124
- <mi>t</mi>
125
- </mrow>
126
- <mrow>
127
- <mn>91</mn>
128
- </mrow>
129
- </msub></math></stem></admitted>
130
- <definition><p id="_">Time</p></definition></term>
131
- </terms>
132
- </sections>
133
- </iec-standard>
134
- OUTPUT
135
- end
136
-
137
- it "permits multiple blocks in term definition paragraph" do
138
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
139
- = Document title
140
- Author
141
- :docfile: test.adoc
142
- :nodoc:
143
- :novalid:
144
- :stem:
145
- :no-isobib:
146
-
147
- == Terms and Definitions
148
-
149
- === stem:[t_90]
150
-
151
- [stem]
152
- ++++
153
- t_A
154
- ++++
155
-
156
- This paragraph is extraneous
157
- INPUT
158
- #{@blank_hdr}
159
- <sections>
160
- <terms id="_" obligation="normative">
161
- <title>Terms and definitions</title>
162
- <p id="_">For the purposes of this document,
163
- the following terms and definitions apply.</p>
164
- #{TERMS_BOILERPLATE}
165
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
166
- <mi>t</mi>
167
- </mrow>
168
- <mrow>
169
- <mn>90</mn>
170
- </mrow>
171
- </msub></math></stem></preferred><definition><formula id="_">
172
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
173
- <mi>t</mi>
174
- </mrow>
175
- <mrow>
176
- <mi>A</mi>
177
- </mrow>
178
- </msub></math></stem>
179
- </formula><p id="_">This paragraph is extraneous</p></definition>
180
- </term>
181
- </terms>
182
- </sections>
183
- </iec-standard>
184
- OUTPUT
185
- end
186
-
187
99
  it "keeps any initial boilerplate from terms and definitions" do
188
100
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
189
101
  #{ASCIIDOC_BLANK_HDR}
@@ -210,8 +122,8 @@ end
210
122
  </li>
211
123
  </ul>
212
124
  <term id="term-time">
213
- <preferred>Time</preferred>
214
- <definition><p id="_">This paragraph is extraneous</p></definition>
125
+ <preferred><expression><name>Time</name></expression></preferred>
126
+ <definition><verbaldefinition><p id="_">This paragraph is extraneous</p></verbaldefinition></definition>
215
127
  </term></terms>
216
128
  </sections>
217
129
  </iec-standard>
@@ -254,38 +166,6 @@ end
254
166
  OUTPUT
255
167
  end
256
168
 
257
- it "processes localities in term sources" do
258
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
259
- #{ASCIIDOC_BLANK_HDR}
260
- == Terms and Definitions
261
-
262
- === Term1
263
-
264
- [.source]
265
- <<ISO2191,section=1>>
266
- INPUT
267
- #{@blank_hdr}
268
- <sections>
269
- <terms id="_" obligation="normative">
270
- <title>Terms and definitions</title>
271
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
272
- #{TERMS_BOILERPLATE}
273
- <term id="term-term1">
274
- <preferred>Term1</preferred>
275
- <termsource status="identical">
276
- <origin bibitemid="ISO2191" type="inline" citeas="">
277
- <localityStack>
278
- <locality type="section"><referenceFrom>1</referenceFrom></locality>
279
- </localityStack>
280
- </origin>
281
- </termsource>
282
- </term>
283
- </terms>
284
- </sections>
285
- </iec-standard>
286
- OUTPUT
287
- end
288
-
289
169
  it "removes extraneous material from Normative References" do
290
170
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
291
171
  #{ASCIIDOC_BLANK_HDR}
@@ -9,7 +9,7 @@ end
9
9
 
10
10
 
11
11
  it "generates reference boilerplate for IEV" do
12
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
12
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
13
13
  = Document title
14
14
  Author
15
15
  :docfile: test.adoc
@@ -90,7 +90,7 @@ end
90
90
  end
91
91
 
92
92
  it "generates terms boilerplate for IEV" do
93
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
93
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
94
94
  = Document title
95
95
  Author
96
96
  :docfile: test.adoc
@@ -157,7 +157,7 @@ INPUT
157
157
  <terms id='_' obligation='normative'>
158
158
  <title>General</title>
159
159
  <term id='term-term-1'>
160
- <preferred>Term 1</preferred>
160
+ <preferred><expression><name>Term 1</name></expression></preferred>
161
161
  </term>
162
162
  </terms>
163
163
  </clause>
@@ -168,7 +168,7 @@ OUTPUT
168
168
  end
169
169
 
170
170
  it "uses IEV introduction title" do
171
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
171
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
172
172
  = Document title
173
173
  Author
174
174
  :docfile: test.adoc
@@ -5,51 +5,6 @@ RSpec.describe Asciidoctor::Iec do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
7
7
 
8
- it "processes inline_quoted formatting" do
9
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
10
- #{ASCIIDOC_BLANK_HDR}
11
- _emphasis_
12
- *strong*
13
- `monospace`
14
- "double quote"
15
- 'single quote'
16
- super^script^
17
- sub~script~
18
- stem:[a_90]
19
- stem:[<mml:math><mml:msub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">F</mml:mi> </mml:mrow> </mml:mrow> <mml:mrow> <mml:mrow> <mml:mi mathvariant="bold-italic">&#x391;</mml:mi> </mml:mrow> </mml:mrow> </mml:msub> </mml:math>]
20
- [alt]#alt#
21
- [deprecated]#deprecated#
22
- [domain]#domain#
23
- [strike]#strike#
24
- [smallcap]#smallcap#
25
- INPUT
26
- #{@blank_hdr}
27
- <sections>
28
- <em>emphasis</em>
29
- <strong>strong</strong>
30
- <tt>monospace</tt>
31
- “double quote”
32
- ‘single quote’
33
- super<sup>script</sup>
34
- sub<sub>script</sub>
35
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
36
- <mi>a</mi>
37
- </mrow>
38
- <mrow>
39
- <mn>90</mn>
40
- </mrow>
41
- </msub></math></stem>
42
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
43
- <admitted>alt</admitted>
44
- <deprecates>deprecated</deprecates>
45
- <domain>domain</domain>
46
- <strike>strike</strike>
47
- <smallcap>smallcap</smallcap>
48
- </sections>
49
- </iec-standard>
50
- OUTPUT
51
- end
52
-
53
8
  it "processes breaks" do
54
9
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
55
10
  #{ASCIIDOC_BLANK_HDR}
@@ -75,13 +75,13 @@ end
75
75
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
76
76
  #{TERMS_BOILERPLATE}
77
77
  <term id="term-term1">
78
- <preferred>Term1</preferred>
78
+ <preferred><expression><name>Term1</name></expression></preferred>
79
79
  </term>
80
80
  </terms>
81
81
  <clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
82
82
  <title>Normal Terms</title>
83
83
  <term id="term-term2">
84
- <preferred>Term2</preferred>
84
+ <preferred><expression><name>Term2</name></expression></preferred>
85
85
  </term>
86
86
  </terms>
87
87
  <definitions id="_" obligation="normative"><title>Symbols and abbreviated terms</title></definitions></clause>
@@ -197,7 +197,7 @@ end
197
197
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
198
198
  #{TERMS_BOILERPLATE}
199
199
  <term id="term-term1">
200
- <preferred>Term1</preferred>
200
+ <preferred><expression><name>Term1</name></expression></preferred>
201
201
  </term>
202
202
  </terms>
203
203
  <clause id='_' obligation='normative'>
@@ -205,7 +205,7 @@ end
205
205
  <terms id='_' obligation='normative'>
206
206
  <title>Normal Terms</title>
207
207
  <term id='term-term2'>
208
- <preferred>Term2</preferred>
208
+ <preferred><expression><name>Term2</name></expression></preferred>
209
209
  </term>
210
210
  </terms>
211
211
  <definitions id='_' obligation="normative">
@@ -242,7 +242,7 @@ RSpec.describe IsoDoc do
242
242
  <clause id="_terms_and_definitions" obligation="normative"><title>Terms and definitions</title>
243
243
  <terms id="_general" obligation="normative"><title>General</title>
244
244
  <term id="paddy1"><preferred>paddy</preferred>
245
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
245
+ <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
246
246
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
247
247
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
248
248
  <ul>
@@ -264,7 +264,7 @@ RSpec.describe IsoDoc do
264
264
  <admitted>rough rice</admitted>
265
265
  <deprecates>cargo rice</deprecates>
266
266
  <domain>rice</domain>
267
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
267
+ <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
268
268
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
269
269
  <ul>
270
270
  <li>A</li>
@@ -452,7 +452,7 @@ RSpec.describe IsoDoc do
452
452
  <clause id="_terms_and_definitions" obligation="normative" displayorder="1"><title>Terms and definitions</title>
453
453
  <terms id="_general" obligation="normative"><title>General</title>
454
454
  <term id="paddy1"><preferred>paddy</preferred>
455
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
455
+ <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
456
456
  <termsource status="modified">
457
457
  <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
458
458
  <modification>
@@ -9,7 +9,7 @@ RSpec.describe IsoDoc do
9
9
 
10
10
  <term id="paddy1"><preferred>paddy</preferred>
11
11
  <domain>rice</domain>
12
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
12
+ <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
13
13
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
14
14
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
15
15
  <ul>
@@ -33,7 +33,7 @@ RSpec.describe IsoDoc do
33
33
  <preferred>paddy</preferred><admitted>paddy rice</admitted>
34
34
  <admitted>rough rice</admitted>
35
35
  <deprecates>cargo rice</deprecates>
36
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
36
+ <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
37
37
  <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
38
38
  <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
39
39
  </termnote>
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: 1.3.11
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-11-04 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: 1.9.0
19
+ version: 1.10.0
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: 1.9.0
26
+ version: 1.10.0
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.1.4
301
+ rubygems_version: 3.2.22
302
302
  signing_key:
303
303
  specification_version: 4
304
304
  summary: metanorma-iec lets you write IEC standards in AsciiDoc.