metanorma-iso 1.3.13 → 1.3.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -489,15 +489,16 @@ RSpec.describe IsoDoc do
489
489
  <boilerplate>
490
490
  <copyright-statement>
491
491
  <clause>
492
- <p id="authority1">
492
+ <p id="boilerplate-year">
493
493
  © ISO 2019, Published in Switzerland
494
494
  </p>
495
495
 
496
- <p id="authority2">
496
+ <p id="boilerplate-message">
497
497
  I am the Walrus.
498
498
  </p>
499
499
 
500
- <p id="authority3" align="left">
500
+ <p id="boilerplate-name">ISO copyright office</p>
501
+ <p id="boilerplate-address" align="left">
501
502
  ISO copyright office<br/>
502
503
  Ch. de Blandonnet 8 ?~@? CP 401<br/>
503
504
  CH-1214 Vernier, Geneva, Switzerland<br/>
@@ -545,11 +546,12 @@ end
545
546
  <boilerplate>
546
547
  <copyright-statement>
547
548
  <clause>
548
- <p id="authority1">Published in Elbonia</p>
549
+ <p id="boilerplate-year">Published in Elbonia</p>
549
550
 
550
- <p id="authority2">No soup for you</p>
551
+ <p id="boilerplate-message">No soup for you</p>
551
552
 
552
- <p id="authority3" align="left">Elbonia 5000</p>
553
+ <p id="boilerplate-name">Dilbert Associates</p>
554
+ <p id="boilerplate-address" align="left">Elbonia 5000</p>
553
555
  </clause>
554
556
  </copyright-statement>
555
557
 
@@ -567,15 +569,17 @@ end
567
569
  INPUT
568
570
  word = File.read("test.doc", encoding: "UTF-8")
569
571
  expect(xmlpp(word.sub(%r{^.*<p class="zzCopyright">}m, '<p class="zzCopyright">').sub(%r{</p>.*$}m, '</p>'))).to be_equivalent_to xmlpp(<<~"OUTPUT")
570
- <p class="zzCopyright"><a name="authority1" id="authority1"></a>Published in Elbonia</p>
572
+ <p class="zzCopyright"><a name="boilerplate-year" id="boilerplate-year"></a>Published in Elbonia</p>
571
573
  OUTPUT
572
574
  expect(xmlpp(word.sub(%r{^.*<p class="zzCopyright1">}m, '<p class="zzCopyright1">').sub(%r{</p>.*$}m, '</p>'))).to be_equivalent_to xmlpp(<<~"OUTPUT")
573
- <p class="zzCopyright1"><a name="authority2" id="authority2"></a>No soup for you</p>
575
+ <p class="zzCopyright1"><a name="boilerplate-message" id="boilerplate-message"></a>No soup for you</p>
574
576
  OUTPUT
575
577
  expect(xmlpp(word.sub(%r{^.*<p align="left" style="text-align:left" class="zzAddress">}m, '<p align="left" style="text-align:left" class="zzAddress">').sub(%r{</p>.*$}m, '</p>'))).to be_equivalent_to xmlpp(<<~"OUTPUT")
576
- <p align="left" style="text-align:left" class="zzAddress"><a name="authority3" id="authority3"></a>Elbonia 5000</p>
578
+ <p align="left" style="text-align:left" class="zzAddress"><a name="boilerplate-address" id="boilerplate-address"></a>Elbonia 5000</p>
579
+ OUTPUT
580
+ expect(xmlpp(word.sub(%r{^.*<p class="boilerplate-name">}m, '<p class="boilerplate-name">').sub(%r{</p>.*$}m, '</p>'))).to be_equivalent_to xmlpp(<<~"OUTPUT")
581
+ <p class="boilerplate-name"><a name="boilerplate-name" id="boilerplate-name"></a>Dilbert Associates</p>
577
582
  OUTPUT
578
- expect(word).to include '<p class="zzWarning">I am the Walrus</p>'
579
583
  expect(word).to include '<p class="zzWarning">I am the Walrus</p>'
580
584
  end
581
585
 
data/spec/spec_helper.rb CHANGED
@@ -97,9 +97,11 @@ HDR
97
97
 
98
98
  BOILERPLATE =
99
99
  HTMLEntities.new.decode(
100
- File.read(File.join(File.dirname(__FILE__), "..", "lib", "asciidoctor", "iso", "iso_intro.xml"), encoding: "utf-8").
100
+ File.read(File.join(File.dirname(__FILE__), "..", "lib", "asciidoctor", "iso", "boilerplate.xml"), encoding: "utf-8").
101
101
  gsub(/\{\{ agency \}\}/, "ISO").gsub(/\{\{ docyear \}\}/, Date.today.year.to_s).
102
- gsub(/\{% if unpublished %\}.*\{% endif %\}/m, ""))
102
+ gsub(/\{% if unpublished %\}.*\{% endif %\}/m, "").
103
+ gsub(/(?<=\p{Alnum})'(?=\p{Alpha})/, "’")
104
+ )
103
105
 
104
106
 
105
107
  BLANK_HDR = <<~"HDR"
@@ -148,15 +150,15 @@ BLANK_HDR = <<~"HDR"
148
150
  HDR
149
151
 
150
152
  TERM_BOILERPLATE = <<~END
151
- <p>For the purposes of this document,
153
+ <p id="_">For the purposes of this document,
152
154
  the following terms and definitions apply.</p>
153
- <p>ISO and IEC maintain terminological databases for use in
155
+ <p id="_">ISO and IEC maintain terminological databases for use in
154
156
  standardization at the following addresses:</p>
155
157
 
156
- <ul>
157
- <li> <p>ISO Online browsing platform: available at
158
+ <ul id="_">
159
+ <li> <p id="_">ISO Online browsing platform: available at
158
160
  <link target="http://www.iso.org/obp"/></p> </li>
159
- <li> <p>IEC Electropedia: available at
161
+ <li> <p id="_">IEC Electropedia: available at
160
162
  <link target="http://www.electropedia.org"/>
161
163
  </p> </li> </ul>
162
164
  END
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.13
4
+ version: 1.3.15
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-01-04 00:00:00.000000000 Z
11
+ date: 2020-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing
@@ -243,13 +243,13 @@ files:
243
243
  - lib/asciidoctor/iso/base.rb
244
244
  - lib/asciidoctor/iso/basicdoc.rng
245
245
  - lib/asciidoctor/iso/biblio.rng
246
+ - lib/asciidoctor/iso/boilerplate.xml
246
247
  - lib/asciidoctor/iso/cleanup.rb
247
248
  - lib/asciidoctor/iso/converter.rb
248
249
  - lib/asciidoctor/iso/front.rb
249
250
  - lib/asciidoctor/iso/i18n-en.yaml
250
251
  - lib/asciidoctor/iso/i18n-fr.yaml
251
252
  - lib/asciidoctor/iso/i18n-zh-Hans.yaml
252
- - lib/asciidoctor/iso/iso_intro.xml
253
253
  - lib/asciidoctor/iso/isodoc.rng
254
254
  - lib/asciidoctor/iso/isostandard.rnc
255
255
  - lib/asciidoctor/iso/isostandard.rng