metanorma-csa 1.6.7 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +7 -5
- data/lib/asciidoctor/csa/basicdoc.rng +52 -3
- data/lib/asciidoctor/csa/converter.rb +21 -41
- data/lib/asciidoctor/csa/isodoc.rng +51 -3
- data/lib/isodoc/csa/base_convert.rb +2 -12
- data/lib/isodoc/csa/csa.standard.xsl +259 -51
- data/lib/isodoc/csa/html/csa.css +19 -20
- data/lib/isodoc/csa/html/csa.scss +19 -20
- data/lib/isodoc/csa/html/htmlstyle.css +7 -7
- data/lib/isodoc/csa/html/htmlstyle.scss +6 -6
- data/lib/isodoc/csa/html/wordstyle.css +19 -19
- data/lib/isodoc/csa/html/wordstyle.scss +19 -19
- data/lib/isodoc/csa/html_convert.rb +2 -43
- data/lib/isodoc/csa/i18n.rb +3 -4
- data/lib/isodoc/csa/metadata.rb +3 -18
- data/lib/isodoc/csa/presentation_xml_convert.rb +2 -1
- data/lib/isodoc/csa/word_convert.rb +1 -25
- data/lib/isodoc/csa/xref.rb +1 -1
- data/lib/metanorma/csa.rb +26 -1
- data/lib/metanorma/csa/processor.rb +10 -10
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.gemspec +1 -10
- data/metanorma.yml +61 -0
- metadata +6 -104
- data/lib/asciidoctor/csa/validate.rb +0 -33
metadata
CHANGED
@@ -1,127 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: metanorma-generic
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: image_size
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: mime-types
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: ruby-jing
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: thread_safe
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: uuidtools
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: metanorma-standoc
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 1.6.0
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 1.6.0
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: isodoc
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 1.2.0
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 1.2.0
|
26
|
+
version: 1.9.0
|
125
27
|
- !ruby/object:Gem::Dependency
|
126
28
|
name: byebug
|
127
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -294,7 +196,6 @@ files:
|
|
294
196
|
- lib/asciidoctor/csa/csa.rng
|
295
197
|
- lib/asciidoctor/csa/isodoc.rng
|
296
198
|
- lib/asciidoctor/csa/reqt.rng
|
297
|
-
- lib/asciidoctor/csa/validate.rb
|
298
199
|
- lib/isodoc/csa/base_convert.rb
|
299
200
|
- lib/isodoc/csa/csa.standard.xsl
|
300
201
|
- lib/isodoc/csa/html/csa-logo-white.png
|
@@ -327,6 +228,7 @@ files:
|
|
327
228
|
- lib/metanorma/csa/processor.rb
|
328
229
|
- lib/metanorma/csa/version.rb
|
329
230
|
- metanorma-csa.gemspec
|
231
|
+
- metanorma.yml
|
330
232
|
homepage: https://github.com/metanorma/metanorma-csa
|
331
233
|
licenses:
|
332
234
|
- BSD-2-Clause
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Asciidoctor
|
2
|
-
module Csa
|
3
|
-
class Converter < Standoc::Converter
|
4
|
-
def content_validate(doc)
|
5
|
-
super
|
6
|
-
bibdata_validate(doc.root)
|
7
|
-
end
|
8
|
-
|
9
|
-
def bibdata_validate(doc)
|
10
|
-
stage_validate(doc)
|
11
|
-
role_validate(doc)
|
12
|
-
end
|
13
|
-
|
14
|
-
def stage_validate(xmldoc)
|
15
|
-
stage = xmldoc&.at("//bibdata/status/stage")&.text
|
16
|
-
%w(proposal working-draft committee-draft draft-standard final-draft
|
17
|
-
published withdrawn).include? stage or
|
18
|
-
@log.add("Document Attributes", nil,
|
19
|
-
"#{stage} is not a recognised status")
|
20
|
-
end
|
21
|
-
|
22
|
-
def role_validate(doc)
|
23
|
-
doc&.xpath("//bibdata/contributor/role[description]")&.each do |r|
|
24
|
-
r["type"] == "author" or next
|
25
|
-
role = r.at("./description").text
|
26
|
-
%w{full-author contributor staff reviewer}.include?(role) or
|
27
|
-
@log.add("Document Attributes", nil,
|
28
|
-
"#{role} is not a recognised role")
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|