metanorma-iec 0.0.6 → 0.0.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 +4 -4
- data/.github/workflows/macos.yml +34 -0
- data/.github/workflows/ubuntu.yml +34 -0
- data/.github/workflows/windows.yml +37 -0
- data/lib/asciidoctor/iec/basicdoc.rng +3 -0
- data/lib/asciidoctor/iec/isodoc.rng +21 -0
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor-iec/cleanup_spec.rb +0 -35
- data/spec/assets/header.html +7 -0
- data/spec/assets/html.css +2 -0
- data/spec/assets/iso.xml +8 -0
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/word.css +2 -0
- data/spec/assets/wordintro.html +4 -0
- data/spec/isodoc/postproc_spec.rb +4 -4
- metadata +11 -4
- data/.travis.yml +0 -22
- data/appveyor.yml +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2551e05b0a4bfef51902161181d5c9972f194b32092947a7123a4954f7975031
|
|
4
|
+
data.tar.gz: 8643d24867d41d6b8d03a1646a7ef4cad9b2540059a63cf58106e4966f1b365d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eb1744790768f9e24372a7c8a8b0ac1d5b749d61279e41ce85b98a44c596a34d125b804388fa3855545ca921939981a4144ebb1204e948056b37991fe52de139
|
|
7
|
+
data.tar.gz: f3bd00da2cd3ded4e4e28c52e41a7267019f7e83508a4648f6e869755e3ff3c0ac2dc6c61171d3eaf9ab9030e2085e656d865a7d89c8d15daec4fbcce97726e7
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
|
3
|
+
name: macos
|
|
4
|
+
|
|
5
|
+
on: [push, pull_request]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test-macos:
|
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} macOS
|
|
10
|
+
runs-on: macos-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@master
|
|
16
|
+
- name: Use Ruby
|
|
17
|
+
uses: actions/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
|
20
|
+
architecture: 'x64'
|
|
21
|
+
- name: Update gems
|
|
22
|
+
run: |
|
|
23
|
+
sudo gem install bundler -v "~> 2" --force
|
|
24
|
+
bundle install --jobs 4 --retry 3
|
|
25
|
+
- name: Use Node
|
|
26
|
+
uses: actions/setup-node@v1
|
|
27
|
+
with:
|
|
28
|
+
node-version: '8'
|
|
29
|
+
- name: Install Puppeteer
|
|
30
|
+
run: |
|
|
31
|
+
npm install -g puppeteer
|
|
32
|
+
- name: Run specs
|
|
33
|
+
run: |
|
|
34
|
+
bundle exec rake
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
|
3
|
+
name: ubuntu
|
|
4
|
+
|
|
5
|
+
on: [push, pull_request]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test-linux:
|
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@master
|
|
16
|
+
- name: Use Ruby
|
|
17
|
+
uses: actions/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
|
20
|
+
architecture: 'x64'
|
|
21
|
+
- name: Update gems
|
|
22
|
+
run: |
|
|
23
|
+
gem install bundler -v "~> 2"
|
|
24
|
+
bundle install --jobs 4 --retry 3
|
|
25
|
+
- name: Use Node
|
|
26
|
+
uses: actions/setup-node@v1
|
|
27
|
+
with:
|
|
28
|
+
node-version: '8'
|
|
29
|
+
- name: Install Puppeteer
|
|
30
|
+
run: |
|
|
31
|
+
npm install -g puppeteer
|
|
32
|
+
- name: Run specs
|
|
33
|
+
run: |
|
|
34
|
+
bundle exec rake
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
|
3
|
+
name: windows
|
|
4
|
+
|
|
5
|
+
on: [push, pull_request]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test-windows:
|
|
9
|
+
name: Test on Ruby ${{ matrix.ruby }} Windows
|
|
10
|
+
runs-on: windows-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@master
|
|
16
|
+
- name: Use Ruby
|
|
17
|
+
uses: actions/setup-ruby@v1
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
|
20
|
+
architecture: 'x64'
|
|
21
|
+
- name: Update gems
|
|
22
|
+
shell: pwsh
|
|
23
|
+
run: |
|
|
24
|
+
gem install bundler -v "~> 2"
|
|
25
|
+
bundle config --local path vendor/bundle
|
|
26
|
+
bundle update
|
|
27
|
+
bundle install --jobs 4 --retry 3
|
|
28
|
+
- name: Use Node
|
|
29
|
+
uses: actions/setup-node@v1
|
|
30
|
+
with:
|
|
31
|
+
node-version: '8'
|
|
32
|
+
- name: Install Puppeteer
|
|
33
|
+
run: |
|
|
34
|
+
npm install -g puppeteer
|
|
35
|
+
- name: Run specs
|
|
36
|
+
run: |
|
|
37
|
+
bundle exec rake
|
|
@@ -44,6 +44,27 @@
|
|
|
44
44
|
</oneOrMore>
|
|
45
45
|
</element>
|
|
46
46
|
</define>
|
|
47
|
+
<define name="references">
|
|
48
|
+
<element name="references">
|
|
49
|
+
<optional>
|
|
50
|
+
<attribute name="id">
|
|
51
|
+
<data type="ID"/>
|
|
52
|
+
</attribute>
|
|
53
|
+
</optional>
|
|
54
|
+
<optional>
|
|
55
|
+
<ref name="section-title"/>
|
|
56
|
+
</optional>
|
|
57
|
+
<zeroOrMore>
|
|
58
|
+
<ref name="BasicBlock"/>
|
|
59
|
+
</zeroOrMore>
|
|
60
|
+
<zeroOrMore>
|
|
61
|
+
<ref name="bibitem"/>
|
|
62
|
+
<zeroOrMore>
|
|
63
|
+
<ref name="note"/>
|
|
64
|
+
</zeroOrMore>
|
|
65
|
+
</zeroOrMore>
|
|
66
|
+
</element>
|
|
67
|
+
</define>
|
|
47
68
|
</include>
|
|
48
69
|
<define name="standard-document">
|
|
49
70
|
<element name="standard-document">
|
|
@@ -560,41 +560,6 @@ RSpec.describe Asciidoctor::Iec do
|
|
|
560
560
|
OUTPUT
|
|
561
561
|
end
|
|
562
562
|
|
|
563
|
-
it "processes subfigures" do
|
|
564
|
-
expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
|
|
565
|
-
#{ASCIIDOC_BLANK_HDR}
|
|
566
|
-
[[figureC-2]]
|
|
567
|
-
.Stages of gelatinization
|
|
568
|
-
====
|
|
569
|
-
.Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)
|
|
570
|
-
image::spec/examples/rice_images/rice_image3_1.png[]
|
|
571
|
-
|
|
572
|
-
.Intermediate stages: Some fully gelatinized kernels are visible
|
|
573
|
-
image::spec/examples/rice_images/rice_image3_2.png[]
|
|
574
|
-
|
|
575
|
-
.Final stages: All kernels are fully gelatinized
|
|
576
|
-
image::spec/examples/rice_images/rice_image3_3.png[]
|
|
577
|
-
====
|
|
578
|
-
INPUT
|
|
579
|
-
#{BLANK_HDR}
|
|
580
|
-
<sections>
|
|
581
|
-
<figure id="figureC-2"><figure id="_">
|
|
582
|
-
<name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
|
|
583
|
-
<image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
|
584
|
-
</figure>
|
|
585
|
-
<figure id="_">
|
|
586
|
-
<name>Intermediate stages: Some fully gelatinized kernels are visible</name>
|
|
587
|
-
<image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
|
588
|
-
</figure>
|
|
589
|
-
<figure id="_">
|
|
590
|
-
<name>Final stages: All kernels are fully gelatinized</name>
|
|
591
|
-
<image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
|
592
|
-
</figure></figure>
|
|
593
|
-
</sections>
|
|
594
|
-
</iso-standard>
|
|
595
|
-
OUTPUT
|
|
596
|
-
end
|
|
597
|
-
|
|
598
563
|
it "numbers bibliographic notes and footnotes sequentially" do
|
|
599
564
|
expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
|
|
600
565
|
#{ASCIIDOC_BLANK_HDR}
|
data/spec/assets/iso.xml
ADDED
|
Binary file
|
|
@@ -23,7 +23,7 @@ RSpec.describe IsoDoc do
|
|
|
23
23
|
INPUT
|
|
24
24
|
expect(File.exist?("test.html")).to be true
|
|
25
25
|
html = File.read("test.html", encoding: "UTF-8")
|
|
26
|
-
expect(html).to match(%r{<title>Cereals and pulses
|
|
26
|
+
expect(html).to match(%r{<title>Cereals and pulses\ \— Specifications and test methods\ \— Rice</title>})
|
|
27
27
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
|
28
28
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
|
29
29
|
end
|
|
@@ -49,7 +49,7 @@ RSpec.describe IsoDoc do
|
|
|
49
49
|
INPUT
|
|
50
50
|
expect(File.exist?("test.html")).to be true
|
|
51
51
|
html = File.read("test.html", encoding: "UTF-8")
|
|
52
|
-
expect(html).to match(%r{<title>Cereals and pulses
|
|
52
|
+
expect(html).to match(%r{<title>Cereals and pulses\ \— Specifications and test methods\ \— Rice</title>})
|
|
53
53
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
|
54
54
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
|
55
55
|
end
|
|
@@ -158,7 +158,7 @@ RSpec.describe IsoDoc do
|
|
|
158
158
|
<div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1 class="main">1<span style="mso-tab-count:1">  </span>Terms and definitions</h1>
|
|
159
159
|
<p class="TermNum"><a name="paddy1" id="paddy1"></a>1.1</p><p class="Terms" style="text-align:left;">paddy</p>
|
|
160
160
|
<p class="MsoNormal"><a name="_eb29b35e-123e-4d1c-b50b-2714d41e747f" id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"></a>rice retaining its husk after threshing</p>
|
|
161
|
-
<p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified
|
|
161
|
+
<p class="MsoNormal">[SOURCE: <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]</p></div>
|
|
162
162
|
</div>
|
|
163
163
|
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
|
164
164
|
<div class="colophon"></div>
|
|
@@ -537,7 +537,7 @@ RSpec.describe IsoDoc do
|
|
|
537
537
|
<p class="Sourcecode"><a name="A" id="A"></a>puts "Hello, world."</p>
|
|
538
538
|
<p class="TableTitle" style="text-align:center;">Table A.1</p>
|
|
539
539
|
<div align="center">
|
|
540
|
-
<table style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" class="MsoISOTable"
|
|
540
|
+
<table style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-bspace:14.2pt;mso-table-anchor-vertical:paragraph;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;" class="MsoISOTable"><a name="samplecode" id="samplecode"></a>
|
|
541
541
|
<tbody>
|
|
542
542
|
<tr>
|
|
543
543
|
<td style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;" class="TABLE-cell">
|
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: 0.0.
|
|
4
|
+
version: 0.0.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: 2019-
|
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|
|
@@ -244,16 +244,17 @@ executables: []
|
|
|
244
244
|
extensions: []
|
|
245
245
|
extra_rdoc_files: []
|
|
246
246
|
files:
|
|
247
|
+
- ".github/workflows/macos.yml"
|
|
248
|
+
- ".github/workflows/ubuntu.yml"
|
|
249
|
+
- ".github/workflows/windows.yml"
|
|
247
250
|
- ".gitignore"
|
|
248
251
|
- ".hound.yml"
|
|
249
252
|
- ".rubocop.yml"
|
|
250
|
-
- ".travis.yml"
|
|
251
253
|
- CODE_OF_CONDUCT.md
|
|
252
254
|
- Gemfile
|
|
253
255
|
- LICENSE
|
|
254
256
|
- README.adoc
|
|
255
257
|
- Rakefile
|
|
256
|
-
- appveyor.yml
|
|
257
258
|
- bin/rspec
|
|
258
259
|
- lib/asciidoctor/iec/basicdoc.rng
|
|
259
260
|
- lib/asciidoctor/iec/biblio.rng
|
|
@@ -296,6 +297,12 @@ files:
|
|
|
296
297
|
- spec/asciidoctor-iec/section_spec.rb
|
|
297
298
|
- spec/asciidoctor-iec/table_spec.rb
|
|
298
299
|
- spec/asciidoctor-iec/validate_spec.rb
|
|
300
|
+
- spec/assets/header.html
|
|
301
|
+
- spec/assets/html.css
|
|
302
|
+
- spec/assets/iso.xml
|
|
303
|
+
- spec/assets/rice_image1.png
|
|
304
|
+
- spec/assets/word.css
|
|
305
|
+
- spec/assets/wordintro.html
|
|
299
306
|
- spec/examples/rice.adoc
|
|
300
307
|
- spec/examples/rice.doc
|
|
301
308
|
- spec/examples/rice.html
|
data/.travis.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Auto-generated !!! Do not edit it manually
|
|
2
|
-
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
|
3
|
-
language: ruby
|
|
4
|
-
cache: bundler
|
|
5
|
-
os:
|
|
6
|
-
- linux
|
|
7
|
-
- osx
|
|
8
|
-
rvm:
|
|
9
|
-
- 2.6
|
|
10
|
-
- 2.5
|
|
11
|
-
- 2.4
|
|
12
|
-
- ruby-head
|
|
13
|
-
before_install:
|
|
14
|
-
- nvm install 8
|
|
15
|
-
- npm install -g puppeteer
|
|
16
|
-
- npm install
|
|
17
|
-
- gem install bundler -v "~> 2"
|
|
18
|
-
- bundle update
|
|
19
|
-
matrix:
|
|
20
|
-
allow_failures:
|
|
21
|
-
- rvm: ruby-head
|
|
22
|
-
|
data/appveyor.yml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# Auto-generated !!! Do not edit it manually
|
|
2
|
-
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
|
3
|
-
version: '{build}'
|
|
4
|
-
|
|
5
|
-
cache:
|
|
6
|
-
- vendor/bundle
|
|
7
|
-
|
|
8
|
-
environment:
|
|
9
|
-
matrix:
|
|
10
|
-
- RUBY_VERSION: 26
|
|
11
|
-
- RUBY_VERSION: 25
|
|
12
|
-
- RUBY_VERSION: 24
|
|
13
|
-
- RUBY_VERSION: _trunk
|
|
14
|
-
|
|
15
|
-
matrix:
|
|
16
|
-
allow_failures:
|
|
17
|
-
- RUBY_VERSION: _trunk
|
|
18
|
-
|
|
19
|
-
install:
|
|
20
|
-
- ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
|
|
21
|
-
- refreshenv
|
|
22
|
-
|
|
23
|
-
build_script:
|
|
24
|
-
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
|
25
|
-
- set GIT_TERMINAL_PROMPT=0
|
|
26
|
-
- gem install bundler -v "~> 2"
|
|
27
|
-
- bundle config --local path vendor/bundle
|
|
28
|
-
- bundle update
|
|
29
|
-
- bundle install
|
|
30
|
-
|
|
31
|
-
before_test:
|
|
32
|
-
- ruby -v
|
|
33
|
-
- gem -v
|
|
34
|
-
- bundle -v
|
|
35
|
-
|
|
36
|
-
test_script:
|
|
37
|
-
- bundle exec rake
|