metanorma-acme 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -7
- data/.travis.yml +2 -0
- data/lib/asciidoctor/acme/acme.rng +6 -3
- data/lib/asciidoctor/acme/biblio.rng +10 -0
- data/lib/asciidoctor/acme/converter.rb +6 -9
- data/lib/asciidoctor/acme/isodoc.rng +3 -0
- data/lib/asciidoctor/acme/isostandard.rng +6 -0
- data/lib/isodoc/acme/html/htmlstyle.scss +1 -1
- data/lib/isodoc/acme/word_convert.rb +0 -29
- data/lib/metanorma/acme/version.rb +1 -1
- 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: b4803bf90b5668d13750c9b0522e3cf1c348948eeccfaf8c6ae8ca39ea3c91eb
|
4
|
+
data.tar.gz: 9eee46a6c47da7db9630b7e0106cf707299c8720bcb87b98b56a5568d2bf24d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 106b17c80727c2a68d20d0680b87bc62a39385e267d3d34593a95d777fc4ec430e21516b4f2d3ece034e97fcf58c4c0e1fe02d8bf3c8c9496decd37bf0a206d1
|
7
|
+
data.tar.gz: af67308f96a1ebd456b52b2ee3a355a05adb83337d69a5e8f37392b7e2c94dc2d8cd6659a5955ca88ca9d2ba41e02f9173dba397c8345dda125432de3160f99c
|
data/.rubocop.yml
CHANGED
@@ -3,13 +3,8 @@
|
|
3
3
|
# All project-specific additions and overrides should be specified in this file.
|
4
4
|
|
5
5
|
inherit_from:
|
6
|
-
|
7
|
-
- ".rubocop.tb.yml"
|
8
|
-
# Overrides from Ribose
|
9
|
-
- ".rubocop.ribose.yml"
|
6
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
10
7
|
AllCops:
|
11
|
-
|
12
|
-
StyleGuideCopsOnly: false
|
13
|
-
TargetRubyVersion: 2.5
|
8
|
+
TargetRubyVersion: 2.3
|
14
9
|
Rails:
|
15
10
|
Enabled: true
|
data/.travis.yml
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
-->
|
8
8
|
<include href="isostandard.rng">
|
9
9
|
<start>
|
10
|
-
<ref name="
|
10
|
+
<ref name="acme-standard"/>
|
11
11
|
</start>
|
12
12
|
<define name="language">
|
13
13
|
<element name="language">
|
@@ -140,6 +140,9 @@
|
|
140
140
|
<zeroOrMore>
|
141
141
|
<ref name="docidentifier"/>
|
142
142
|
</zeroOrMore>
|
143
|
+
<optional>
|
144
|
+
<ref name="docnumber"/>
|
145
|
+
</optional>
|
143
146
|
<zeroOrMore>
|
144
147
|
<ref name="bdate"/>
|
145
148
|
</zeroOrMore>
|
@@ -203,8 +206,8 @@
|
|
203
206
|
<text/>
|
204
207
|
</element>
|
205
208
|
</define>
|
206
|
-
<define name="
|
207
|
-
<element name="
|
209
|
+
<define name="acme-standard">
|
210
|
+
<element name="acme-standard">
|
208
211
|
<ref name="bibdata"/>
|
209
212
|
<optional>
|
210
213
|
<ref name="version"/>
|
@@ -476,6 +476,9 @@
|
|
476
476
|
<zeroOrMore>
|
477
477
|
<ref name="docidentifier"/>
|
478
478
|
</zeroOrMore>
|
479
|
+
<optional>
|
480
|
+
<ref name="docnumber"/>
|
481
|
+
</optional>
|
479
482
|
<zeroOrMore>
|
480
483
|
<ref name="bdate"/>
|
481
484
|
</zeroOrMore>
|
@@ -637,6 +640,8 @@
|
|
637
640
|
<value>transmitted</value>
|
638
641
|
<value>copied</value>
|
639
642
|
<value>unchanged</value>
|
643
|
+
<value>circulated</value>
|
644
|
+
<text/>
|
640
645
|
</choice>
|
641
646
|
</attribute>
|
642
647
|
<choice>
|
@@ -673,6 +678,11 @@
|
|
673
678
|
<text/>
|
674
679
|
</element>
|
675
680
|
</define>
|
681
|
+
<define name="docnumber">
|
682
|
+
<element name="docnumber">
|
683
|
+
<text/>
|
684
|
+
</element>
|
685
|
+
</define>
|
676
686
|
<define name="bclassification">
|
677
687
|
<element name="classification">
|
678
688
|
<optional>
|
@@ -43,20 +43,17 @@ module Asciidoctor
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
def title(node, xml)
|
47
|
-
["en"].each do |lang|
|
48
|
-
xml.title **{ language: lang, format: "plain" } do |t|
|
49
|
-
t << asciidoc_sub(node.attr("title"))
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
46
|
def metadata_status(node, xml)
|
55
47
|
xml.status(**{ format: "plain" }) { |s| s << node.attr("status") }
|
56
48
|
end
|
57
49
|
|
58
50
|
def metadata_id(node, xml)
|
59
|
-
|
51
|
+
return unless node.attr("docnumber")
|
52
|
+
xml.docidentifier do |i|
|
53
|
+
i << "#{Metanorma::Acme::ORGANIZATION_NAME_SHORT} "\
|
54
|
+
"#{node.attr("docnumber")}"
|
55
|
+
end
|
56
|
+
xml.docnumber { |i| i << node.attr("docnumber") }
|
60
57
|
end
|
61
58
|
|
62
59
|
def metadata_copyright(node, xml)
|
@@ -84,6 +84,9 @@
|
|
84
84
|
<zeroOrMore>
|
85
85
|
<ref name="docidentifier"/>
|
86
86
|
</zeroOrMore>
|
87
|
+
<optional>
|
88
|
+
<ref name="docnumber"/>
|
89
|
+
</optional>
|
87
90
|
<zeroOrMore>
|
88
91
|
<ref name="bdate"/>
|
89
92
|
</zeroOrMore>
|
@@ -163,6 +166,9 @@
|
|
163
166
|
<zeroOrMore>
|
164
167
|
<ref name="docidentifier"/>
|
165
168
|
</zeroOrMore>
|
169
|
+
<optional>
|
170
|
+
<ref name="docnumber"/>
|
171
|
+
</optional>
|
166
172
|
<zeroOrMore>
|
167
173
|
<ref name="bdate"/>
|
168
174
|
</zeroOrMore>
|
@@ -57,35 +57,6 @@ module IsoDoc
|
|
57
57
|
section_break(body)
|
58
58
|
end
|
59
59
|
|
60
|
-
def title(isoxml, _out)
|
61
|
-
main = isoxml&.at(ns("//title[@language='en']"))&.text
|
62
|
-
set_metadata(:doctitle, main)
|
63
|
-
end
|
64
|
-
|
65
|
-
def generate_header(filename, dir)
|
66
|
-
return unless @header
|
67
|
-
template = Liquid::Template.parse(File.read(@header, encoding: "UTF-8"))
|
68
|
-
meta = @meta.get
|
69
|
-
meta[:filename] = filename
|
70
|
-
params = meta.map { |k, v| [k.to_s, v] }.to_h
|
71
|
-
File.open("header.html", "w") { |f| f.write(template.render(params)) }
|
72
|
-
@files_to_delete << "header.html"
|
73
|
-
"header.html"
|
74
|
-
end
|
75
|
-
|
76
|
-
def header_strip(h)
|
77
|
-
h = h.to_s.gsub(%r{<br/>}, " ").sub(/<\/?h[12][^>]*>/, "")
|
78
|
-
h1 = to_xhtml_fragment(h.dup)
|
79
|
-
h1.traverse do |x|
|
80
|
-
x.replace(" ") if x.name == "span" &&
|
81
|
-
/mso-tab-count/.match(x["style"])
|
82
|
-
x.remove if x.name == "span" && x["class"] == "MsoCommentReference"
|
83
|
-
x.remove if x.name == "a" && x["epub:type"] == "footnote"
|
84
|
-
x.replace(x.children) if x.name == "a"
|
85
|
-
end
|
86
|
-
from_xhtml(h1)
|
87
|
-
end
|
88
|
-
|
89
60
|
def info(isoxml, out)
|
90
61
|
@meta.security isoxml, out
|
91
62
|
super
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-acme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|