metanorma-iec 1.2.6 → 1.2.7

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: bc326d356e558e21523ffcc8690c5170fcfdf0fa18814ab0fb9164321f6fcea9
4
- data.tar.gz: 46ead1e820327d2c8470bf0128e910003e19b6089dc78d3788e91f8721138afc
3
+ metadata.gz: 065b3fdee8a57faf2f698c80f57ece1e0c234b10833e3187cb879bb683778257
4
+ data.tar.gz: 12ca28a168eab53a8970421542b883e06c638a535f0648cc7d64babcba4a1314
5
5
  SHA512:
6
- metadata.gz: 160e78ca27fc0e649fc0e60a1932fe5fd18ea10e3f812c6bee16646032b8fd40f046d244466b3a8ba143cec6716ee88a2eae695ffc46d9816f92bc0b99072138
7
- data.tar.gz: ef5fa5a588ff0593f32830103c897f98173cdcb07b1ca1913c7b4e084f561439292983512ac7d00f6475af12d0c5c8b001161caf510ed87a1f6d316c0ebc2738
6
+ metadata.gz: 164fecc81e42574d17b366f0f04fde0e12476197fa9d7866d9652854fd181c2eb90a08fffa7ef30d5c7382f6caf318069fef95426a28314be7d22e7d0a105e5e
7
+ data.tar.gz: dda40f72589b9a8de4ae3a56a86101a480c1e570880962bec551410e190fc2b5a0d83383124037f5135ef419e0a901a0a68626fb5241da5f33b7ed9c1ccf4217
@@ -0,0 +1,44 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master ]
8
+ pull_request:
9
+
10
+ jobs:
11
+ rake:
12
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
13
+ runs-on: ${{ matrix.os }}
14
+ continue-on-error: ${{ matrix.experimental }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ ruby: [ '2.6', '2.5', '2.4' ]
19
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
20
+ experimental: [ false ]
21
+ include:
22
+ - ruby: '2.7'
23
+ os: 'ubuntu-latest'
24
+ experimental: true
25
+ - ruby: '2.7'
26
+ os: 'windows-latest'
27
+ experimental: true
28
+ - ruby: '2.7'
29
+ os: 'macos-latest'
30
+ experimental: true
31
+ steps:
32
+ - uses: actions/checkout@master
33
+
34
+ - name: Use Ruby
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+
40
+ - name: Update gems
41
+ run: bundle install --jobs 4 --retry 3
42
+
43
+ - name: Run specs
44
+ run: bundle exec rake
@@ -49,6 +49,7 @@ module Asciidoctor
49
49
  end
50
50
 
51
51
  def pdf_converter(node)
52
+ return if node.attr("no-pdf")
52
53
  node.nil? ? IsoDoc::Iec::PdfConvert.new({}) :
53
54
  IsoDoc::Iec::PdfConvert.new(doc_extract_attributes(node))
54
55
  end
@@ -1164,49 +1164,7 @@
1164
1164
  </define>
1165
1165
  <define name="annex">
1166
1166
  <element name="annex">
1167
- <optional>
1168
- <attribute name="id">
1169
- <data type="ID"/>
1170
- </attribute>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="language"/>
1174
- </optional>
1175
- <optional>
1176
- <attribute name="script"/>
1177
- </optional>
1178
- <optional>
1179
- <attribute name="inline-header">
1180
- <data type="boolean"/>
1181
- </attribute>
1182
- </optional>
1183
- <attribute name="obligation">
1184
- <choice>
1185
- <value>normative</value>
1186
- <value>informative</value>
1187
- </choice>
1188
- </attribute>
1189
- <optional>
1190
- <ref name="section-title"/>
1191
- </optional>
1192
- <group>
1193
- <group>
1194
- <zeroOrMore>
1195
- <ref name="BasicBlock"/>
1196
- </zeroOrMore>
1197
- <zeroOrMore>
1198
- <ref name="note"/>
1199
- </zeroOrMore>
1200
- </group>
1201
- <zeroOrMore>
1202
- <choice>
1203
- <ref name="annex-subsection"/>
1204
- <ref name="terms"/>
1205
- <ref name="definitions"/>
1206
- <ref name="references"/>
1207
- </choice>
1208
- </zeroOrMore>
1209
- </group>
1167
+ <ref name="Annex-Section"/>
1210
1168
  </element>
1211
1169
  </define>
1212
1170
  <define name="terms">
@@ -111,6 +111,10 @@ b, strong {
111
111
  div.document-stage-band, div.document-type-band {
112
112
  background-color: #333333; }
113
113
 
114
+ a.FootnoteRef + a.FootnoteRef:before {
115
+ content: ", ";
116
+ vertical-align: super; }
117
+
114
118
  #standard-band {
115
119
  background-color: #0AC442; }
116
120
 
@@ -2455,6 +2455,7 @@
2455
2455
 
2456
2456
 
2457
2457
 
2458
+
2458
2459
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
2459
2460
 
2460
2461
 
@@ -3020,12 +3021,26 @@
3020
3021
 
3021
3022
 
3022
3023
 
3023
- <!-- except gb and bipm -->
3024
3024
 
3025
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3026
3025
 
3027
3026
 
3027
+ <!-- except gb -->
3028
+
3029
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3030
+
3028
3031
 
3032
+ <!-- show Note under table in preface (ex. abstract) sections -->
3033
+ <!-- empty, because notes show at page side in main sections -->
3034
+ <!-- <xsl:if test="$namespace = 'bipm'">
3035
+ <xsl:choose>
3036
+ <xsl:when test="ancestor::*[local-name()='preface']">
3037
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3038
+ </xsl:when>
3039
+ <xsl:otherwise>
3040
+ <fo:block/>
3041
+ </xsl:otherwise>
3042
+ </xsl:choose>
3043
+ </xsl:if> -->
3029
3044
 
3030
3045
 
3031
3046
  <!-- horizontal row separator -->
@@ -3100,7 +3115,11 @@
3100
3115
 
3101
3116
 
3102
3117
 
3103
- <!-- except gb and bipm -->
3118
+
3119
+
3120
+
3121
+
3122
+ <!-- except gb -->
3104
3123
 
3105
3124
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3106
3125
 
@@ -3197,6 +3216,9 @@
3197
3216
 
3198
3217
 
3199
3218
 
3219
+ <!-- <xsl:if test="$namespace = 'bipm'">
3220
+ <xsl:attribute name="height">8mm</xsl:attribute>
3221
+ </xsl:if> -->
3200
3222
 
3201
3223
  <xsl:apply-templates/>
3202
3224
  </fo:table-row>
@@ -4364,6 +4386,8 @@
4364
4386
 
4365
4387
 
4366
4388
 
4389
+
4390
+
4367
4391
  <fo:inline xsl:use-attribute-sets="note-name-style">
4368
4392
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4369
4393
  </fo:inline>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "1.2.6"
3
+ VERSION = "1.2.7"
4
4
  end
5
5
  end
6
6
 
@@ -29,6 +29,8 @@ RSpec.describe Asciidoctor::Iec do
29
29
 
30
30
  it "converts a blank document" do
31
31
  FileUtils.rm_f "test.doc"
32
+ FileUtils.rm_f "test.html"
33
+ FileUtils.rm_f "test.pdf"
32
34
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
33
35
  = Document title
34
36
  Author
@@ -40,6 +42,8 @@ RSpec.describe Asciidoctor::Iec do
40
42
  <sections/>
41
43
  </iec-standard>
42
44
  OUTPUT
45
+ expect(File.exist?("test.pdf")).to be true
46
+ expect(File.exist?("test.html")).to be true
43
47
  expect(File.exist?("test.doc")).to be true
44
48
  expect(File.exist?("htmlstyle.css")).to be false
45
49
  end
@@ -527,6 +531,7 @@ OUTPUT
527
531
  :docfile: test.adoc
528
532
  :novalid:
529
533
  :no-isobib:
534
+ :no-pdf:
530
535
  INPUT
531
536
  html = File.read("test.html", encoding: "utf-8")
532
537
  expect(html).to match(%r{<script>})
@@ -540,6 +545,7 @@ OUTPUT
540
545
  :docfile: test.adoc
541
546
  :novalid:
542
547
  :no-isobib:
548
+ :no-pdf:
543
549
  INPUT
544
550
  html = File.read("test.html", encoding: "utf-8")
545
551
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
@@ -556,6 +562,7 @@ OUTPUT
556
562
  :novalid:
557
563
  :no-isobib:
558
564
  :script: Hans
565
+ :no-pdf:
559
566
  INPUT
560
567
  html = File.read("test.html", encoding: "utf-8")
561
568
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
@@ -575,6 +582,7 @@ OUTPUT
575
582
  :body-font: Zapf Chancery
576
583
  :header-font: Comic Sans
577
584
  :monospace-font: Andale Mono
585
+ :no-pdf:
578
586
  INPUT
579
587
  html = File.read("test.html", encoding: "utf-8")
580
588
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
@@ -591,6 +599,7 @@ OUTPUT
591
599
  :docfile: test.adoc
592
600
  :novalid:
593
601
  :no-isobib:
602
+ :no-pdf:
594
603
  INPUT
595
604
  word = File.read("test.doc", encoding: "utf-8")
596
605
  html = File.read("test.html", encoding: "utf-8")
@@ -76,12 +76,8 @@ RSpec.describe IsoDoc do
76
76
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
77
77
  <bibdata>
78
78
  <docnumber>1</docnumber>
79
- <language>en</language>
79
+ <language current="true">en</language>
80
80
  </bibdata>
81
- <local_bibdata>
82
- <docnumber>1</docnumber>
83
- <language>en</language>
84
- </local_bibdata>
85
81
  <preface>
86
82
  <foreword obligation="informative">
87
83
  <title>Foreword</title>
@@ -220,12 +216,12 @@ RSpec.describe IsoDoc do
220
216
  </body>
221
217
  </html>
222
218
  OUTPUT
223
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
219
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
224
220
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
225
221
  end
226
222
 
227
223
  it "defaults to English" do
228
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
224
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
229
225
  <iso-standard xmlns="http://riboseinc.com/isoxml">
230
226
  <bibdata>
231
227
  <language>tlh</language>
@@ -295,11 +291,8 @@ RSpec.describe IsoDoc do
295
291
  INPUT
296
292
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
297
293
  <bibdata>
298
- <language>tlh</language>
294
+ <language current="true">tlh</language>
299
295
  </bibdata>
300
- <local_bibdata>
301
- <language>tlh</language>
302
- </local_bibdata>
303
296
  <preface>
304
297
  <foreword obligation='informative'>
305
298
  <title>Foreword</title>
@@ -507,11 +500,8 @@ RSpec.describe IsoDoc do
507
500
  presxml = <<~OUTPUT
508
501
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
509
502
  <bibdata>
510
- <language>fr</language>
503
+ <language current="true">fr</language>
511
504
  </bibdata>
512
- <local_bibdata>
513
- <language>fr</language>
514
- </local_bibdata>
515
505
  <preface>
516
506
  <foreword obligation="informative">
517
507
  <title>Foreword</title>
@@ -651,7 +641,7 @@ RSpec.describe IsoDoc do
651
641
  </body>
652
642
  </html>
653
643
  OUTPUT
654
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
644
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
655
645
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
656
646
  end
657
647
 
@@ -27,10 +27,6 @@ RSpec.describe IsoDoc do
27
27
  <docidentifier type='iso'>IEC/PWI 60050-871 ED 2</docidentifier>
28
28
  <docnumber>60050</docnumber>
29
29
  </bibdata>
30
- <local_bibdata>
31
- <docidentifier type='iso'>IEC/PWI 60050-871 ED 2</docidentifier>
32
- <docnumber>60050</docnumber>
33
- </local_bibdata>
34
30
  <preface>
35
31
  <foreword obligation='informative'>
36
32
  <title>Foreword</title>
@@ -68,7 +64,7 @@ OUTPUT
68
64
  </body>
69
65
  </html>
70
66
  OUTPUT
71
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
67
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
72
68
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
73
69
  end
74
70
 
@@ -164,11 +160,11 @@ OUTPUT
164
160
  <abbreviation>IEC</abbreviation>
165
161
  </organization>
166
162
  </contributor>
167
- <language>en</language>
168
- <script>Latn</script>
163
+ <language current="true">en</language>
164
+ <script current="true">Latn</script>
169
165
  <status>
170
- <stage>60</stage>
171
- <substage>60</substage>
166
+ <stage language="">60</stage>
167
+ <substage language="">60</substage>
172
168
  </status>
173
169
  <copyright>
174
170
  <from>2020</from>
@@ -180,7 +176,7 @@ OUTPUT
180
176
  </owner>
181
177
  </copyright>
182
178
  <ext>
183
- <doctype>article</doctype>
179
+ <doctype language="">article</doctype>
184
180
  <editorialgroup>
185
181
  <technical-committee/>
186
182
  <subcommittee/>
@@ -191,50 +187,6 @@ OUTPUT
191
187
  </structuredidentifier>
192
188
  </ext>
193
189
  </bibdata>
194
- <local_bibdata type='standard'>
195
- <docidentifier type='iso'>IEC 60050 ED 1</docidentifier>
196
- <docnumber>60050</docnumber>
197
- <contributor>
198
- <role type='author'/>
199
- <organization>
200
- <name>International Electrotechnical Commission</name>
201
- <abbreviation>IEC</abbreviation>
202
- </organization>
203
- </contributor>
204
- <contributor>
205
- <role type='publisher'/>
206
- <organization>
207
- <name>International Electrotechnical Commission</name>
208
- <abbreviation>IEC</abbreviation>
209
- </organization>
210
- </contributor>
211
- <language>en</language>
212
- <script>Latn</script>
213
- <status>
214
- <stage>60</stage>
215
- <substage>60</substage>
216
- </status>
217
- <copyright>
218
- <from>2020</from>
219
- <owner>
220
- <organization>
221
- <name>International Electrotechnical Commission</name>
222
- <abbreviation>IEC</abbreviation>
223
- </organization>
224
- </owner>
225
- </copyright>
226
- <ext>
227
- <doctype>article</doctype>
228
- <editorialgroup>
229
- <technical-committee/>
230
- <subcommittee/>
231
- <workgroup/>
232
- </editorialgroup>
233
- <structuredidentifier>
234
- <project-number>IEC 60050</project-number>
235
- </structuredidentifier>
236
- </ext>
237
- </local_bibdata>
238
190
  <sections> </sections>
239
191
  <bibliography>
240
192
  <references obligation='informative' normative='true' id="X">
@@ -275,7 +227,7 @@ OUTPUT
275
227
  </body>
276
228
  </html>
277
229
  OUTPUT
278
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
230
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
279
231
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
280
232
  end
281
233
 
@@ -343,10 +295,6 @@ presxml = <<~INPUT
343
295
  <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
344
296
  <docnumber>60050</docnumber>
345
297
  </bibdata>
346
- <local_bibdata type='standard'>
347
- <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
348
- <docnumber>60050</docnumber>
349
- </local_bibdata>
350
298
  <sections>
351
299
  <clause id="_terms_and_definitions" obligation="normative"><title depth="1">1<tab/>Terms and definitions</title>
352
300
  <terms id="_general" obligation="normative"><title>192-01 General</title>
@@ -493,7 +441,7 @@ html = <<~OUTPUT
493
441
  </body>
494
442
  </html>
495
443
  OUTPUT
496
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
444
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
497
445
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
498
446
  end
499
447
 
@@ -530,10 +478,6 @@ end
530
478
  <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
531
479
  <docnumber>60050</docnumber>
532
480
  </bibdata>
533
- <local_bibdata type='standard'>
534
- <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
535
- <docnumber>60050</docnumber>
536
- </local_bibdata>
537
481
  <sections>
538
482
  <clause id='_terms_and_definitions' obligation='normative'>
539
483
  <title depth='1'>1<tab/>Terms and definitions</title>
@@ -565,7 +509,7 @@ end
565
509
  </sections>
566
510
  </iso-standard>
567
511
  OUTPUT
568
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
512
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
569
513
  IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, false)
570
514
  word = File.read("test.doc").sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">').
571
515
  sub(%r{<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>.*$}m, "")
@@ -76,6 +76,9 @@ INPUT
76
76
  {:accesseddate=>"2012",
77
77
  :activateddate=>"2013",
78
78
  :agency=>"ISO",
79
+ :circulateddate=>"XXX",
80
+ :confirmeddate=>"XXX",
81
+ :copieddate=>"XXX",
79
82
  :createddate=>"2010&ndash;2011",
80
83
  :docnumber=>"ISO/PreCD3 17301-1",
81
84
  :docnumeric=>"1730",
@@ -90,17 +93,23 @@ INPUT
90
93
  :doctitlepart=>"Rice",
91
94
  :doctitlepartlabel=>"Part&nbsp;1",
92
95
  :doctype=>"International Standard",
96
+ :doctype_display=>"International Standard",
93
97
  :docyear=>"2016",
94
98
  :draft=>"0.4",
95
99
  :draftinfo=>" (draft 0.4, 2016-05-01)",
96
100
  :edition=>"2",
97
101
  :editorialgroup=>["TC 34", "SC 4", "WG 3"],
102
+ :implementeddate=>"XXX",
103
+ :issueddate=>"XXX",
104
+ :lang=>"en",
98
105
  :obsoleteddate=>"2014",
99
106
  :publisheddate=>"2011",
100
107
  :publisher=>"International Organization for Standardization",
108
+ :receiveddate=>"XXX",
101
109
  :revdate=>"2016-05-01",
102
110
  :revdate_monthyear=>"May 2016",
103
111
  :sc=>"SC 4",
112
+ :script=>"Latn",
104
113
  :secretariat=>"GB",
105
114
  :stage=>"35",
106
115
  :stage_int=>35,
@@ -108,7 +117,12 @@ INPUT
108
117
  :statusabbr=>"3CD",
109
118
  :tc=>"TC 34",
110
119
  :tc_docnumber=>["17301"],
120
+ :transmitteddate=>"XXX",
121
+ :unchangeddate=>"XXX",
111
122
  :unpublished=>true,
123
+ :updateddate=>"XXX",
124
+ :vote_endeddate=>"XXX",
125
+ :vote_starteddate=>"XXX",
112
126
  :wg=>"WG 3"}
113
127
  OUTPUT
114
128
  end
@@ -188,7 +202,12 @@ OUTPUT
188
202
  </bibdata>
189
203
  </iso-standard>
190
204
  INPUT
191
- {:agency=>"ISO/IEC",
205
+ {:accesseddate=>"XXX",
206
+ :agency=>"ISO/IEC",
207
+ :circulateddate=>"XXX",
208
+ :confirmeddate=>"XXX",
209
+ :copieddate=>"XXX",
210
+ :createddate=>"XXX",
192
211
  :docnumber=>"ISO/IEC/CD 17301-1-3",
193
212
  :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz",
194
213
  :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
@@ -201,21 +220,34 @@ INPUT
201
220
  :doctitlepart=>"Rice",
202
221
  :doctitlepartlabel=>"Part&nbsp;1&ndash;3",
203
222
  :doctype=>"Technical Report",
223
+ :doctype_display=>"Technical Report",
204
224
  :docyear=>"2016",
205
225
  :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
206
226
  :ics=>"1.2.3, 1.2.3",
227
+ :implementeddate=>"XXX",
228
+ :issueddate=>"XXX",
229
+ :lang=>"en",
230
+ :obsoleteddate=>"XXX",
207
231
  :obsoletes=>"IEC 8121",
208
232
  :obsoletes_part=>"3.1",
233
+ :publisheddate=>"XXX",
209
234
  :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
235
+ :receiveddate=>"XXX",
210
236
  :sc=>"DEF 4",
211
- :secretariat=>"XXXX",
237
+ :script=>"Latn",
238
+ :secretariat=>"XXX",
212
239
  :stage=>"50",
213
240
  :stage_int=>50,
214
241
  :stageabbr=>"FDIS",
215
242
  :statusabbr=>"CFDIS",
216
243
  :tc=>"ABC 34",
217
244
  :tc_docnumber=>["17301"],
245
+ :transmitteddate=>"XXX",
246
+ :unchangeddate=>"XXX",
218
247
  :unpublished=>true,
248
+ :updateddate=>"XXX",
249
+ :vote_endeddate=>"XXX",
250
+ :vote_starteddate=>"XXX",
219
251
  :wg=>"GHI 3"}
220
252
  OUTPUT
221
253
  end
@@ -128,11 +128,8 @@ RSpec.describe IsoDoc::Iec do
128
128
  presxml = <<~OUTPUT
129
129
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
130
130
  <bibdata>
131
- <language>en</language>
131
+ <language current="true">en</language>
132
132
  </bibdata>
133
- <local_bibdata>
134
- <language>en</language>
135
- </local_bibdata>
136
133
  <preface><foreword>
137
134
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
138
135
  <eref bibitemid="ISO712">[110]</eref>
@@ -372,7 +369,7 @@ RSpec.describe IsoDoc::Iec do
372
369
  </html>
373
370
 
374
371
  OUTPUT
375
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
372
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
376
373
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
377
374
  end
378
375
 
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.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-11 00:00:00.000000000 Z
11
+ date: 2020-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -216,9 +216,7 @@ executables: []
216
216
  extensions: []
217
217
  extra_rdoc_files: []
218
218
  files:
219
- - ".github/workflows/macos.yml"
220
- - ".github/workflows/ubuntu.yml"
221
- - ".github/workflows/windows.yml"
219
+ - ".github/workflows/rake.yml"
222
220
  - ".gitignore"
223
221
  - ".hound.yml"
224
222
  - ".rubocop.yml"
@@ -1,38 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/ubuntu.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-macos:
15
- name: Test on Ruby ${{ matrix.ruby }} macOS
16
- runs-on: macos-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- bundle install --jobs 4 --retry 3
36
- - name: Run specs
37
- run: |
38
- bundle exec rake
@@ -1,56 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- tags:
9
- - '*'
10
- pull_request:
11
- paths-ignore:
12
- - .github/workflows/macos.yml
13
- - .github/workflows/windows.yml
14
-
15
- jobs:
16
- test-linux:
17
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
18
- runs-on: ubuntu-latest
19
- continue-on-error: ${{ matrix.experimental }}
20
- strategy:
21
- fail-fast: false
22
- matrix:
23
- ruby: [ '2.6', '2.5', '2.4' ]
24
- experimental: [false]
25
- include:
26
- - ruby: '2.7'
27
- experimental: true
28
- steps:
29
- - uses: actions/checkout@master
30
- - name: Use Ruby
31
- uses: actions/setup-ruby@v1
32
- with:
33
- ruby-version: ${{ matrix.ruby }}
34
- - name: Update gems
35
- run: |
36
- gem install bundler
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
41
- - name: Trigger repositories
42
- if: matrix.ruby == '2.6'
43
- env:
44
- GH_USERNAME: metanorma-ci
45
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
46
- run: |
47
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
48
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
49
- CLIENT_PAYLOAD=$(cat <<EOF
50
- "{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
51
- EOF
52
- )
53
- for repo in $REPOS
54
- do
55
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
56
- done
@@ -1,40 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/ubuntu.yml
12
-
13
- jobs:
14
- test-windows:
15
- name: Test on Ruby ${{ matrix.ruby }} Windows
16
- runs-on: windows-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- shell: pwsh
34
- run: |
35
- gem install bundler
36
- bundle config --local path vendor/bundle
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake