relaton-bib 1.10.6 → 1.10.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_bib/bibxml_parser.rb +4 -5
- data/lib/relaton_bib/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: 97f3e3e14c073c18fac8b204483116de57d77338ed7de3ce6f03c75da41fd0c1
|
4
|
+
data.tar.gz: 713f4591e31ff1538b31f75bff7b6e1d4770a8f87fbd5e01445968cf8e6ffb8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c75ffe32176bb63fa2d9ff7717312ac15dce830622cf8db699628f4a93f45e8f4907431120236d726d1cc9a5d1fcb91e1b5ca39772ac70429fec44cfb7dd198a
|
7
|
+
data.tar.gz: c4bad97d2b455e787e3e4e8eed11b8e7e466eb288655e2055b0d7fa38c236a7e02f59701cc7c693230879a5116c7872fa16bd70ada9827535894542841d9d716
|
@@ -83,7 +83,7 @@ module RelatonBib
|
|
83
83
|
id.sub!(/(?<=-)\d{2}$/, ver) if ver
|
84
84
|
ret << DocumentIdentifier.new(type: "Internet-Draft", id: id, primary: true)
|
85
85
|
else
|
86
|
-
id = reference[
|
86
|
+
id = reference[:anchor] || reference[:docName] || reference[:number]
|
87
87
|
ret << create_docid(id, ver) if id
|
88
88
|
end
|
89
89
|
|
@@ -339,16 +339,15 @@ module RelatonBib
|
|
339
339
|
# @param reference [Nokogiri::XML::Element]
|
340
340
|
# @return [Array<RelatonBib::BibliographicDate>] published data.
|
341
341
|
#
|
342
|
-
def dates(reference)
|
343
|
-
|
342
|
+
def dates(reference) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize
|
343
|
+
date = reference.at "./front/date"
|
344
|
+
return [] if date.nil? || date[:year].nil? || date[:year].empty?
|
344
345
|
|
345
346
|
d = date[:year]
|
346
347
|
d += "-#{month(date[:month])}" if date[:month] && !date[:month].empty?
|
347
348
|
d += "-#{date[:day]}" if date[:day]
|
348
349
|
# date = Time.parse(d).strftime "%Y-%m-%d"
|
349
350
|
[BibliographicDate.new(type: "published", on: d)]
|
350
|
-
# rescue ArgumentError
|
351
|
-
# []
|
352
351
|
end
|
353
352
|
|
354
353
|
# @param reference [Nokogiri::XML::Element]
|
data/lib/relaton_bib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.7
|
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-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|