relaton-ogc 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_ogc/ogc_bibliography.rb +9 -6
- data/lib/relaton_ogc/version.rb +1 -1
- data/lib/relaton_ogc/xml_parser.rb +1 -1
- data/relaton_ogc.gemspec +2 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f6e278a9c43b7c38f6790be891bf4ac648ce552f53201c9809c5f21e81afbe1
|
4
|
+
data.tar.gz: 51f579ab4b5ab512f7bc6ece135d9ba724abf1964e611fe015083a4a2b515598
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9eb824e05231eba65239e48ccf1f28c501ae233edb6f1cce9d1a6dccc7ba799a8cce8b8a85a038d994befec9d9b06a8a1683c58b1f89172d078707155b6109e
|
7
|
+
data.tar.gz: cfc23ae3d587bdb8bd5fddec439e4880547a772469f741f0e16296c7ec079b1a66ed010683d98c640a122d0af36f1d4d3603be1d75e2b6fdf981fb8b56d4499d
|
@@ -21,15 +21,18 @@ module RelatonOgc
|
|
21
21
|
def get(code, year = nil, opts = {})
|
22
22
|
result = bib_search_filter(code, year, opts) || (return nil)
|
23
23
|
ret = bib_results_filter(result, year)
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
if ret[:ret]
|
25
|
+
warn "[relaton-ogc] (\"#{code}\") found #{ret[:ret].docidentifier.first.id}"
|
26
|
+
ret[:ret]
|
27
|
+
else
|
28
|
+
fetch_ref_err(code, year, ret[:years])
|
29
|
+
end
|
27
30
|
end
|
28
31
|
|
29
32
|
private
|
30
33
|
|
31
34
|
def bib_search_filter(code, year, opts)
|
32
|
-
warn "
|
35
|
+
warn "[relaton-ogc] (\"#{code}\") fetching..."
|
33
36
|
search(code, year, opts)
|
34
37
|
end
|
35
38
|
|
@@ -64,10 +67,10 @@ module RelatonOgc
|
|
64
67
|
# @param missed_years [Array<Strig>]
|
65
68
|
def fetch_ref_err(code, year, missed_years)
|
66
69
|
id = year ? "#{code} year #{year}" : code
|
67
|
-
warn "WARNING: no match found online for #{id}. "\
|
70
|
+
warn "[relaton-ogc] WARNING: no match found online for #{id}. "\
|
68
71
|
"The code must be exactly like it is on the standards website."
|
69
72
|
unless missed_years.empty?
|
70
|
-
warn "(There was no match for #{year}, though there were matches "\
|
73
|
+
warn "[relaton-ogc] (There was no match for #{year}, though there were matches "\
|
71
74
|
"found for #{missed_years.join(', ')}.)"
|
72
75
|
end
|
73
76
|
nil
|
data/lib/relaton_ogc/version.rb
CHANGED
data/relaton_ogc.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
|
27
27
|
spec.add_development_dependency "debase"
|
28
28
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
29
|
+
spec.add_development_dependency "pry-byebug"
|
29
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
32
|
spec.add_development_dependency "ruby-debug-ide"
|
@@ -35,5 +36,5 @@ Gem::Specification.new do |spec|
|
|
35
36
|
spec.add_development_dependency "webmock"
|
36
37
|
|
37
38
|
spec.add_dependency "faraday", "~> 1.0.0"
|
38
|
-
spec.add_dependency "relaton-iso-bib", "~> 0.
|
39
|
+
spec.add_dependency "relaton-iso-bib", "~> 0.9.0"
|
39
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.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: 2020-
|
11
|
+
date: 2020-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry-byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,14 +170,14 @@ dependencies:
|
|
156
170
|
requirements:
|
157
171
|
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
173
|
+
version: 0.9.0
|
160
174
|
type: :runtime
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
178
|
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
180
|
+
version: 0.9.0
|
167
181
|
description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
|
168
182
|
model'
|
169
183
|
email:
|