relaton-index 0.2.14 → 0.2.15

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: 074e4a9ad24460b1c4ae2b34bfbfe37e0674e204517d5137665b47ade1296295
4
- data.tar.gz: 6b8df9730b13c94331942d2ed21f7ea27673d47e5e6fe4d9d4099e919a17de47
3
+ metadata.gz: 5ce9d7205daf0975990050a9f2652f35d7fc9cd02a840f49cc268ee3114c0870
4
+ data.tar.gz: b0a56e175a3ca0ed09dea40d2b0d6cb1d6b7400f5cb61d67a86185f00d9309d6
5
5
  SHA512:
6
- metadata.gz: d014942345f4a0b208390fd2e1404c630acdc6c7112175883850a8a1118750565be104625fe1b0c470e92c55ac3ae1357a1b487f131cc2d515ed14b959e38641
7
- data.tar.gz: 0cde39c9290fb2c7267aa8c5f9d61433eef2bdbbf5e17829d45921bada82feedba109532b2d08a28b117d1b0177acba54335b27d82e4792de4d205c6cf577693
6
+ metadata.gz: 21cd6e533b27e00ee9b0604eb3a11112dba1c8f69db15996beede0b7ce763ae54ac30242e8a75118c6e525b4bde510bd7b68f347ccbdd180479d38b77f2c88c0
7
+ data.tar.gz: 2788d0c92aa0e4fe6540eb4fb5ae4b30917abb304f91b09add060efbcd81977427503c5e7ddc15c17afd1db9735a1abecdfe0a0b760de3d7b89d9e3a41476c59
@@ -22,7 +22,7 @@ module Relaton
22
22
  if @pool[type.upcase.to_sym]&.actual?(**args)
23
23
  @pool[type.upcase.to_sym]
24
24
  else
25
- @pool[type.upcase.to_sym] = Type.new(type, args[:url], args[:file], args[:id_keys])
25
+ @pool[type.upcase.to_sym] = Type.new(type, args[:url], args[:file], args[:id_keys], args[:pubid_class])
26
26
  end
27
27
  end
28
28
 
@@ -80,7 +80,7 @@ module Relaton
80
80
  # @return [void]
81
81
  #
82
82
  def save
83
- @file_io.save @index
83
+ @file_io.save(@index || [])
84
84
  end
85
85
 
86
86
  #
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Relaton
4
4
  module Index
5
- VERSION = "0.2.14"
5
+ VERSION = "0.2.15"
6
6
  end
7
7
  end
data/lib/relaton/index.rb CHANGED
@@ -19,17 +19,10 @@ module Relaton
19
19
 
20
20
  class << self
21
21
  #
22
- # Find or create index
22
+ # Proxy for Pool#type
23
23
  #
24
- # @param [String] type index type (ISO, IEC, etc.)
25
- # @param [String, nil] url external URL to index, used to fetch index for searching files
26
- # @param [String, nil] file output file name, default is config.filename
27
- # @param [Array<Symbol>, nil] id_keys keys to check if index is correct
28
- #
29
- # @return [Relaton::Index::Type] typed index
30
- #
31
- def find_or_create(type, url: nil, file: nil, id_keys: nil)
32
- pool.type(type, url: url, file: file, id_keys: id_keys)
24
+ def find_or_create(type, **args)
25
+ pool.type(type, **args)
33
26
  end
34
27
 
35
28
  def close(type)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-index
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.14
4
+ version: 0.2.15
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-08-03 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pubid-core