relaton-iso 1.13.4 → 1.13.6

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: de7fd665ac31a6cb5ca7af1d56225ac315953981d93b4bb05dc68e19834e5986
4
- data.tar.gz: a0ebeaf6c6455e4222cc9127eec9ab9eef75e3a1439f2dde392c7bda2c75c116
3
+ metadata.gz: 15e59c996299424282311bbcff81938de7f3cedec23726db9d4cfa377bc37f3b
4
+ data.tar.gz: 1ccc769d95eb05561a57ba6d4f55ffb006a10cf76bbd362d667d4906db4c38b2
5
5
  SHA512:
6
- metadata.gz: 669b535e77c8ac8f0dcb488245d75a46820ec0bb68695212aa669c6eb18acb6a567f9f62c9cec28be7c04fde7a9518aafecb4cb564f4e2fc6a2975af89dd5bce
7
- data.tar.gz: '019288a0aa8acb5ff2b2a5b6b4b4b485f1c9b9a0e703670f8c4a6005fb61ce944123d80ecd1caebe327d7cbe32ced2022e98f1a5e63267f75393874949119cd9'
6
+ metadata.gz: 927b2cfea7b54d87022642a0e04555c12716a09f800fc79f7133162ffccd9f91ea1ce95b99a3feb18d42e7e1326844585e5384d2f3d777f0b39fd960f0fcd1ce
7
+ data.tar.gz: 72ae5ee67833161e820559911ccb9d712952a31225b184475d4c85e6a16fa4405805238c71b12eb733dadb8442ba419c6e2f49cc2917cf8fd924b9fdcd607d9d
@@ -5,7 +5,6 @@ name: rake
5
5
  on:
6
6
  push:
7
7
  branches: [ master, main ]
8
- tags: [ v* ]
9
8
  pull_request:
10
9
 
11
10
  jobs:
@@ -1,7 +1,7 @@
1
1
  module RelatonIso
2
2
  class DocumentIdentifier < RelatonBib::DocumentIdentifier
3
3
  def id
4
- id_str = @id.to_s(format: :ref_num_long).sub(/\sED\d+/, "")
4
+ id_str = @id.to_s.sub(/\sED\d+/, "").squeeze(" ").sub(/^ISO\/\s/, "ISO ") # workarounds for pubid gem bugs
5
5
  if @all_parts
6
6
  if type == "URN"
7
7
  return "#{@id.urn}:ser"
@@ -41,10 +41,8 @@ module RelatonIso
41
41
  resp = isobib_search_filter(query_pubid, opts)
42
42
 
43
43
  # Try with ISO/IEC prefix if ISO not found
44
- if resp[:hits].empty? &&
45
- query_pubid.copublisher.nil? &&
46
- query_pubid.publisher == "ISO"
47
-
44
+ if resp[:hits].empty? && query_pubid.copublisher.nil? &&
45
+ query_pubid.publisher == "ISO"
48
46
  resp_isoiec = retry_isoiec_prefix(query_pubid, opts)
49
47
  resp = resp_isoiec unless resp_isoiec.nil?
50
48
  end
@@ -98,7 +98,7 @@ module RelatonIso
98
98
  # @return [Array<RelatonBib::DocumentIdentifier>]
99
99
  #
100
100
  def fetch_relaton_docids(doc, pubid)
101
- pubid.urn_stage = stage_code(doc).to_f
101
+ pubid.stage = Pubid::Iso::Stage.new(harmonized_code: stage_code(doc))
102
102
  [
103
103
  RelatonIso::DocumentIdentifier.new(id: pubid, type: "ISO", primary: true),
104
104
  RelatonIso::DocumentIdentifier.new(id: pubid, type: "URN"),
@@ -226,7 +226,7 @@ module RelatonIso
226
226
  end
227
227
 
228
228
  def stage_code(doc)
229
- doc.at("//ul[@class='dropdown-menu']/li[@class='active']"\
229
+ doc.at("//ul[@class='dropdown-menu']/li[@class='active']" \
230
230
  "/a/span[@class='stage-code']").text
231
231
  end
232
232
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.13.4"
4
+ VERSION = "1.13.6"
5
5
  end
data/relaton_iso.gemspec CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "webmock"
40
40
 
41
41
  spec.add_dependency "algolia"
42
- spec.add_dependency "pubid-iso", "~> 0.2.0"
42
+ spec.add_dependency "pubid-core", "1.2.1"
43
+ spec.add_dependency "pubid-iso", "0.2.1"
43
44
  spec.add_dependency "relaton-iso-bib", "~> 1.13.0"
44
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.4
4
+ version: 1.13.6
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-10-03 00:00:00.000000000 Z
11
+ date: 2022-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug
@@ -178,20 +178,34 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: pubid-core
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - '='
186
+ - !ruby/object:Gem::Version
187
+ version: 1.2.1
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - '='
193
+ - !ruby/object:Gem::Version
194
+ version: 1.2.1
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: pubid-iso
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
- - - "~>"
199
+ - - '='
186
200
  - !ruby/object:Gem::Version
187
- version: 0.2.0
201
+ version: 0.2.1
188
202
  type: :runtime
189
203
  prerelease: false
190
204
  version_requirements: !ruby/object:Gem::Requirement
191
205
  requirements:
192
- - - "~>"
206
+ - - '='
193
207
  - !ruby/object:Gem::Version
194
- version: 0.2.0
208
+ version: 0.2.1
195
209
  - !ruby/object:Gem::Dependency
196
210
  name: relaton-iso-bib
197
211
  requirement: !ruby/object:Gem::Requirement