isodoc 0.10.0 → 0.10.1
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/Gemfile.lock +4 -4
- data/lib/isodoc/function/references.rb +7 -5
- data/lib/isodoc/version.rb +1 -1
- data/spec/isodoc/ref_spec.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ada6cf28f78a8cda7b4541696aa81bd9e0abf1f013ffd7f34b4c9e91d65d6a2
|
|
4
|
+
data.tar.gz: '0652283921a95138d5460d0bbfb8d47386cd3f1e602a2a23f3fbe626bd2646f5'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6908a1a736a3a66254dfc92c72b08539a463edec1d0f3c7897e6b3c5b5d01e33eaf0f7940b848a7b138d2737aacf9d7376c8f058975f27ea731ff2a847391508
|
|
7
|
+
data.tar.gz: 26d38c9f2a4a114f6e566462a71dcf4b80eff49a0ad99e61aceb5732d6edaed967c6cdf3c5f55e30e80b829cb8d6fae12fb28855673e9bab5fb944bbbf8ae474
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
isodoc (0.10.
|
|
4
|
+
isodoc (0.10.1)
|
|
5
5
|
asciimath
|
|
6
6
|
html2doc (~> 0.8.11)
|
|
7
7
|
htmlentities (~> 4.3.4)
|
|
@@ -42,7 +42,7 @@ GEM
|
|
|
42
42
|
guard (~> 2.1)
|
|
43
43
|
guard-compat (~> 1.1)
|
|
44
44
|
rspec (>= 2.99.0, < 4.0)
|
|
45
|
-
html2doc (0.8.
|
|
45
|
+
html2doc (0.8.12)
|
|
46
46
|
asciimath (~> 1.0.7)
|
|
47
47
|
htmlentities (~> 4.3.4)
|
|
48
48
|
image_size
|
|
@@ -59,7 +59,7 @@ GEM
|
|
|
59
59
|
rb-inotify (~> 0.9, >= 0.9.7)
|
|
60
60
|
ruby_dep (~> 1.2)
|
|
61
61
|
lumberjack (1.0.13)
|
|
62
|
-
metanorma (0.3.
|
|
62
|
+
metanorma (0.3.12)
|
|
63
63
|
asciidoctor
|
|
64
64
|
htmlentities
|
|
65
65
|
method_source (0.9.2)
|
|
@@ -90,7 +90,7 @@ GEM
|
|
|
90
90
|
rspec-core (~> 3.8.0)
|
|
91
91
|
rspec-expectations (~> 3.8.0)
|
|
92
92
|
rspec-mocks (~> 3.8.0)
|
|
93
|
-
rspec-core (3.8.
|
|
93
|
+
rspec-core (3.8.2)
|
|
94
94
|
rspec-support (~> 3.8.0)
|
|
95
95
|
rspec-expectations (3.8.4)
|
|
96
96
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
@@ -38,9 +38,11 @@ module IsoDoc::Function
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def iso_title(b)
|
|
41
|
-
title = b.at(ns("./title[@language = '#{@
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
title = b.at(ns("./title[@language = '#{@lang}' and @type = 'main']")) ||
|
|
42
|
+
b.at(ns("./title[@language = '#{@lang}']")) ||
|
|
43
|
+
b.at(ns("./title[@type = 'main']")) ||
|
|
44
|
+
b.at(ns("./title"))
|
|
45
|
+
title
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
# reference not to be rendered because it is deemed implicit
|
|
@@ -61,7 +63,7 @@ module IsoDoc::Function
|
|
|
61
63
|
ref << iso_bibitem_ref_code(b)
|
|
62
64
|
date_note_process(b, ref)
|
|
63
65
|
ref << ", "
|
|
64
|
-
ref.i { |i| i << " #{iso_title(b)}" }
|
|
66
|
+
ref.i { |i| i << " #{iso_title(b).text}" }
|
|
65
67
|
end
|
|
66
68
|
end
|
|
67
69
|
|
|
@@ -79,7 +81,7 @@ module IsoDoc::Function
|
|
|
79
81
|
if ftitle = b.at(ns("./formattedref"))
|
|
80
82
|
ftitle&.children&.each { |n| parse(n, r) }
|
|
81
83
|
else
|
|
82
|
-
title =
|
|
84
|
+
title = iso_title(b)
|
|
83
85
|
r.i do |i|
|
|
84
86
|
title&.children&.each { |n| parse(n, i) }
|
|
85
87
|
end
|
data/lib/isodoc/version.rb
CHANGED
data/spec/isodoc/ref_spec.rb
CHANGED
|
@@ -4,6 +4,9 @@ RSpec.describe IsoDoc do
|
|
|
4
4
|
it "processes IsoXML bibliographies" do
|
|
5
5
|
expect(IsoDoc::HtmlConvert.new({}).convert("test", <<~"INPUT", true)).to be_equivalent_to <<~"OUTPUT"
|
|
6
6
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
|
7
|
+
<bibdata>
|
|
8
|
+
<language>en</language>
|
|
9
|
+
</bibdata>
|
|
7
10
|
<preface><foreword>
|
|
8
11
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
|
9
12
|
<eref bibitemid="ISO712"/>
|
|
@@ -14,7 +17,8 @@ RSpec.describe IsoDoc do
|
|
|
14
17
|
</foreword></preface>
|
|
15
18
|
<bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
|
|
16
19
|
<bibitem id="ISO712" type="standard">
|
|
17
|
-
<title format="text/plain">Cereals
|
|
20
|
+
<title format="text/plain">Cereals or cereal products</title>
|
|
21
|
+
<title type="main" format="text/plain">Cereals and cereal products</title>
|
|
18
22
|
<docidentifier type="ISO">ISO 712</docidentifier>
|
|
19
23
|
<contributor>
|
|
20
24
|
<role type="publisher"/>
|
|
@@ -24,7 +28,8 @@ RSpec.describe IsoDoc do
|
|
|
24
28
|
</contributor>
|
|
25
29
|
</bibitem>
|
|
26
30
|
<bibitem id="ISO16634" type="standard">
|
|
27
|
-
<title format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
|
|
31
|
+
<title language="x" format="text/plain">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal feeding stuffs</title>
|
|
32
|
+
<title language="en" format="text/plain">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
|
|
28
33
|
<docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
|
|
29
34
|
<date type="published"><on>--</on></date>
|
|
30
35
|
<contributor>
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: isodoc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.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: 2019-06-
|
|
11
|
+
date: 2019-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciimath
|