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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e3c06d93936ffdfe9d0ad5ec9c970c6ffe60c999668d6297aba52c2ed829da8d
4
- data.tar.gz: eada0a4b60c798b5034e7f224942f19e34dec434761da0fb0c687441b6b5bea1
3
+ metadata.gz: 2f6e278a9c43b7c38f6790be891bf4ac648ce552f53201c9809c5f21e81afbe1
4
+ data.tar.gz: 51f579ab4b5ab512f7bc6ece135d9ba724abf1964e611fe015083a4a2b515598
5
5
  SHA512:
6
- metadata.gz: df4e9971ff827dd4c84833f6aabaf01fd85eac07f16edaa6d6a84ac4f4dfab2d66cb23a881b5e6f4ef17dc78f4ac8fa76795c8cfb22df07bf6b4bdc7346de295
7
- data.tar.gz: d241a9c8e51ca9e57ddf057640c28549f155673cabef16645e31a96bc4abeb51fdce1a8b485a6ee2fdfa33bbade46a1be68132942d63b73d0e1d97dff027e4bf
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
- return ret[:ret] if ret[:ret]
25
-
26
- fetch_ref_err(code, year, ret[:years])
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 "fetching #{code}..."
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
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "0.6.1".freeze
2
+ VERSION = "0.7.0".freeze
3
3
  end
@@ -12,7 +12,7 @@ module RelatonOgc
12
12
  if isoitem
13
13
  OgcBibliographicItem.new item_data(isoitem)
14
14
  else
15
- warn "[relato-ogc] can't find bibitem or bibdata element in the XML"
15
+ warn "[relaton-ogc] can't find bibitem or bibdata element in the XML"
16
16
  end
17
17
  end
18
18
 
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.8.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.6.1
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-02-26 00:00:00.000000000 Z
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.8.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.8.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: