Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Jan 31, 2019
1 parent 44ef443 commit c896fe9
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 50 deletions.
2 changes: 1 addition & 1 deletion lib/metanorma/iso/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Metanorma
module ISO
VERSION = "1.1.0".freeze
VERSION = "1.1.1".freeze
end
end
20 changes: 10 additions & 10 deletions spec/asciidoctor-iso/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
expect(Metanorma::ISO::VERSION).not_to be nil
end

it "generates output for the Rice document" do
FileUtils.rm_f %w(spec/examples/rice.xml spec/examples/rice.doc spec/examples/rice.html spec/examples/rice_alt.html)
FileUtils.cd "spec/examples"
Asciidoctor.convert_file "rice.adoc", {:attributes=>{"backend"=>"iso"}, :safe=>0, :header_footer=>true, :requires=>["metanorma-iso"], :failure_level=>4, :mkdirs=>true, :to_file=>nil}
FileUtils.cd "../.."
expect(File.exist?("spec/examples/rice.xml")).to be true
expect(File.exist?("spec/examples/rice.doc")).to be true
expect(File.exist?("spec/examples/rice.html")).to be true
expect(File.exist?("spec/examples/rice_alt.html")).to be true
end
#it "generates output for the Rice document" do
#FileUtils.rm_f %w(spec/examples/rice.xml spec/examples/rice.doc spec/examples/rice.html spec/examples/rice_alt.html)
#FileUtils.cd "spec/examples"
#Asciidoctor.convert_file "rice.adoc", {:attributes=>{"backend"=>"iso"}, :safe=>0, :header_footer=>true, :requires=>["metanorma-iso"], :failure_level=>4, :mkdirs=>true, :to_file=>nil}
#FileUtils.cd "../.."
#expect(File.exist?("spec/examples/rice.xml")).to be true
#expect(File.exist?("spec/examples/rice.doc")).to be true
#expect(File.exist?("spec/examples/rice.html")).to be true
#expect(File.exist?("spec/examples/rice_alt.html")).to be true
#end

it "processes a blank document" do
expect(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).to be_equivalent_to <<~"OUTPUT"
Expand Down
4 changes: 2 additions & 2 deletions spec/asciidoctor-iso/blocks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@
INPUT
#{BLANK_HDR}
<sections>
<sourcecode id="_">puts "Hello, world."
<sourcecode lang="ruby" id="_">puts "Hello, world."
%w{a b c}.each do |x|
puts x
end</sourcecode>
Expand All @@ -395,7 +395,7 @@
<2> This is another callout
INPUT
#{BLANK_HDR}
<sections><sourcecode id="_">puts "Hello, world." <callout target="_">1</callout>
<sections><sourcecode lang="ruby" id="_">puts "Hello, world." <callout target="_">1</callout>
%w{a b c}.each do |x|
puts x <callout target="_">2</callout>
end<annotation id="_">
Expand Down
10 changes: 5 additions & 5 deletions spec/asciidoctor-iso/cleanup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<sections>
<terms id="_" obligation="normative">
<title>Terms and definitions</title>
<term id="_"><preferred><stem type="AsciiMath">t_90</stem></preferred><admitted><stem type="AsciiMath">t_91</stem></admitted>
<term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
<definition><p id="_">Time</p></definition></term>
</terms>
</sections>
Expand Down Expand Up @@ -87,8 +87,8 @@
<sections>
<terms id="_" obligation="normative">
<title>Terms and definitions</title>
<term id="_"><preferred><stem type="AsciiMath">t_90</stem></preferred><definition><formula id="_">
<stem type="AsciiMath">t_A</stem>
<term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>A</mi></msub></math></stem>
</formula><p id="_">This paragraph is extraneous</p></definition>
</term>
</terms>
Expand Down Expand Up @@ -160,7 +160,7 @@
NOTE: That loop does not do much
INPUT
#{BLANK_HDR}
<sections><sourcecode id="_">[1...x].each do |y|
<sections><sourcecode lang="ruby" id="_">[1...x].each do |y|
puts y
end</sourcecode>
<note id="_">
Expand Down Expand Up @@ -528,7 +528,7 @@
INPUT
#{BLANK_HDR}
<sections><formula id="_">
<stem type="AsciiMath">Formula</stem>
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>F</mi><mtext>or</mtext><mi>μ</mi><mi>l</mi><mi>a</mi></math></stem>
<dl id="_">
<dt>a</dt>
<dd>
Expand Down
2 changes: 1 addition & 1 deletion spec/asciidoctor-iso/inline_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
‘single quote’
super<sup>script</sup>
sub<sub>script</sub>
<stem type="AsciiMath">a_90</stem>
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>a</mi><mn>90</mn></msub></math></stem>
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
<admitted>alt</admitted>
<deprecates>deprecated</deprecates>
Expand Down
2 changes: 1 addition & 1 deletion spec/asciidoctor-iso/macros_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
INPUT
#{BLANK_HDR}
<sections>
<sourcecode id="_">@startuml
<sourcecode lang="plantuml" id="_">@startuml
Alice -&gt; Bob: Authentication Request
Bob --&gt; Alice: Authentication Response
Expand Down
13 changes: 9 additions & 4 deletions spec/asciidoctor-iso/section_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
<preferred>Term2</preferred>
</term>
</terms>
<definitions id="_"/></clause>
<definitions id="_"/>
<definitions id="_"><title>Symbols and Abbreviated Terms</title></definitions></clause>
<definitions id="_"><title>Symbols and Abbreviated Terms</title></definitions>
<clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
<title>Introduction</title>
</clause>
Expand Down Expand Up @@ -196,8 +196,13 @@
<preferred>Term2</preferred>
</term>
</clause>
<definitions id="_"/></terms>
<definitions id="_"/>
<definitions id="_">
<title>Σύμβολα και Συντομογραφίες</title>
</definitions>
</terms>
<definitions id="_">
<title>Σύμβολα και Συντομογραφίες</title>
</definitions>
<clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
<title>Introduction</title>
</clause>
Expand Down
2 changes: 1 addition & 1 deletion spec/asciidoctor-iso/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<tr>
<th rowspan="2" align="left">Defect</th>
<th colspan="4" align="center">Maximum permissible mass fraction of defects in husked rice<br/>
<stem type="AsciiMath">w_max</stem></th>
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><mi>max</mi></msub></math></stem></th>
</tr>
<tr>
<td align="left">in husked rice</td>
Expand Down
14 changes: 7 additions & 7 deletions spec/assets/iso.doc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MIME-Version: 1.0
Content-Type: multipart/related; boundary="----=_NextPart_26fc669d.7d89.4ed9"
Content-Type: multipart/related; boundary="----=_NextPart_6bb606bb.f022.46c5"

------=_NextPart_26fc669d.7d89.4ed9
------=_NextPart_6bb606bb.f022.46c5
Content-Location: file:///C:/Doc/iso.htm
Content-Type: text/html; charset="utf-8"

Expand Down Expand Up @@ -829,11 +829,11 @@ Switzerland<p class="MsoNormal"></p></span></p>
<p class="MsoToc1"><span lang="EN-GB" xml:lang="EN-GB"><span style="mso-element:field-begin"></span><span style="mso-spacerun:yes">&#xA0;</span>TOC
\o "1-2" \h \z \u <span style="mso-element:field-separator"></span></span>
<span class="MsoHyperlink"><span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
<a href="#_Toc183450640">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
<a href="#_Toc980760563">Foreword<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
<span style="mso-tab-count:1 dotted">. </span>
</span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">
<span style="mso-element:field-begin"></span></span>
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc183450640 \h </span>
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"> PAGEREF _Toc980760563 \h </span>
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-separator"></span></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB">1</span>
<span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"></span><span lang="EN-GB" class="MsoTocTextSpan" xml:lang="EN-GB"><span style="mso-element:field-end"></span></span></a></span></span></p>

Expand Down Expand Up @@ -870,7 +870,7 @@ Switzerland<p class="MsoNormal"></p></span></p>
</html>


------=_NextPart_26fc669d.7d89.4ed9
------=_NextPart_6bb606bb.f022.46c5
Content-Location: file:///C:/Doc/iso_files/filelist.xml
Content-Transfer-Encoding: base64
Content-Type: application/xml
Expand All @@ -880,7 +880,7 @@ ICAgICAgIDxvOk1haW5GaWxlIEhSZWY9Ii4uL3NwZWMvYXNzZXRzL2lzby5odG0iLz4gIDxvOkZp
bGUgSFJlZj0iZmlsZWxpc3QueG1sIi8+CiAgPG86RmlsZSBIUmVmPSJoZWFkZXIuaHRtbCIvPgo8
L3htbD4K

------=_NextPart_26fc669d.7d89.4ed9
------=_NextPart_6bb606bb.f022.46c5
Content-Location: file:///C:/Doc/iso_files/header.html
Content-Transfer-Encoding: base64
Content-Type: text/html charset="utf-8"
Expand Down Expand Up @@ -1073,4 +1073,4 @@ cD4NCg0KPHAgY2xhc3M9TXNvRm9vdGVyPjxzcGFuIGxhbmc9RU4tQVUgc3R5bGU9J2ZvbnQtc2l6
ZToxMC4wcHQ7Jz7CqQ0KJm5ic3A7Jm5ic3A74oCTIEFsbCByaWdodHMgcmVzZXJ2ZWQ8bzpwPjwv
bzpwPjwvc3Bhbj48L3A+DQoNCjwvZGl2Pg0KDQoNCg0KPC9ib2R5Pg0KDQo8L2h0bWw+DQo=

------=_NextPart_26fc669d.7d89.4ed9--
------=_NextPart_6bb606bb.f022.46c5--
21 changes: 9 additions & 12 deletions spec/isodoc/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
<date type="created"><from>2010</from><to>2011</to></date>
<date type="activated"><on>2013</on></date>
<date type="obsoleted"><on>2014</on></date>
<edition>2</edition>
<version>
<revision-date>2016-05-01</revision-date>
<draft>0.4</draft>
</version>
<contributor>
<role type="author"/>
<organization>
Expand Down Expand Up @@ -63,14 +68,10 @@
<workgroup number="3">Rice Group</workgroup>
<secretariat>GB</secretariat>
</editorialgroup>
</bibdata><version>
<edition>2</edition>
<revision-date>2016-05-01</revision-date>
<draft>0.4</draft>
</version>
</bibdata>
</iso-standard>
INPUT
{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :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: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :receiveddate=>"XXX", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :unpublished=>true, :updateddate=>"XXX", :wg=>"WG 3"}
{:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :confirmeddate=>"XXX", :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :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: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :receiveddate=>"XXX", :revdate=>"2016-05-01", :sc=>"SC 4", :secretariat=>"GB", :stage=>"30", :stage_int=>30, :stageabbr=>"PreCD3", :tc=>"TC 34", :tc_docnumber=>"17301", :unpublished=>true, :updateddate=>"XXX", :wg=>"WG 3"}
OUTPUT
end

Expand Down Expand Up @@ -140,14 +141,10 @@
</editorialgroup>
<ics><code>1.2.3</code></ics>
<ics><code>1.2.3</code></ics>
</bibdata><version>
<edition>2</edition>
<revision-date>2016-05-01</revision-date>
<draft>12</draft>
</version>
</bibdata>
</iso-standard>
INPUT
{:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :confirmeddate=>"XXX", :createddate=>"XXX", :docnumber=>"ISO/IEC/CD 17301-1-3", :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", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1&ndash;3: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1&ndash;3: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05-01)", :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisheddate=>"XXX", :receiveddate=>"XXX", :revdate=>"2016-05-01", :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>"17301", :unpublished=>false, :updateddate=>"XXX", :wg=>"GHI 3"}
{:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :confirmeddate=>"XXX", :createddate=>"XXX", :docnumber=>"ISO/IEC/CD 17301-1-3", :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", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Partie&nbsp;1&ndash;3: Riz", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Part&nbsp;1&ndash;3: Rice", :doctype=>"International Standard", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisheddate=>"XXX", :receiveddate=>"XXX", :revdate=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"60", :stage_int=>60, :stageabbr=>"IS", :tc=>"ABC 34", :tc_docnumber=>"17301", :unpublished=>false, :updateddate=>"XXX", :wg=>"GHI 3"}
OUTPUT
end

Expand Down
12 changes: 6 additions & 6 deletions spec/isodoc/xref_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
<p class="zzSTDTitle1"/>
<div id="scope">
<h1>1.&#160; Scope</h1>
<div id="N" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</div>
<div id="N" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div>
<p>
<a href="#N">Formula (1)</a>
</p>
Expand All @@ -587,19 +587,19 @@
<div id="widgets">
<h1>3.&#160; Widgets</h1>
<div id="widgets1"><h2>3.1. </h2>
<div id="note1" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (2)</div>
<div id="note2" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (3)</div>
<div id="note1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (2)</p></div>
<div id="note2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (3)</p></div>
<p> <a href="#note1">Formula (2)</a> <a href="#note2">Formula (3)</a> </p>
</div>
</div>
<br/>
<div id="annex1" class="Section3">
<div id="annex1a"><h2>A.1. </h2>
<div id="AN" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.1)</div>
<div id="AN" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.1)</p></div>
</div>
<div id="annex1b"><h2>A.2. </h2>
<div id="Anote1" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.2)</div>
<div id="Anote2" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.3)</div>
<div id="Anote1" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.2)</p></div>
<div id="Anote2" class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (A.3)</p></div>
</div>
</div>
</div>
Expand Down

0 comments on commit c896fe9

Please sign in to comment.