metanorma-ogc 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ogc/reqt.rng +1 -1
- data/lib/isodoc/ogc/biblio.rb +9 -7
- data/lib/isodoc/ogc/html_convert.rb +0 -4
- data/lib/isodoc/ogc/reqt.rb +4 -5
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf5663cc79d98ff38a32717c48b8b0ab1a0bddb9b37c19dad11cc1ffabe4c705
|
4
|
+
data.tar.gz: e89c3705f344428e79691d2803a144f9c1f4555f46fae166e60727482f3c77f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fee53d546401cf6daa7ded839c091bb6938761dd6cddb643cf99e8e42f0bb966e2df6e16c7589e41ffe7ff92d3c554f272c372cac7b55b7b05cbff039297a748
|
7
|
+
data.tar.gz: 86a37701755ce86fa6bb69f82d27a608797eb902f9ed17dc853b00ebafd3149afe7becfbf88004114d00c1d63b64764d815ccc13706f4e9482f699cbb093a583
|
data/lib/isodoc/ogc/biblio.rb
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ogc
|
3
3
|
module BaseConvert
|
4
|
-
def
|
5
|
-
return if implicit_reference(b)
|
4
|
+
def std_bibitem_entry(list, b, ordinal, biblio)
|
6
5
|
list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
|
7
6
|
prefix_bracketed_ref(ref, ordinal) if biblio
|
8
7
|
standard_citation(ref, b)
|
9
8
|
end
|
10
9
|
end
|
11
10
|
|
12
|
-
def
|
11
|
+
def nonstd_bibitem(list, b, ordinal, bibliography)
|
13
12
|
list.p **attr_code(iso_bibitem_entry_attrs(b, bibliography)) do |r|
|
13
|
+
id = bibitem_ref_code(b)
|
14
14
|
if bibliography
|
15
|
-
|
16
|
-
prefix = b&.at(ns("./docidentifier/@type"))&.text
|
17
|
-
ref_entry_code(r, ordinal, prefix, id) unless prefix
|
15
|
+
ref_entry_code(r, ordinal, id)
|
18
16
|
end
|
19
17
|
reference_format(b, r)
|
20
18
|
end
|
@@ -85,11 +83,14 @@ module IsoDoc
|
|
85
83
|
|
86
84
|
# {author}: {document identifier}, {title}. {publisher}, {city} ({year})
|
87
85
|
def standard_citation(out, b)
|
86
|
+
if ftitle = b.at(ns("./formattedref"))
|
87
|
+
ftitle&.children&.each { |n| parse(n, out) }
|
88
|
+
else
|
88
89
|
pub, pub_abbrev = extract_publisher(b)
|
89
90
|
c = extract_city(b)
|
90
91
|
y = extract_year(b)
|
91
92
|
out << "#{pub_abbrev}: " if pub_abbrev
|
92
|
-
out <<
|
93
|
+
out << bibitem_ref_code(b)
|
93
94
|
out << ", "
|
94
95
|
out.i do |i|
|
95
96
|
iso_title(b)&.children&.each { |n| parse(n, i) }
|
@@ -100,6 +101,7 @@ module IsoDoc
|
|
100
101
|
c&.children&.each { |n| parse(n, out) }
|
101
102
|
out << " " if (pub || c) && y
|
102
103
|
out << "(#{y})." if y
|
104
|
+
end
|
103
105
|
end
|
104
106
|
end
|
105
107
|
end
|
data/lib/isodoc/ogc/reqt.rb
CHANGED
@@ -7,13 +7,12 @@ module IsoDoc
|
|
7
7
|
module BaseConvert
|
8
8
|
def recommend_table_attr(node)
|
9
9
|
attr_code(id: node["id"], class: "recommend",
|
10
|
-
|
11
|
-
style: "border-collapse:collapse" )
|
10
|
+
style: "border-collapse:collapse;border-spacing:0;" )
|
12
11
|
end
|
13
12
|
|
14
13
|
REQ_TBL_ATTR =
|
15
|
-
{
|
16
|
-
style: "width:100.0pt;padding:0 0 0 1em;margin-left:0pt" }.freeze
|
14
|
+
{ class: "example_label",
|
15
|
+
style: "width:100.0pt;padding:0 0 0 1em;margin-left:0pt;vertical-align:top;" }.freeze
|
17
16
|
|
18
17
|
def recommendation_name(node, out, type)
|
19
18
|
out.p **{ class: "AdmonitionTitle" } do |b|
|
@@ -36,7 +35,7 @@ module IsoDoc
|
|
36
35
|
end
|
37
36
|
|
38
37
|
def recommendation_body(node, tr)
|
39
|
-
tr.td **{
|
38
|
+
tr.td **{ style: "vertical-align:top;", class: "recommend" } do |td|
|
40
39
|
recommend_title(node, td)
|
41
40
|
node.children.each do |n|
|
42
41
|
parse(n, td) unless %(label title).include?(n.name)
|
data/metanorma-ogc.gemspec
CHANGED
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_dependency "asciidoctor", "~> 1.5.7"
|
28
28
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
29
29
|
spec.add_dependency "ruby-jing"
|
30
|
-
spec.add_dependency "metanorma-standoc", "~> 1.
|
31
|
-
spec.add_dependency "isodoc", "~> 0.
|
30
|
+
spec.add_dependency "metanorma-standoc", "~> 1.3.0"
|
31
|
+
spec.add_dependency "isodoc", "~> 1.0.0"
|
32
32
|
spec.add_dependency "iso-639"
|
33
33
|
|
34
34
|
spec.add_development_dependency "bundler", "~> 2.0.1"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -58,28 +58,28 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.3.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.3.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: isodoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 1.0.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 1.0.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: iso-639
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|