iso-bib-item 0.2.3 → 0.2.4
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/iso_bib_item/from_xml.rb +4 -3
- data/lib/iso_bib_item/iso_bibliographic_item.rb +1 -0
- data/lib/iso_bib_item/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 423970a46ac3548707c24f614d31e459ede59b5cf402ed4d073dccf405f40920
|
4
|
+
data.tar.gz: 91540a5d39dd4f2a522bf47d584de113bf66218c393ef6e9b04b054b9933bc20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f63914c86938dbf6279e1d04830fabbc6229bbcbd92bd1800927a70af0c2936856ef0a9aa3aae5ca84e323e9f0ffb462629561386b291fa56c520285e76b9078
|
7
|
+
data.tar.gz: 0c7a2f6acf70632d5d75e1a9dde3a36b0c5a583f20eea2725e150ccfec4961db6cb3f6933fdd2d5dafa231c2e5dd1fd90c0b92c4506eb044ae4482f4b3ae06f0
|
data/Gemfile.lock
CHANGED
@@ -28,10 +28,11 @@ module IsoBibItem
|
|
28
28
|
def fetch_docid(doc)
|
29
29
|
did = doc.at('/bibitem/docidentifier')
|
30
30
|
return unless did
|
31
|
+
did.text == "IEV" and return IsoBibItem::IsoDocumentId.new(project_number: "IEV", part_number: nil, prefix: nil)
|
31
32
|
id = did.text.match(/(?<project>\d+)(?<hyphen>-)?(?(<hyphen>)(?<part>\d*))/)
|
32
|
-
IsoBibItem::IsoDocumentId.new
|
33
|
-
part_number: id[:part],
|
34
|
-
prefix: nil
|
33
|
+
IsoBibItem::IsoDocumentId.new(project_number: id.nil? ? nil : id[:project],
|
34
|
+
part_number: id.nil? ? nil : id[:part],
|
35
|
+
prefix: nil)
|
35
36
|
end
|
36
37
|
|
37
38
|
def fetch_titles(doc)
|
@@ -241,6 +241,7 @@ module IsoBibItem
|
|
241
241
|
return nil if attribute && !@id_attribute
|
242
242
|
contribs = publishers.map { |p| p&.entity&.abbreviation }.join '/'
|
243
243
|
idstr = "#{contribs}#{delim}#{@docidentifier.project_number}"
|
244
|
+
idstr = "IEV" if @docidentifier.project_number == "IEV"
|
244
245
|
if @docidentifier.part_number&.size&.positive?
|
245
246
|
idstr << "-#{@docidentifier.part_number}"
|
246
247
|
end
|
data/lib/iso_bib_item/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iso-bib-item
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|