relaton-iso-bib 1.18.1 → 1.18.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +5 -5
- data/grammars/basicdoc.rng +3 -0
- data/grammars/relaton-iso.rng +10 -0
- data/lib/relaton_iso_bib/document_type.rb +1 -1
- data/lib/relaton_iso_bib/iso_bibliographic_item.rb +14 -19
- data/lib/relaton_iso_bib/version.rb +1 -1
- data/lib/relaton_iso_bib/xml_parser.rb +1 -0
- data/relaton_iso_bib.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfe688753cc33e16b6e0ee15d5b241239d5f754d4aa8e247eba4c4eb86094293
|
4
|
+
data.tar.gz: 120e89a7d0eebbb154872c334522301c7c447264f590fa4107863a97164acfa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb6f4d7b4a6459fa7d0b641c479867bb2f88e02227512f096de8f263f478d392c8e660002af02c476bfc030b0fa3be57144067bb05ad701f62eb48bc79b4b919
|
7
|
+
data.tar.gz: f9f439dd4e53452544e70efc494f09bbeb18904330b9578b05ac9b086153b4e9065942a9a245255cc8645814cd1ce85e0fdbc441cbdf9e278ae04a1242cd9f56
|
data/README.adoc
CHANGED
@@ -188,19 +188,19 @@ item.date
|
|
188
188
|
#<RelatonBib::BibliographicDate:0x00007ff76f161f70 @from=nil, @on="2014-04", @to=nil, @type="published">,
|
189
189
|
#<RelatonBib::BibliographicDate:0x00007ff76f1605f8 @from=nil, @on="2015-05-20", @to=nil, @type="accessed">]
|
190
190
|
|
191
|
-
item.date
|
191
|
+
item.date(type: "published").first.on
|
192
192
|
=> "2014-04"
|
193
193
|
|
194
|
-
item.date
|
194
|
+
item.date(type: "published").first.on :year
|
195
195
|
=> 2014
|
196
196
|
|
197
|
-
item.date
|
197
|
+
item.date(type: "published").first.on :month
|
198
198
|
=> 4
|
199
199
|
|
200
|
-
item.date
|
200
|
+
item.date(type: "published").first.on :day
|
201
201
|
=> nil
|
202
202
|
|
203
|
-
item.date
|
203
|
+
item.date(type: "published").first.on :date
|
204
204
|
=> #<Date: 2014-04-01 ((2456749j,0s,0n),+0s,2299161j)>
|
205
205
|
----
|
206
206
|
|
data/grammars/basicdoc.rng
CHANGED
data/grammars/relaton-iso.rng
CHANGED
@@ -26,6 +26,9 @@
|
|
26
26
|
<optional>
|
27
27
|
<ref name="updates_document_type"/>
|
28
28
|
</optional>
|
29
|
+
<optional>
|
30
|
+
<ref name="fast_track"/>
|
31
|
+
</optional>
|
29
32
|
</define>
|
30
33
|
<define name="bdate">
|
31
34
|
<element name="date">
|
@@ -95,9 +98,11 @@
|
|
95
98
|
<value>publicly-available-specification</value>
|
96
99
|
<value>international-workshop-agreement</value>
|
97
100
|
<value>guide</value>
|
101
|
+
<value>recommendation</value>
|
98
102
|
<value>amendment</value>
|
99
103
|
<value>technical-corrigendum</value>
|
100
104
|
<value>directive</value>
|
105
|
+
<value>committee-document</value>
|
101
106
|
</choice>
|
102
107
|
</define>
|
103
108
|
<define name="DocumentSubtype">
|
@@ -222,4 +227,9 @@
|
|
222
227
|
<text/>
|
223
228
|
</element>
|
224
229
|
</define>
|
230
|
+
<define name="fast_track">
|
231
|
+
<element name="fast-track">
|
232
|
+
<data type="boolean"/>
|
233
|
+
</element>
|
234
|
+
</define>
|
225
235
|
</grammar>
|
@@ -3,7 +3,7 @@ module RelatonIsoBib
|
|
3
3
|
DOCTYPES = %w[
|
4
4
|
international-standard technical-specification technical-report
|
5
5
|
publicly-available-specification international-workshop-agreement guide
|
6
|
-
amendment technical-corrigendum directive
|
6
|
+
recommendation amendment technical-corrigendum directive committee-document
|
7
7
|
].freeze
|
8
8
|
|
9
9
|
#
|
@@ -6,15 +6,6 @@ require "relaton_iso_bib/structured_identifier"
|
|
6
6
|
require "relaton_iso_bib/ics"
|
7
7
|
require "relaton_iso_bib/hash_converter"
|
8
8
|
|
9
|
-
# Add filter method to Array.
|
10
|
-
class Array
|
11
|
-
# @param type [String]
|
12
|
-
# @return [Array]
|
13
|
-
def filter(type:)
|
14
|
-
select { |e| e.type == type }
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
9
|
module RelatonIsoBib
|
19
10
|
# Bibliographic item.
|
20
11
|
class IsoBibliographicItem < RelatonBib::BibliographicItem
|
@@ -30,7 +21,7 @@ module RelatonIsoBib
|
|
30
21
|
# @return [RelatonIsoBib::DocumentType]
|
31
22
|
|
32
23
|
# @return [Boolean, nil]
|
33
|
-
attr_reader :horizontal
|
24
|
+
attr_reader :horizontal, :fast_track
|
34
25
|
|
35
26
|
# @return [RelatonIsoBib::EditorialGroup]
|
36
27
|
attr_reader :editorialgroup
|
@@ -42,28 +33,28 @@ module RelatonIsoBib
|
|
42
33
|
# rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity
|
43
34
|
|
44
35
|
# @param edition [String]
|
45
|
-
# @param docnumber [String,
|
36
|
+
# @param docnumber [String, nil]
|
46
37
|
# @param language [Array<String>]
|
47
38
|
# @param script [Arrra<String>]
|
48
|
-
# @param docstatus [RelatonBib::DocumentStatus,
|
49
|
-
# @param type [String,
|
50
|
-
# @param formattedref [RelatonBib::FormattedRef,
|
51
|
-
# @param version [RelatonBib::BibliographicItem::Version,
|
39
|
+
# @param docstatus [RelatonBib::DocumentStatus, nil]
|
40
|
+
# @param type [String, nil]
|
41
|
+
# @param formattedref [RelatonBib::FormattedRef, nil]
|
42
|
+
# @param version [RelatonBib::BibliographicItem::Version, nil]
|
52
43
|
# @param biblionote [Array<RelatonBib::BiblioNote>]
|
53
44
|
# @param series [Array<RelatonBib::Series>]
|
54
45
|
# @param medium [RelatonBib::Medium, NilClas]
|
55
46
|
# @param place [Array<String>]
|
56
47
|
# @param extent [Array<Relaton::BibItemLocality>]
|
57
48
|
# @param accesslocation [Array<String>]
|
58
|
-
# @param classification [RelatonBib::Classification,
|
59
|
-
# @param validity [RelatonBib:Validity,
|
49
|
+
# @param classification [RelatonBib::Classification, nil]
|
50
|
+
# @param validity [RelatonBib:Validity, nil]
|
60
51
|
# @param docid [Array<RelatonBib::DocumentIdentifier>]
|
61
52
|
# @param doctype [RelatonIsoBib::DocumentType]
|
62
53
|
# @param subdoctype [String, nil]
|
63
54
|
# @param horizontal [Boolean, nil]
|
64
55
|
# @param structuredidentifier [RelatonIsoBib::StructuredIdentifier]
|
65
|
-
# @param stagename [String,
|
66
|
-
#
|
56
|
+
# @param stagename [String, nil]
|
57
|
+
# @param fast_track [Boolean, nil]
|
67
58
|
# @param title [Array<Hash, RelatonBib::TypedTitleString>, RelatonBib::TypedTitleStringCollection]
|
68
59
|
#
|
69
60
|
# @param editorialgroup [Hash, RelatonIsoBib::EditorialGroup]
|
@@ -143,6 +134,7 @@ module RelatonIsoBib
|
|
143
134
|
@ics = args.fetch(:ics, []).map { |i| i.is_a?(Hash) ? Ics.new(**i) : i }
|
144
135
|
@stagename = args[:stagename]
|
145
136
|
@id_attribute = true
|
137
|
+
@fast_track = args[:fast_track]
|
146
138
|
end
|
147
139
|
|
148
140
|
#
|
@@ -177,6 +169,7 @@ module RelatonIsoBib
|
|
177
169
|
ics.each { |i| i.to_xml b }
|
178
170
|
structuredidentifier&.to_xml b
|
179
171
|
b.stagename stagename if stagename
|
172
|
+
b.send("fast-track", fast_track) unless fast_track.nil?
|
180
173
|
end
|
181
174
|
ext["schema-version"] = ext_schema unless opts[:embedded]
|
182
175
|
end
|
@@ -197,6 +190,7 @@ module RelatonIsoBib
|
|
197
190
|
hash = super
|
198
191
|
hash["horizontal"] = horizontal unless horizontal.nil?
|
199
192
|
hash["stagename"] = stagename if stagename
|
193
|
+
hash["fast_track"] = fast_track unless fast_track.nil?
|
200
194
|
hash
|
201
195
|
end
|
202
196
|
|
@@ -206,6 +200,7 @@ module RelatonIsoBib
|
|
206
200
|
pref = prefix.empty? ? prefix : "#{prefix}."
|
207
201
|
out = super
|
208
202
|
out += "#{pref}stagename:: #{stagename}\n" if stagename
|
203
|
+
out += "#{pref}fast-track:: #{fast_track}\n" unless fast_track.nil?
|
209
204
|
out
|
210
205
|
end
|
211
206
|
|
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.18.
|
4
|
+
version: 1.18.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: 2024-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: isoics
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.18.
|
33
|
+
version: 1.18.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.18.
|
40
|
+
version: 1.18.4
|
41
41
|
description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
|
42
42
|
email:
|
43
43
|
- open.source@ribose.com
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '0'
|
96
96
|
requirements: []
|
97
|
-
rubygems_version: 3.3.
|
97
|
+
rubygems_version: 3.3.27
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
|