metanorma-csand 1.0.7 → 1.0.8

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: 3f72fb053ef6f5498b07128eab4938b772ae6f978dc405fe7410dd1ce536d25c
4
- data.tar.gz: 94cfb906070e72023908f51d3dd0719a564adc365fa8a7931534f5a1f2ac39af
3
+ metadata.gz: aaa18ba2049c946b9db17988b63c4137cf3db235aedaad050dad6dad2f31e47e
4
+ data.tar.gz: f2af1a2be2115d40f09a959e6a2822ce7f2ba2c3c68a447971e5577dfeec65a5
5
5
  SHA512:
6
- metadata.gz: 5742c99c1d46d8d6c7eef7edd12e63e7b6e97a7cd99c27039a94b3bc6ec4eb51280f6f6bb9c2089f66ab535c9e775b3f79b4436cc9997e2fac97f3b9e519da58
7
- data.tar.gz: bdd4cfc7feb8223270814bcef373258b2a1c3ba2334e6a4466d71af39de1b0b5d213b8cf6b2391bd54a6ad42a0ef8e3ea9bfed5a29611ad6acc57fecc042875c
6
+ metadata.gz: 52f3835f9c4adaff9a3490c79b00b74493191fde0445df02e22ea2dc1ce40e072486a49b9d617b26cd707bf23fff1d500cd3c5fc1cadea7d24a6b52475178181
7
+ data.tar.gz: 7ee7a3824c0ead9b0cde7e7337d3623ed6759a37de33f3721fb804988f37bded40fe7661b7e5c2f21dbc5dd790e1ba4a514bef7ac6910a7fcd8a1c050dc38547
data/.hound.yml ADDED
@@ -0,0 +1,3 @@
1
+ ruby:
2
+ Enabled: true
3
+ config_file: .rubocop.yml
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ # This project follows the Ribose OSS style guide.
2
+ # https://github.com/riboseinc/oss-guides
3
+ # All project-specific additions and overrides should be specified in this file.
4
+
5
+ inherit_from:
6
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
+ AllCops:
8
+ TargetRubyVersion: 2.3
9
+ Rails:
10
+ Enabled: true
@@ -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>
@@ -45,20 +45,21 @@ module Asciidoctor
45
45
  end
46
46
  end
47
47
 
48
- def title(node, xml)
49
- ["en"].each do |lang|
50
- xml.title **{ language: lang, format: "plain" } do |t|
51
- t << asciidoc_sub(node.attr("title"))
52
- end
53
- end
54
- end
55
-
56
48
  def metadata_status(node, xml)
57
49
  xml.status(**{ format: "plain" }) { |s| s << node.attr("status") }
58
50
  end
59
51
 
60
52
  def metadata_id(node, xml)
61
- xml.docidentifier { |i| i << node.attr("docnumber") }
53
+ docstatus = node.attr("status")
54
+ dn = node.attr("docnumber")
55
+ if docstatus
56
+ abbr = IsoDoc::Csand::Metadata.new("en", "Latn", {}).
57
+ status_abbr(docstatus)
58
+ dn = "#{dn}(#{abbr})" unless abbr.empty?
59
+ end
60
+ node.attr("copyright-year") and dn += ":#{node.attr("copyright-year")}"
61
+ xml.docidentifier dn, **{type: "csand"}
62
+ xml.docnumber { |i| i << node.attr("docnumber") }
62
63
  end
63
64
 
64
65
  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>
@@ -19,8 +19,6 @@
19
19
 
20
20
  <div class="doc-number">
21
21
  <span class="docnumber">{{ docnumber }}</span>
22
- <span class="docnumber-separator">:</span>
23
- <span class="docyear">{{ docyear }}</span>
24
22
  </div>
25
23
 
26
24
  <div class="title-first">{{ doctitle }}</div>
@@ -82,6 +82,11 @@ h1, h2, h3, h4, h5, h6, .h2Annex {
82
82
  font-family: $headerfont;
83
83
  }
84
84
 
85
+ li {
86
+ margin-left: 1em;
87
+ list-style-position: outside;
88
+ }
89
+
85
90
  dl {
86
91
  display: grid;
87
92
  grid-template-columns: max-content auto;
@@ -27,19 +27,8 @@ module IsoDoc
27
27
 
28
28
 
29
29
  def docid(isoxml, _out)
30
- docnumber = isoxml.at(ns("//bibdata/docidentifier"))
31
- docstatus = isoxml.at(ns("//bibdata/status"))
32
- dn = docnumber&.text
33
- if docstatus
34
- set(:status, status_print(docstatus.text))
35
- abbr = status_abbr(docstatus.text)
36
- dn = "#{dn}(#{abbr})" unless abbr.empty?
37
- end
38
- set(:docnumber, dn)
39
- end
40
-
41
- def status_print(status)
42
- status.split(/-/).map{ |w| w.capitalize }.join(" ")
30
+ docnumber = isoxml.at(ns("//bibdata/docidentifier[@type = 'csand']"))
31
+ set(:docnumber, docnumber&.text)
43
32
  end
44
33
 
45
34
  def status_abbr(status)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csand
3
- VERSION = "1.0.7"
3
+ VERSION = "1.0.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csand
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
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
@@ -345,6 +345,8 @@ extensions: []
345
345
  extra_rdoc_files: []
346
346
  files:
347
347
  - ".gitignore"
348
+ - ".hound.yml"
349
+ - ".rubocop.yml"
348
350
  - ".travis.yml"
349
351
  - CODE_OF_CONDUCT.md
350
352
  - Gemfile