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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '055496ecad0c9599c3343121300fd15c360c4955655d0433cd24228eeae85eb4'
4
- data.tar.gz: 54842f7c59725cba1fc60758cf1658c31f5af4f9dd28fb9a54eb161e00b43c76
3
+ metadata.gz: b4803bf90b5668d13750c9b0522e3cf1c348948eeccfaf8c6ae8ca39ea3c91eb
4
+ data.tar.gz: 9eee46a6c47da7db9630b7e0106cf707299c8720bcb87b98b56a5568d2bf24d7
5
5
  SHA512:
6
- metadata.gz: 16a9d7556f6b9bfcdb63b768a22f917a0e4202ac3357b4dab1aefac89ca9b12fe46e0f6c34782d9621fc914dfd9d155da748db605a9f5a24a40ee0dc74c5d526
7
- data.tar.gz: ef45ef75d0367b300a05c1db933febadb042a3f6cdcfaf74c305c9313fac2ccbc2e330a22f6da9526e8adffe824a2e11953fbf72f4e48f6d06a86fc2595f5a1d
6
+ metadata.gz: 106b17c80727c2a68d20d0680b87bc62a39385e267d3d34593a95d777fc4ec430e21516b4f2d3ece034e97fcf58c4c0e1fe02d8bf3c8c9496decd37bf0a206d1
7
+ data.tar.gz: af67308f96a1ebd456b52b2ee3a355a05adb83337d69a5e8f37392b7e2c94dc2d8cd6659a5955ca88ca9d2ba41e02f9173dba397c8345dda125432de3160f99c
@@ -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
- # Thoughtbot's style guide from: https://github.com/thoughtbot/guides
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
- DisplayCopNames: false
12
- StyleGuideCopsOnly: false
13
- TargetRubyVersion: 2.5
8
+ TargetRubyVersion: 2.3
14
9
  Rails:
15
10
  Enabled: true
@@ -8,6 +8,8 @@ rvm:
8
8
  - ruby-head
9
9
  before_install:
10
10
  - gem install bundler -v 1.16.1
11
+ - npm install -g puppeteer
12
+ - npm install
11
13
  - unset _JAVA_OPTIONS
12
14
  matrix:
13
15
  allow_failures:
@@ -7,7 +7,7 @@
7
7
  -->
8
8
  <include href="isostandard.rng">
9
9
  <start>
10
- <ref name="rsd-standard"/>
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="rsd-standard">
207
- <element name="rsd-standard">
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
- xml.docidentifier { |i| i << node.attr("docnumber") }
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)
@@ -1034,6 +1034,9 @@
1034
1034
  <zeroOrMore>
1035
1035
  <ref name="docidentifier"/>
1036
1036
  </zeroOrMore>
1037
+ <optional>
1038
+ <ref name="docnumber"/>
1039
+ </optional>
1037
1040
  <zeroOrMore>
1038
1041
  <ref name="bdate"/>
1039
1042
  </zeroOrMore>
@@ -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>
@@ -517,7 +517,7 @@ p.document-stage {
517
517
  }
518
518
 
519
519
  ul li:before {
520
- content: "";
520
+ content: "\2014";
521
521
  display: inline-block; width: 1em;
522
522
  margin-left: -1.2em;
523
523
  }
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Acme
3
- VERSION = "1.0.3"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
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.3
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-10-26 00:00:00.000000000 Z
11
+ date: 2018-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor