relaton-iso-bib 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/relaton_iso_bib/iso_bibliographic_item.rb +6 -6
- data/lib/relaton_iso_bib/version.rb +1 -1
- data/lib/relaton_iso_bib/xml_parser.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7fb805b403cebb4b93d03016c996af267be89a3
|
4
|
+
data.tar.gz: 57a089b202052dbbd55902868a3b5efb2efbed05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8bb6d7e27988eb5520021c584b130890544fefde356191dd7094c123fbe6b80c985f3450a7cb93f95a35f1f33fa7d11322844257b4ff18b08b30044864c3be7
|
7
|
+
data.tar.gz: c039be1976fd24fafe42e27e95e588bcebd31d909f6dd8d6874d2d997b565149279205d22af1507d694eecb27ec937bbb451167231c8a136ec9455295426ef90
|
data/Gemfile.lock
CHANGED
@@ -124,7 +124,7 @@ module RelatonIsoBib
|
|
124
124
|
#
|
125
125
|
# @raise [ArgumentError]
|
126
126
|
def initialize(**args)
|
127
|
-
|
127
|
+
check_doctype args[:doctype]
|
128
128
|
# check_language args.fetch(:language, [])
|
129
129
|
# check_script args.fetch(:script, [])
|
130
130
|
|
@@ -154,7 +154,7 @@ module RelatonIsoBib
|
|
154
154
|
end
|
155
155
|
|
156
156
|
@structuredidentifier = args[:structuredidentifier]
|
157
|
-
@doctype ||= args[:
|
157
|
+
@doctype ||= args[:doctype]
|
158
158
|
@ics = args.fetch(:ics, []).map { |i| i.is_a?(Hash) ? Ics.new(i) : i }
|
159
159
|
# @link = args.fetch(:link, []).map do |s|
|
160
160
|
# s.is_a?(Hash) ? RelatonBib::TypedUri.new(s) : s
|
@@ -279,11 +279,11 @@ module RelatonIsoBib
|
|
279
279
|
# end
|
280
280
|
# end
|
281
281
|
|
282
|
-
# @param
|
282
|
+
# @param doctype [String]
|
283
283
|
# @raise ArgumentError
|
284
|
-
def
|
285
|
-
if
|
286
|
-
raise ArgumentError, "invalid
|
284
|
+
def check_doctype(doctype)
|
285
|
+
if doctype && !self.class::TYPES.include?(doctype)
|
286
|
+
raise ArgumentError, "invalid doctype: #{doctype}"
|
287
287
|
end
|
288
288
|
end
|
289
289
|
|
@@ -23,7 +23,7 @@ module RelatonIsoBib
|
|
23
23
|
ext = isoitem.at "./ext"
|
24
24
|
return data unless ext
|
25
25
|
|
26
|
-
data[:
|
26
|
+
data[:doctype] = ext.at("./doctype")&.text
|
27
27
|
data[:editorialgroup] = fetch_editorialgroup ext
|
28
28
|
data[:ics] = fetch_ics ext
|
29
29
|
data[:structuredidentifier] = fetch_structuredidentifier ext
|
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: 0.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|