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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +6 -0
  5. data/lib/isodoc/iec/base_convert.rb +25 -26
  6. data/lib/isodoc/iec/html/htmlstyle.css +56 -21
  7. data/lib/isodoc/iec/html/htmlstyle.scss +38 -7
  8. data/lib/isodoc/iec/html/scripts.html +0 -1
  9. data/lib/isodoc/iec/html/wordstyle.css +13 -11
  10. data/lib/isodoc/iec/html/wordstyle.scss +13 -11
  11. data/lib/isodoc/iec/html_convert.rb +2 -1
  12. data/lib/isodoc/iec/i18n-fr.yaml +1 -1
  13. data/lib/isodoc/iec/iec.international-standard.xsl +1770 -1324
  14. data/lib/isodoc/iec/presentation_xml_convert.rb +162 -1
  15. data/lib/isodoc/iec/word_convert.rb +2 -0
  16. data/lib/isodoc/iec/xref.rb +9 -8
  17. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
  18. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +0 -0
  19. data/lib/{asciidoctor → metanorma}/iec/converter.rb +23 -2
  20. data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
  21. data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
  22. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  23. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  24. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +49 -2
  25. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +14 -0
  26. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  27. data/lib/metanorma/iec/version.rb +1 -1
  28. data/lib/metanorma-iec.rb +1 -1
  29. data/metanorma-iec.gemspec +1 -1
  30. data/spec/isodoc/i18n_spec.rb +2 -2
  31. data/spec/isodoc/iev_spec.rb +334 -100
  32. data/spec/isodoc/postproc_spec.rb +2 -5
  33. data/spec/isodoc/ref_spec.rb +359 -353
  34. data/spec/isodoc/terms_spec.rb +14 -21
  35. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
  36. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  37. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  38. data/spec/{asciidoctor → metanorma}/iev_spec.rb +1 -1
  39. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  40. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  41. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  42. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  43. data/spec/spec_helper.rb +2 -2
  44. metadata +23 -23
@@ -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 &#x2013; 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>[TERMREF]
135
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
136
- [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
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 &#8211; 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>[TERMREF]
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>[TERMREF]
171
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
172
- [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
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 &#8211;
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">&#160; </span></p>
@@ -182,9 +176,8 @@ RSpec.describe IsoDoc do
182
176
 
183
177
 
184
178
 
185
- <p>[TERMREF]
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)))
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Iec do
4
+ RSpec.describe Metanorma::Iec do
5
5
  before(:all) do
6
6
  @blank_hdr = blank_hdr_gen
7
7
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Iec do
4
+ RSpec.describe Metanorma::Iec do
5
5
  before(:all) do
6
6
  @boilerplate = boilerplate(Nokogiri::XML("#{BLANK_HDR}</iec-standard>"))
7
7
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Iec do
4
+ RSpec.describe Metanorma::Iec do
5
5
  context "when xref_error.adoc compilation" do
6
6
  around do |example|
7
7
  FileUtils.rm_f "spec/assets/xref_error.err"
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", "asciidoctor", "iec",
121
+ File.join(File.dirname(__FILE__), "..", "lib", "metanorma", "iec",
122
122
  "iec_intro_en.xml"), encoding: "utf-8"
123
123
  )
124
- conv = Asciidoctor::Iec::Converter.new(nil, backend: :iec,
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: 1.4.3
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: 2021-11-29 00:00:00.000000000 Z
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: 1.10.0
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: 1.10.0
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.22
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.