relaton-un 1.9.0 → 1.10.0
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 -0
- data/README.adoc +12 -0
- data/grammars/basicdoc.rng +26 -7
- data/grammars/biblio.rng +2 -2
- data/grammars/isodoc.rng +617 -89
- data/grammars/reqt.rng +15 -4
- data/grammars/un.rng +12 -17
- data/lib/relaton_un/un_bibliographic_item.rb +4 -4
- data/lib/relaton_un/version.rb +1 -1
- data/relaton_un.gemspec +1 -1
- metadata +4 -4
data/grammars/reqt.rng
CHANGED
@@ -64,9 +64,9 @@
|
|
64
64
|
<optional>
|
65
65
|
<ref name="label"/>
|
66
66
|
</optional>
|
67
|
-
<
|
67
|
+
<zeroOrMore>
|
68
68
|
<ref name="subject"/>
|
69
|
-
</
|
69
|
+
</zeroOrMore>
|
70
70
|
<zeroOrMore>
|
71
71
|
<ref name="reqinherit"/>
|
72
72
|
</zeroOrMore>
|
@@ -80,6 +80,7 @@
|
|
80
80
|
<ref name="verification"/>
|
81
81
|
<ref name="import"/>
|
82
82
|
<ref name="description"/>
|
83
|
+
<ref name="component"/>
|
83
84
|
</choice>
|
84
85
|
</zeroOrMore>
|
85
86
|
<optional>
|
@@ -105,12 +106,16 @@
|
|
105
106
|
</define>
|
106
107
|
<define name="subject">
|
107
108
|
<element name="subject">
|
108
|
-
<
|
109
|
+
<oneOrMore>
|
110
|
+
<ref name="TextElement"/>
|
111
|
+
</oneOrMore>
|
109
112
|
</element>
|
110
113
|
</define>
|
111
114
|
<define name="reqinherit">
|
112
115
|
<element name="inherit">
|
113
|
-
<
|
116
|
+
<oneOrMore>
|
117
|
+
<ref name="TextElement"/>
|
118
|
+
</oneOrMore>
|
114
119
|
</element>
|
115
120
|
</define>
|
116
121
|
<define name="measurementtarget">
|
@@ -138,6 +143,12 @@
|
|
138
143
|
<ref name="RequirementSubpart"/>
|
139
144
|
</element>
|
140
145
|
</define>
|
146
|
+
<define name="component">
|
147
|
+
<element name="component">
|
148
|
+
<attribute name="class"/>
|
149
|
+
<ref name="RequirementSubpart"/>
|
150
|
+
</element>
|
151
|
+
</define>
|
141
152
|
<define name="reqt_references">
|
142
153
|
<element name="references">
|
143
154
|
<oneOrMore>
|
data/grammars/un.rng
CHANGED
@@ -96,7 +96,10 @@
|
|
96
96
|
<define name="sections">
|
97
97
|
<element name="sections">
|
98
98
|
<oneOrMore>
|
99
|
-
<
|
99
|
+
<choice>
|
100
|
+
<ref name="clause"/>
|
101
|
+
<ref name="floating-title"/>
|
102
|
+
</choice>
|
100
103
|
</oneOrMore>
|
101
104
|
</element>
|
102
105
|
</define>
|
@@ -178,19 +181,15 @@
|
|
178
181
|
<ref name="section-title"/>
|
179
182
|
</optional>
|
180
183
|
<group>
|
181
|
-
<
|
182
|
-
<
|
183
|
-
|
184
|
-
</zeroOrMore>
|
185
|
-
<zeroOrMore>
|
186
|
-
<ref name="note"/>
|
187
|
-
</zeroOrMore>
|
188
|
-
</group>
|
184
|
+
<zeroOrMore>
|
185
|
+
<ref name="BasicBlock"/>
|
186
|
+
</zeroOrMore>
|
189
187
|
<zeroOrMore>
|
190
188
|
<choice>
|
191
189
|
<ref name="clause-subsection"/>
|
192
190
|
<ref name="terms"/>
|
193
191
|
<ref name="definitions"/>
|
192
|
+
<ref name="floating-title"/>
|
194
193
|
</choice>
|
195
194
|
</zeroOrMore>
|
196
195
|
</group>
|
@@ -229,20 +228,16 @@
|
|
229
228
|
<ref name="section-title"/>
|
230
229
|
</optional>
|
231
230
|
<group>
|
232
|
-
<
|
233
|
-
<
|
234
|
-
|
235
|
-
</zeroOrMore>
|
236
|
-
<zeroOrMore>
|
237
|
-
<ref name="note"/>
|
238
|
-
</zeroOrMore>
|
239
|
-
</group>
|
231
|
+
<zeroOrMore>
|
232
|
+
<ref name="BasicBlock"/>
|
233
|
+
</zeroOrMore>
|
240
234
|
<zeroOrMore>
|
241
235
|
<choice>
|
242
236
|
<ref name="annex-subsection"/>
|
243
237
|
<ref name="terms"/>
|
244
238
|
<ref name="definitions"/>
|
245
239
|
<ref name="references"/>
|
240
|
+
<ref name="floating-title"/>
|
246
241
|
</choice>
|
247
242
|
</zeroOrMore>
|
248
243
|
</group>
|
@@ -25,13 +25,13 @@ module RelatonUn
|
|
25
25
|
def initialize(**args)
|
26
26
|
if args[:distribution] && !DISTRIBUTIONS.has_value?(args[:distribution])
|
27
27
|
warn "[relaton-un] WARNING: invalid distribution: "\
|
28
|
-
|
28
|
+
"#{args[:distribution]}"
|
29
29
|
end
|
30
30
|
@submissionlanguage = args.delete :submissionlanguage
|
31
31
|
@distribution = args.delete :distribution
|
32
32
|
@session = args.delete :session
|
33
33
|
@job_number = args.delete :job_number
|
34
|
-
super
|
34
|
+
super(**args)
|
35
35
|
end
|
36
36
|
|
37
37
|
# @param opts [Hash]
|
@@ -40,7 +40,7 @@ module RelatonUn
|
|
40
40
|
# @option opts [String] :lang language
|
41
41
|
# @return [String] XML
|
42
42
|
def to_xml(**opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
|
43
|
-
super
|
43
|
+
super(**opts) do |b|
|
44
44
|
b.ext do
|
45
45
|
b.doctype doctype if doctype
|
46
46
|
submissionlanguage&.each { |sl| b.submissionlanguage sl }
|
@@ -68,7 +68,7 @@ module RelatonUn
|
|
68
68
|
# @param prefix [String]
|
69
69
|
# @return [String]
|
70
70
|
def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize
|
71
|
-
pref = prefix.empty? ? prefix : prefix
|
71
|
+
pref = prefix.empty? ? prefix : "#{prefix}."
|
72
72
|
out = super
|
73
73
|
submissionlanguage.each do |sl|
|
74
74
|
out += "#{pref}submissionlanguage:: #{sl}\n"
|
data/lib/relaton_un/version.rb
CHANGED
data/relaton_un.gemspec
CHANGED
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
|
|
41
41
|
|
42
42
|
spec.add_dependency "faraday"
|
43
43
|
spec.add_dependency "http-cookie"
|
44
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
44
|
+
spec.add_dependency "relaton-bib", "~> 1.10.0"
|
45
45
|
spec.add_dependency "unf_ext", ">= 0.0.7.7"
|
46
46
|
end
|
47
47
|
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-un
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.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:
|
11
|
+
date: 2022-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.
|
131
|
+
version: 1.10.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.
|
138
|
+
version: 1.10.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: unf_ext
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|