relaton-iso 1.9.1 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/lib/relaton_iso/iso_bibliography.rb +6 -4
- data/lib/relaton_iso/processor.rb +1 -1
- data/lib/relaton_iso/scrapper.rb +1 -1
- data/lib/relaton_iso/version.rb +1 -1
- data/relaton_iso.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd281fdcf928bfe44ad8f9b162f09e75a9c25835c93625ed9416ebf60c0a7c8d
|
4
|
+
data.tar.gz: f24e00ea160d81d7c932f77b35639b119955f291ec4c5c0c60de64ab87fcce70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5739dbe20f4fe2b841057b720569db621ac96e5aba68f2c1aedd7c3977a3e227c1d424f1c34d513c429b30e9eb0dd18fda807e4833bb0bc04f9d91a172c5ad2f
|
7
|
+
data.tar.gz: 59b4bb9fd476e1f2cf275001f0d799140782e79b539e5f8d4458c5849d36eda7aaac040a366b7803206ecd4c9906c994c1209d8dafce44d64d61cc997a22bd86
|
data/.rubocop.yml
CHANGED
@@ -23,8 +23,10 @@ module RelatonIso
|
|
23
23
|
# @param ref [String] the ISO standard Code to look up (e..g "ISO 9000")
|
24
24
|
# @param year [String, NilClass] the year the standard was published
|
25
25
|
# @param opts [Hash] options; restricted to :all_parts if all-parts
|
26
|
-
#
|
27
|
-
#
|
26
|
+
# @option opts [Boolean] :all_parts if all-parts reference is required
|
27
|
+
# @option opts [Boolean] :keep_year if undated reference should return
|
28
|
+
# actual reference with year
|
29
|
+
#
|
28
30
|
# @return [String] Relaton XML serialisation of reference
|
29
31
|
def get(ref, year = nil, opts = {}) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity,Metrics/AbcSize
|
30
32
|
code = ref.gsub(/\u2013/, "-")
|
@@ -42,7 +44,7 @@ module RelatonIso
|
|
42
44
|
ret = isobib_get1(code, year, opts)
|
43
45
|
return nil if ret.nil?
|
44
46
|
|
45
|
-
if year && opts[:keep_year].nil? || opts[:keep_year] || opts[:all_parts]
|
47
|
+
if (year && opts[:keep_year].nil?) || opts[:keep_year] || opts[:all_parts]
|
46
48
|
ret
|
47
49
|
else
|
48
50
|
ret.to_most_recent_reference
|
@@ -143,7 +145,7 @@ module RelatonIso
|
|
143
145
|
# @param code [String]
|
144
146
|
# @param opts [Hash]
|
145
147
|
# @return [RelatonIso::HitCollection]
|
146
|
-
def search_code(result, code, opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,PerceivedComplexity
|
148
|
+
def search_code(result, code, opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
147
149
|
code1, part1, _, corr1, coryear1 = ref_components code
|
148
150
|
result.select do |i|
|
149
151
|
code2, part2, _, corr2, coryear2 = ref_components i.hit[:title]
|
@@ -29,7 +29,7 @@ module RelatonIso
|
|
29
29
|
# @return [RelatonIsoBib::IsoBibliographicItem]
|
30
30
|
def hash_to_bib(hash)
|
31
31
|
item_hash = ::RelatonIsoBib::HashConverter.hash_to_bib(hash)
|
32
|
-
::RelatonIsoBib::IsoBibliographicItem.new
|
32
|
+
::RelatonIsoBib::IsoBibliographicItem.new(**item_hash)
|
33
33
|
end
|
34
34
|
|
35
35
|
# Returns hash of XML grammar
|
data/lib/relaton_iso/scrapper.rb
CHANGED
data/lib/relaton_iso/version.rb
CHANGED
data/relaton_iso.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.bindir = "exe"
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
27
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
28
28
|
|
29
29
|
spec.add_development_dependency "byebug"
|
30
30
|
# spec.add_development_dependency "debase"
|
@@ -42,5 +42,5 @@ Gem::Specification.new do |spec|
|
|
42
42
|
|
43
43
|
# spec.add_dependency "relaton-iec", "~> 1.8.0"
|
44
44
|
spec.add_dependency "algolia"
|
45
|
-
spec.add_dependency "relaton-iso-bib", "~> 1.
|
45
|
+
spec.add_dependency "relaton-iso-bib", "~> 1.10.0"
|
46
46
|
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.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -184,14 +184,14 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 1.
|
187
|
+
version: 1.10.0
|
188
188
|
type: :runtime
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 1.
|
194
|
+
version: 1.10.0
|
195
195
|
description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
|
196
196
|
model'
|
197
197
|
email:
|
@@ -250,7 +250,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
250
250
|
requirements:
|
251
251
|
- - ">="
|
252
252
|
- !ruby/object:Gem::Version
|
253
|
-
version: 2.
|
253
|
+
version: 2.5.0
|
254
254
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
255
255
|
requirements:
|
256
256
|
- - ">="
|