relaton-iso-bib 1.12.1 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/biblio.rng +8 -5
- data/grammars/isodoc.rng +27 -1
- data/lib/relaton_iso_bib/structured_identifier.rb +14 -14
- data/lib/relaton_iso_bib/version.rb +1 -1
- data/relaton_iso_bib.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6108f40cdf5538df2b0dddc35aad58ac942e74b80872f8b86bf8bcb3564548f
|
4
|
+
data.tar.gz: c5cc9a8c77d7d4e287ad7340bb0551f8469749889efc70601edca2ac063d1468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 300a7636f43743f323e2ef175ec7b8176c5864ee03bfca7df84a4c785c8d93f80a1849f67239ad2cba561b05033ea71d6b3198b5e4cce668b4cafabb04fedf52
|
7
|
+
data.tar.gz: 4490673960ee031d455eaea27b6fe4d36c5ea4fe1f789e5a907236f4d764dcfd70cfb4bb8bba75e978c3fc6a7faeb7882fe93af486cc69260a2a9d24939606ff
|
data/grammars/biblio.rng
CHANGED
@@ -225,9 +225,9 @@
|
|
225
225
|
<zeroOrMore>
|
226
226
|
<ref name="forename"/>
|
227
227
|
</zeroOrMore>
|
228
|
-
<
|
229
|
-
<ref name="
|
230
|
-
</
|
228
|
+
<optional>
|
229
|
+
<ref name="formatted-initials"/>
|
230
|
+
</optional>
|
231
231
|
<ref name="surname"/>
|
232
232
|
<zeroOrMore>
|
233
233
|
<ref name="addition"/>
|
@@ -247,8 +247,8 @@
|
|
247
247
|
<ref name="LocalizedString"/>
|
248
248
|
</element>
|
249
249
|
</define>
|
250
|
-
<define name="
|
251
|
-
<element name="
|
250
|
+
<define name="formatted-initials">
|
251
|
+
<element name="formatted-initials">
|
252
252
|
<ref name="LocalizedString"/>
|
253
253
|
</element>
|
254
254
|
</define>
|
@@ -264,6 +264,9 @@
|
|
264
264
|
</define>
|
265
265
|
<define name="forename">
|
266
266
|
<element name="forename">
|
267
|
+
<optional>
|
268
|
+
<attribute name="initial"/>
|
269
|
+
</optional>
|
267
270
|
<ref name="LocalizedString"/>
|
268
271
|
</element>
|
269
272
|
</define>
|
data/grammars/isodoc.rng
CHANGED
@@ -69,6 +69,17 @@
|
|
69
69
|
</zeroOrMore>
|
70
70
|
</element>
|
71
71
|
</define>
|
72
|
+
<define name="AdmonitionType">
|
73
|
+
<choice>
|
74
|
+
<value>warning</value>
|
75
|
+
<value>note</value>
|
76
|
+
<value>tip</value>
|
77
|
+
<value>important</value>
|
78
|
+
<value>caution</value>
|
79
|
+
<value>statement</value>
|
80
|
+
<value>editorial</value>
|
81
|
+
</choice>
|
82
|
+
</define>
|
72
83
|
<define name="index">
|
73
84
|
<element name="index">
|
74
85
|
<optional>
|
@@ -1274,7 +1285,12 @@
|
|
1274
1285
|
</define>
|
1275
1286
|
<define name="span">
|
1276
1287
|
<element name="span">
|
1277
|
-
<
|
1288
|
+
<optional>
|
1289
|
+
<attribute name="class"/>
|
1290
|
+
</optional>
|
1291
|
+
<optional>
|
1292
|
+
<attribute name="style"/>
|
1293
|
+
</optional>
|
1278
1294
|
<oneOrMore>
|
1279
1295
|
<ref name="TextElement"/>
|
1280
1296
|
</oneOrMore>
|
@@ -2493,6 +2509,16 @@
|
|
2493
2509
|
<text/>
|
2494
2510
|
</element>
|
2495
2511
|
</optional>
|
2512
|
+
<optional>
|
2513
|
+
<element name="amendment">
|
2514
|
+
<text/>
|
2515
|
+
</element>
|
2516
|
+
</optional>
|
2517
|
+
<optional>
|
2518
|
+
<element name="corrigendum">
|
2519
|
+
<text/>
|
2520
|
+
</element>
|
2521
|
+
</optional>
|
2496
2522
|
<optional>
|
2497
2523
|
<element name="language">
|
2498
2524
|
<text/>
|
@@ -1,26 +1,26 @@
|
|
1
1
|
module RelatonIsoBib
|
2
2
|
# Document structured identifier.
|
3
3
|
class StructuredIdentifier
|
4
|
-
# @return [Integer,
|
4
|
+
# @return [Integer, nil]
|
5
5
|
attr_reader :tc_document_number
|
6
6
|
|
7
7
|
# @return [String]
|
8
8
|
attr_reader :project_number
|
9
9
|
|
10
|
-
# @return [Integer,
|
10
|
+
# @return [Integer, nil]
|
11
11
|
attr_reader :part
|
12
12
|
|
13
|
-
# @return [Integer,
|
13
|
+
# @return [Integer, nil]
|
14
14
|
attr_reader :subpart
|
15
15
|
|
16
|
-
# @return [String,
|
16
|
+
# @return [String, nil]
|
17
17
|
attr_reader :type
|
18
18
|
|
19
|
-
# @param tc_document_number [Integer,
|
19
|
+
# @param tc_document_number [Integer, nil]
|
20
20
|
# @param project_number [String]
|
21
|
-
# @param part [String,
|
22
|
-
# @param subpart [String,
|
23
|
-
# @param type [String,
|
21
|
+
# @param part [String, nil]
|
22
|
+
# @param subpart [String, nil]
|
23
|
+
# @param type [String, nil]
|
24
24
|
def initialize(**args)
|
25
25
|
@tc_document_number = args[:tc_document_number]
|
26
26
|
@project_number = args[:project_number]
|
@@ -50,7 +50,7 @@ module RelatonIsoBib
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def all_parts
|
53
|
-
@project_number = @project_number
|
53
|
+
@project_number = "#{@project_number} (all parts)"
|
54
54
|
end
|
55
55
|
|
56
56
|
def id
|
@@ -58,20 +58,20 @@ module RelatonIsoBib
|
|
58
58
|
end
|
59
59
|
|
60
60
|
# @param builder [Nokogiri::XML::Builder]
|
61
|
-
def to_xml(builder)
|
61
|
+
def to_xml(builder) # rubocop:disable Metrics/AbcSize
|
62
62
|
xml = builder.structuredidentifier do
|
63
|
-
pn = builder.send "project-number", project_number
|
63
|
+
pn = builder.send :"project-number", project_number
|
64
64
|
pn[:part] = part if part
|
65
65
|
pn[:subpart] = subpart if subpart
|
66
66
|
if tc_document_number
|
67
|
-
builder.send "tc-document-number", tc_document_number
|
67
|
+
builder.send :"tc-document-number", tc_document_number
|
68
68
|
end
|
69
69
|
end
|
70
70
|
xml[:type] = type if type
|
71
71
|
end
|
72
72
|
|
73
73
|
# @return [Hash]
|
74
|
-
def to_hash
|
74
|
+
def to_hash # rubocop:disable Metrics/AbcSize
|
75
75
|
hash = {}
|
76
76
|
hash["tc_document_number"] = tc_document_number if tc_document_number
|
77
77
|
hash["project_number"] = project_number if project_number
|
@@ -84,7 +84,7 @@ module RelatonIsoBib
|
|
84
84
|
# @param prefix [String]
|
85
85
|
# @return [String]
|
86
86
|
def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
87
|
-
pref = prefix.empty? ? prefix : prefix
|
87
|
+
pref = prefix.empty? ? prefix : "#{prefix}."
|
88
88
|
pref += "structured_identifier"
|
89
89
|
out = ""
|
90
90
|
if tc_document_number
|
data/relaton_iso_bib.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iso-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.13.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: 2022-
|
11
|
+
date: 2022-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.13.0
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 1.
|
124
|
+
version: 1.13.0
|
125
125
|
description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
|
126
126
|
email:
|
127
127
|
- open.source@ribose.com
|