relaton-bib 1.19.3 → 1.19.5

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: d3a558692c0fed85db446e5e09bc97b88cd593b950c56deea611644a51ea541e
4
- data.tar.gz: 5714aa8ce2e246e41477370b0562762b9ab242ae93c78ec71ef2d62e517ad54c
3
+ metadata.gz: 999dde6e3d1bb1df421041946e460c0bbea4032b69833aa8215912f972af65fb
4
+ data.tar.gz: de8d307b656e2ecbbac2ef6b50d49eb7d053cae4d84b71838d4d9bc50023f478
5
5
  SHA512:
6
- metadata.gz: 034d246df4a77e85fe262e54bcab074747aa4260e3dfb17e619630e8181f3c3e869333099d69a2296a216d192e855496738eb29a8f6bcab08ac0ecedd8fbd395
7
- data.tar.gz: 68df9e862afcdfd8f026647af0b0aa1e20c78fa50b08225f80cc7a950d450302fbc79f8e76c8741b6104b861c190ce6d587b1b64e7db96c8d43a7b93c45addd8
6
+ metadata.gz: 37fda9565921654b8d3a939b77aa3e6e9ef9884ed763504993468c7cb8fac7f07c063c20676114baae892b2720cf37dec277c6f920aab088bbd94198273d2926
7
+ data.tar.gz: 38cc5aa0b08a19c8e6d7ef93e82c8b95be9e604afb8dcfae3a437bd310c6fcd73c8b1096456d5b64f812d4fc0dc5c85b57fdc196bae4eb3dec4431b62605cf77
@@ -229,7 +229,7 @@ module RelatonBib
229
229
  OrgIdentifier.new(a[:type], a[:id])
230
230
  end
231
231
  org[:subdivision] = RelatonBib.array(org[:subdivision]).map do |sd|
232
- LocalizedString.new sd
232
+ LocalizedString.new sd.is_a?(Hash) ? sd[:content] : sd
233
233
  end
234
234
  org[:contact] = contacts_hash_to_bib(org)
235
235
  org[:logo] = Image.new(**org[:logo][:image]) if org[:logo]
@@ -81,7 +81,7 @@ module RelatonBib
81
81
  #
82
82
  # @return [String] encoded content
83
83
  #
84
- def encode(cnt) # rubocop:disable Metrics/MethodLength
84
+ def encode(cnt)
85
85
  escp cnt
86
86
  end
87
87
 
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.19.3".freeze
2
+ VERSION = "1.19.5".freeze
3
3
  end
@@ -289,13 +289,17 @@ module RelatonBib
289
289
  # @return [Array<RelatonBib::DocumentIdentifier>]
290
290
  def fetch_docid(item)
291
291
  item.xpath("./docidentifier").map do |id|
292
- did = id.to_h.transform_keys(&:to_sym)
293
- did[:id] = id.text
294
- did[:primary] = id[:primary] == "true" ? true : nil
295
- DocumentIdentifier.new(**did)
292
+ args = id.to_h.transform_keys(&:to_sym)
293
+ args[:id] = id.text
294
+ args[:primary] = id[:primary] == "true" ? true : nil
295
+ create_docid(**args)
296
296
  end
297
297
  end
298
298
 
299
+ def create_docid(**args)
300
+ DocumentIdentifier.new(**args)
301
+ end
302
+
299
303
  # @param item [Nokogiri::XML::Element]
300
304
  # @return [RelatonBib::TypedTitleStringCollection]
301
305
  def fetch_titles(item)
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.19.3
4
+ version: 1.19.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-23 00:00:00.000000000 Z
11
+ date: 2024-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable