metanorma-iec 1.4.3 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +14 -0
- data/Gemfile +6 -0
- data/lib/isodoc/iec/base_convert.rb +25 -26
- data/lib/isodoc/iec/html/htmlstyle.css +56 -21
- data/lib/isodoc/iec/html/htmlstyle.scss +38 -7
- data/lib/isodoc/iec/html/scripts.html +0 -1
- data/lib/isodoc/iec/html/wordstyle.css +13 -11
- data/lib/isodoc/iec/html/wordstyle.scss +13 -11
- data/lib/isodoc/iec/html_convert.rb +2 -1
- data/lib/isodoc/iec/i18n-fr.yaml +1 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +1770 -1324
- data/lib/isodoc/iec/presentation_xml_convert.rb +162 -1
- data/lib/isodoc/iec/word_convert.rb +2 -0
- data/lib/isodoc/iec/xref.rb +9 -8
- data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iec/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/iec/converter.rb +23 -2
- data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
- data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
- data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
- data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +49 -2
- data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +14 -0
- data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
- data/lib/metanorma/iec/version.rb +1 -1
- data/lib/metanorma-iec.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/isodoc/i18n_spec.rb +2 -2
- data/spec/isodoc/iev_spec.rb +334 -100
- data/spec/isodoc/postproc_spec.rb +2 -5
- data/spec/isodoc/ref_spec.rb +359 -353
- data/spec/isodoc/terms_spec.rb +14 -21
- data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/iev_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
- data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +23 -23
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -76,11 +76,8 @@ RSpec.describe IsoDoc do
|
|
76
76
|
</ul>
|
77
77
|
</termexample>
|
78
78
|
|
79
|
-
<termsource status="modified">
|
80
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin
|
81
|
-
<modification>
|
82
|
-
<p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
83
|
-
</modification>
|
79
|
+
<termsource status="modified">[SOURCE:
|
80
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>, modified – The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
|
84
81
|
</termsource></term>
|
85
82
|
|
86
83
|
<term id="paddy">
|
@@ -104,8 +101,8 @@ RSpec.describe IsoDoc do
|
|
104
101
|
<li>A</li>
|
105
102
|
</ul>
|
106
103
|
</termexample>
|
107
|
-
<termsource status="identical">
|
108
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
104
|
+
<termsource status="identical">[SOURCE:
|
105
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>]
|
109
106
|
</termsource></term>
|
110
107
|
</terms>
|
111
108
|
</sections>
|
@@ -131,10 +128,9 @@ RSpec.describe IsoDoc do
|
|
131
128
|
</ul>
|
132
129
|
</div>
|
133
130
|
|
134
|
-
<p>[
|
135
|
-
<a href="#ISO7301">ISO 7301:2011, 3.1</a
|
136
|
-
|
137
|
-
[/TERMREF]</p><p class="TermNum" id="paddy">1.2</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
|
131
|
+
<p>[SOURCE:
|
132
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified – The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
|
133
|
+
</p><p class="TermNum" id="paddy">1.2</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
|
138
134
|
<p class="AltTerms" style="text-align:left;">rough rice</p>
|
139
135
|
<p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
|
140
136
|
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
@@ -145,9 +141,8 @@ RSpec.describe IsoDoc do
|
|
145
141
|
</div>
|
146
142
|
<div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note"><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
147
143
|
<div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p>Note 2 to entry: <ul><li>A</li></ul><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></p></div>
|
148
|
-
<p>[
|
149
|
-
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
150
|
-
[/TERMREF]</p></div>
|
144
|
+
<p>[SOURCE:
|
145
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>]</p></div>
|
151
146
|
</div>
|
152
147
|
</body>
|
153
148
|
</html>
|
@@ -167,10 +162,9 @@ RSpec.describe IsoDoc do
|
|
167
162
|
</ul>
|
168
163
|
</div>
|
169
164
|
|
170
|
-
<p>[
|
171
|
-
<a href="#ISO7301">ISO 7301:2011, 3.1</a
|
172
|
-
|
173
|
-
[/TERMREF]</p><p class="TermNum" id="paddy">1.2</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
|
165
|
+
<p>[SOURCE:
|
166
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified –
|
167
|
+
The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p><p class="TermNum" id="paddy">1.2</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
|
174
168
|
<p class="AltTerms" style="text-align:left;">rough rice</p>
|
175
169
|
<p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
|
176
170
|
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p><div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span><span style="mso-tab-count:1">  </span></p>
|
@@ -182,9 +176,8 @@ RSpec.describe IsoDoc do
|
|
182
176
|
|
183
177
|
|
184
178
|
|
185
|
-
<p>[
|
186
|
-
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
187
|
-
[/TERMREF]</p></div>
|
179
|
+
<p>[SOURCE:
|
180
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>]</p></div>
|
188
181
|
OUTPUT
|
189
182
|
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
190
183
|
.convert("test", input, true)))
|
data/spec/spec_helper.rb
CHANGED
@@ -118,10 +118,10 @@ BOILERPLATE
|
|
118
118
|
|
119
119
|
def boilerplate(xmldoc)
|
120
120
|
file = File.read(
|
121
|
-
File.join(File.dirname(__FILE__), "..", "lib", "
|
121
|
+
File.join(File.dirname(__FILE__), "..", "lib", "metanorma", "iec",
|
122
122
|
"iec_intro_en.xml"), encoding: "utf-8"
|
123
123
|
)
|
124
|
-
conv =
|
124
|
+
conv = Metanorma::Iec::Converter.new(nil, backend: :iec,
|
125
125
|
header_footer: true)
|
126
126
|
conv.init(Asciidoctor::Document.new([]))
|
127
127
|
ret = Nokogiri::XML(
|
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:
|
4
|
+
version: 2.0.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:
|
11
|
+
date: 2022-01-17 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:
|
19
|
+
version: 2.0.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:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: ruby-jing
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -212,16 +212,6 @@ files:
|
|
212
212
|
- README.adoc
|
213
213
|
- Rakefile
|
214
214
|
- bin/rspec
|
215
|
-
- lib/asciidoctor/iec/basicdoc.rng
|
216
|
-
- lib/asciidoctor/iec/biblio.rng
|
217
|
-
- lib/asciidoctor/iec/converter.rb
|
218
|
-
- lib/asciidoctor/iec/front.rb
|
219
|
-
- lib/asciidoctor/iec/iec.rng
|
220
|
-
- lib/asciidoctor/iec/iec_intro_en.xml
|
221
|
-
- lib/asciidoctor/iec/iec_intro_fr.xml
|
222
|
-
- lib/asciidoctor/iec/isodoc.rng
|
223
|
-
- lib/asciidoctor/iec/isostandard.rng
|
224
|
-
- lib/asciidoctor/iec/reqt.rng
|
225
215
|
- lib/isodoc/iec/base_convert.rb
|
226
216
|
- lib/isodoc/iec/html/header.html
|
227
217
|
- lib/isodoc/iec/html/html_iec_intro.html
|
@@ -249,17 +239,19 @@ files:
|
|
249
239
|
- lib/isodoc/iec/xref.rb
|
250
240
|
- lib/metanorma-iec.rb
|
251
241
|
- lib/metanorma/iec.rb
|
242
|
+
- lib/metanorma/iec/basicdoc.rng
|
243
|
+
- lib/metanorma/iec/biblio.rng
|
244
|
+
- lib/metanorma/iec/converter.rb
|
245
|
+
- lib/metanorma/iec/front.rb
|
246
|
+
- lib/metanorma/iec/iec.rng
|
247
|
+
- lib/metanorma/iec/iec_intro_en.xml
|
248
|
+
- lib/metanorma/iec/iec_intro_fr.xml
|
249
|
+
- lib/metanorma/iec/isodoc.rng
|
250
|
+
- lib/metanorma/iec/isostandard.rng
|
252
251
|
- lib/metanorma/iec/processor.rb
|
252
|
+
- lib/metanorma/iec/reqt.rng
|
253
253
|
- lib/metanorma/iec/version.rb
|
254
254
|
- metanorma-iec.gemspec
|
255
|
-
- spec/asciidoctor/base_spec.rb
|
256
|
-
- spec/asciidoctor/blocks_spec.rb
|
257
|
-
- spec/asciidoctor/cleanup_spec.rb
|
258
|
-
- spec/asciidoctor/iev_spec.rb
|
259
|
-
- spec/asciidoctor/inline_spec.rb
|
260
|
-
- spec/asciidoctor/lists_spec.rb
|
261
|
-
- spec/asciidoctor/section_spec.rb
|
262
|
-
- spec/asciidoctor/validate_spec.rb
|
263
255
|
- spec/assets/header.html
|
264
256
|
- spec/assets/html.css
|
265
257
|
- spec/assets/iso.xml
|
@@ -277,7 +269,15 @@ files:
|
|
277
269
|
- spec/isodoc/ref_spec.rb
|
278
270
|
- spec/isodoc/section_spec.rb
|
279
271
|
- spec/isodoc/terms_spec.rb
|
272
|
+
- spec/metanorma/base_spec.rb
|
273
|
+
- spec/metanorma/blocks_spec.rb
|
274
|
+
- spec/metanorma/cleanup_spec.rb
|
275
|
+
- spec/metanorma/iev_spec.rb
|
276
|
+
- spec/metanorma/inline_spec.rb
|
277
|
+
- spec/metanorma/lists_spec.rb
|
280
278
|
- spec/metanorma/processor_spec.rb
|
279
|
+
- spec/metanorma/section_spec.rb
|
280
|
+
- spec/metanorma/validate_spec.rb
|
281
281
|
- spec/spec_helper.rb
|
282
282
|
homepage: https://github.com/metanorma/metanorma-iec
|
283
283
|
licenses:
|
@@ -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.2.
|
301
|
+
rubygems_version: 3.2.32
|
302
302
|
signing_key:
|
303
303
|
specification_version: 4
|
304
304
|
summary: metanorma-iec lets you write IEC standards in AsciiDoc.
|