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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd9ee52233758a976f5f9d4e549c61c899a643afddf3486215b219b868041d76
4
- data.tar.gz: dc9878b905a4412fe8237f71a422f23252a7f9933e882e1d502333890e00ba1d
3
+ metadata.gz: 82478564be12002c51d6f7f81ea3c54ca36c5bc82ca545936f4736db3ddc738e
4
+ data.tar.gz: 93d029e955c664c2f6a0c0e2e9828f957b6e28658df37336a4e3a1dcf2b8e64c
5
5
  SHA512:
6
- metadata.gz: 07d38211e4b0e19152e0c92341902f3a93482795c4cd1b019e67b33dd95edfba630cd9c474f8b3c930bf36dee99f346f8142f49252e296a2867580ffb53082ba
7
- data.tar.gz: 3a070a16d70d30bc72750325d314ab548938d224e58aa584748572be85b4e5e66d94b8ca204583faa40231adacd86a0eec1ea4d40c4d4261ab2dbc484492d7db
6
+ metadata.gz: ae4783978cf446d07b669de15c00f7e9018736347dfb5999ca7b5c11890a3448bb723dce967f5ef7d83199eaca6c01cf2750b557816ea8ed3633743b36bb2405
7
+ data.tar.gz: da5f68cd7839e4436adedfbdfbc82923c3416cec188b411cf4cb9d288ba8d0722cf15d39f909daef7afadb2792affc21e7c83c88ce4ecc71de0fb2cd7338e81b
@@ -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].freeze
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
@@ -25,7 +25,7 @@ module RelatonBib
25
25
  # @return [Hash]
26
26
  def to_hash
27
27
  if uri || region
28
- hash = { name: name }
28
+ hash = { "name" => name }
29
29
  hash["uri"] = uri if uri
30
30
  hash["region"] = region if region
31
31
  hash
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.4.1".freeze
3
3
  end
@@ -202,7 +202,9 @@ module RelatonBib
202
202
  abbreviation: elm[:abbreviation])
203
203
  end
204
204
 
205
- def fetch_dates(item) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
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.0
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-18 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug