relaton-bib 1.9.19 → 1.9.20
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/bibliographic_item.rb +13 -4
- data/lib/relaton_bib/bibxml_parser.rb +1 -1
- 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: b714ee74a9d4da85784bbcc2e7fb50c9548215c1399a799290646eb230529f2f
|
4
|
+
data.tar.gz: 75cf8abea4defed1d25cd241443ae6b8df03688a47e8cce4e907bab03315d978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50dd80e6be598a65d4ded5f35e047b7b32a1c9cdcdacdd0539d13e149533501f093e95bbb176b1a58f566274c16ec88b461d50c295daa9bb46c52a9c683bf949
|
7
|
+
data.tar.gz: 58ac55543ac1f21477ca3c1125c8d50ccd88aee77c1ab74c4aa374839549d289083827d3b54795cb35901fa26bf46b3a7f4fff46c7b86e8ee23043f05c18ba04
|
@@ -766,8 +766,8 @@ module RelatonBib
|
|
766
766
|
# @param [Nokogiri::XML::Builder] builder
|
767
767
|
#
|
768
768
|
def render_bibxml(builder)
|
769
|
-
target = link.detect { |l| l.type
|
770
|
-
link.detect { |l| l.type
|
769
|
+
target = link.detect { |l| l.type.casecmp("src").zero? } ||
|
770
|
+
link.detect { |l| l.type.casecmp("doi").zero? }
|
771
771
|
bxml = if docnumber&.match(/^BCP/) || docidentifier[0].id.include?("BCP")
|
772
772
|
render_bibxml_refgroup(builder)
|
773
773
|
else
|
@@ -920,13 +920,22 @@ module RelatonBib
|
|
920
920
|
def render_person(builder, person)
|
921
921
|
render_organization builder, person.affiliation.first&.organization
|
922
922
|
if person.name.completename
|
923
|
-
builder.parent[:fullname] = person.name.completename
|
923
|
+
builder.parent[:fullname] = person.name.completename.content
|
924
|
+
elsif person.name.forename.any?
|
925
|
+
builder.parent[:fullname] = person.name.forename.map(&:content).join
|
924
926
|
end
|
925
927
|
if person.name.initial.any?
|
926
928
|
builder.parent[:initials] = person.name.initial.map(&:content).join
|
929
|
+
elsif person.name.forename.any?
|
930
|
+
builder.parent[:initials] = person.name.forename.map do |f|
|
931
|
+
"#{f.content[0]}."
|
932
|
+
end.join
|
927
933
|
end
|
928
934
|
if person.name.surname
|
929
|
-
|
935
|
+
if person.name.forename.any?
|
936
|
+
builder.parent[:fullname] += " #{person.name.surname}"
|
937
|
+
end
|
938
|
+
builder.parent[:surname] = person.name.surname.content
|
930
939
|
end
|
931
940
|
end
|
932
941
|
|
@@ -312,7 +312,7 @@ module RelatonBib
|
|
312
312
|
# @return [Array<RelatonBib::BibliographicDate>] published data.
|
313
313
|
#
|
314
314
|
def dates(reference)
|
315
|
-
return unless (date = reference.at "./front/date")
|
315
|
+
return [] unless (date = reference.at "./front/date")
|
316
316
|
|
317
317
|
d = [date[:year], month(date[:month]), (date[:day] || 1)].compact.join "-"
|
318
318
|
date = Time.parse(d).strftime "%Y-%m-%d"
|
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.9.
|
4
|
+
version: 1.9.20
|
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-01-
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|