relaton-bib 1.4.0 → 1.4.1
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.rb +1 -1
- data/lib/relaton_bib/bibliographic_date.rb +2 -1
- data/lib/relaton_bib/place.rb +1 -1
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +4 -2
- 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: 82478564be12002c51d6f7f81ea3c54ca36c5bc82ca545936f4736db3ddc738e
|
4
|
+
data.tar.gz: 93d029e955c664c2f6a0c0e2e9828f957b6e28658df37336a4e3a1dcf2b8e64c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae4783978cf446d07b669de15c00f7e9018736347dfb5999ca7b5c11890a3448bb723dce967f5ef7d83199eaca6c01cf2750b557816ea8ed3633743b36bb2405
|
7
|
+
data.tar.gz: da5f68cd7839e4436adedfbdfbc82923c3416cec188b411cf4cb9d288ba8d0722cf15d39f909daef7afadb2792affc21e7c83c88ce4ecc71de0fb2cd7338e81b
|
data/lib/relaton_bib.rb
CHANGED
@@ -34,7 +34,7 @@ module RelatonBib
|
|
34
34
|
|
35
35
|
# @param array [Array]
|
36
36
|
# @return [Array<String>, String]
|
37
|
-
def single_element_array(array) # rubocop:disable Metrics/CyclomaticComplexity
|
37
|
+
def single_element_array(array) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
38
38
|
if array.size > 1
|
39
39
|
array.map { |e| e.is_a?(String) ? e : e.to_hash }
|
40
40
|
else
|
@@ -6,7 +6,8 @@ module RelatonBib
|
|
6
6
|
# Bibliographic date.
|
7
7
|
class BibliographicDate
|
8
8
|
TYPES = %w[published accessed created implemented obsoleted confirmed
|
9
|
-
updated issued transmitted copied unchanged circulated adapted
|
9
|
+
updated issued transmitted copied unchanged circulated adapted
|
10
|
+
vote-started vote-ended].freeze
|
10
11
|
|
11
12
|
# @return [String]
|
12
13
|
attr_reader :type
|
data/lib/relaton_bib/place.rb
CHANGED
data/lib/relaton_bib/version.rb
CHANGED
@@ -202,7 +202,9 @@ module RelatonBib
|
|
202
202
|
abbreviation: elm[:abbreviation])
|
203
203
|
end
|
204
204
|
|
205
|
-
|
205
|
+
# @param node [Nokogiri::XML::Elemen]
|
206
|
+
# @return [Array<RelatonBib::BibliographicDate>]
|
207
|
+
def fetch_dates(item) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
206
208
|
item.xpath("./date").reduce([]) do |a, d|
|
207
209
|
type = d[:type].to_s.empty? ? "published" : d[:type]
|
208
210
|
if (on = d.at("on"))
|
@@ -229,7 +231,7 @@ module RelatonBib
|
|
229
231
|
identifier: identifier)
|
230
232
|
end
|
231
233
|
|
232
|
-
def get_person(person) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity
|
234
|
+
def get_person(person) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
233
235
|
affiliations = person.xpath("./affiliation").map do |a|
|
234
236
|
org = a.at "./organization"
|
235
237
|
desc = a.xpath("./description").map do |e|
|
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.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|