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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1609d9e48b478f743233091295cf554d9799d1e0c320379eca48e929d54f1477
4
- data.tar.gz: 13440319619354c7aba95f519fef7cd7161da5b7282d67634b205d1b2a50018d
3
+ metadata.gz: 97f3e3e14c073c18fac8b204483116de57d77338ed7de3ce6f03c75da41fd0c1
4
+ data.tar.gz: 713f4591e31ff1538b31f75bff7b6e1d4770a8f87fbd5e01445968cf8e6ffb8c
5
5
  SHA512:
6
- metadata.gz: c43da7fab499c9395b7d426798674536c75b2d86086fb1f86c386eaf745c40e3c73e8dc9e8ef17c6052863b21498f03f62fc26479f8c6f05fd19ab7ad9b606e8
7
- data.tar.gz: 35f0e51ab71f5940d079c116655199288e382dcbb4e682589c2d3f4323b8c0784b466a45a595d9f1739ff3096260efbafe348578bcb6f67b36b8785a638e1daa
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["anchor"] || reference["docName"] || reference["number"]
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
- return [] unless (date = reference.at "./front/date")
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]
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.10.6".freeze
2
+ VERSION = "1.10.7".freeze
3
3
  end
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.6
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-03-21 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug