relaton-bib 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b162f79927577c4ac049606639ff9fbf62b563dc7836446db17b2b34c018bce2
4
- data.tar.gz: 4e90844acb2975396d8fc818ca980c3c6ed81a011274c40a9970bb9a22d7f09d
3
+ metadata.gz: e9ebdb538f6fb256157a23a01994bb4654df470e7d9abe245d8de7ff88d5fecf
4
+ data.tar.gz: 56e5146c1d0a6f0c02c12d17d30a3041bb3eabff1b54e0c6f0478f7c7a4743ac
5
5
  SHA512:
6
- metadata.gz: 96d3ee63701e6b88d312ff4f54c0a5877c7d658bd7553a4ba82cff664b04fa29b5c337e509289f2181f8b60c3ba2891e17df954a9721477a92fc7e01f6493bd6
7
- data.tar.gz: d244ed452ffecbaa2f6b0dd5e9c9e8993d8ba7a9f9cab4f44d4052e2be9cfd7f08f19727d61f9eaaf31728a98ddd6f4d1a890e57ce9f771afa79595bae71b156
6
+ metadata.gz: 692cce83ac3ce023196a5dd6a06ed30a07cfb442407c02249e948866932db7d0c81a49a7aa8b34afa05c995e9cbcbccdbb7141bd10e699657b545ec3d906918a
7
+ data.tar.gz: c823d2926c8c50810c2989de01f06afbd47e104ff458269d8c17db79e2281550d499d5f267fa1324924005a15de86111b52c2b3cc62142140d09fb9526b14025
@@ -399,7 +399,7 @@ module RelatonBib
399
399
  # @param type [Symbol] type of url, can be :src/:obp/:rss
400
400
  # @return [String]
401
401
  def url(type = :src)
402
- @link.detect { |s| s.type == type.to_s }.content.to_s
402
+ @link.detect { |s| s.type == type.to_s }&.content&.to_s
403
403
  end
404
404
 
405
405
  def abstract=(value)
@@ -120,12 +120,12 @@ module RelatonBib
120
120
  end
121
121
  end
122
122
 
123
- def docid_hash_to_bib(ret)
123
+ def docid_hash_to_bib(ret) # rubocop:disable Metrics/AbcSize
124
124
  return unless ret[:docid]
125
125
 
126
126
  ret[:docid] = array(ret[:docid])
127
127
  ret[:docid]&.each_with_index do |id, i|
128
- type = id[:type] || id[:id].match(/^\w+\s/)&.to_s
128
+ type = id[:type] || id[:id].match(/^\w+(?=\s)/)&.to_s
129
129
  ret[:docid][i] = DocumentIdentifier.new(id: id[:id], type: type,
130
130
  scope: id[:scope])
131
131
  end
@@ -219,7 +219,7 @@ module RelatonBib
219
219
  )
220
220
  end
221
221
 
222
- def fullname_hash_to_bib(person) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
222
+ def fullname_hash_to_bib(person) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
223
223
  n = person[:name]
224
224
  FullName.new(
225
225
  forename: array(n[:forename])&.map { |f| localname(f, person) },
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.7.0".freeze
2
+ VERSION = "1.7.1".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.7.0
4
+ version: 1.7.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-11-26 00:00:00.000000000 Z
11
+ date: 2020-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug