relaton-ogc 0.5.0 → 0.6.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: 24c36de94b4bd902c51dd162cb0020685d5256fb974fe15c4e04e633b2d19a71
4
- data.tar.gz: 16b5f7f2cb1612879b1a6c1e2db58b9570d4e22278090eca07b70458a03bb1a3
3
+ metadata.gz: 1cfdc0ae74a58817950f5903156cd05fa21444a7e71c0fe7cb8996d5ee94f864
4
+ data.tar.gz: 4240557bb7b4fc3e730cb94d9e7300525fc5657cbd3a974b34b9d3c99c0555e7
5
5
  SHA512:
6
- metadata.gz: bfd08917a196195781ba798510be31af7ad8cbeff7b72dd98cf7bbcd29caf763acce1a411066d851ef3e52200ffb850c093644ca7ab088fcb14b710387d8deb1
7
- data.tar.gz: 4e8b0ada08db15bf8b49c005ad7c804c3d4ac04713bd7688d79d858d8f3f54919f8d682d76586cef4476fef3ab4219e45340647e23306514715e8ab3db1cfdf8
6
+ metadata.gz: e117593eb621982f01be1b4f55050361df67b2ce7b82b8553bb37c4222c6551645cb1e68289c324c0c566ac300bde5dbf46f27b99ba824d5900186604dc1f586
7
+ data.tar.gz: 17e66ab18682efedb59cab575f442f0e163cb6f3c4dc5d08792d262eb967913f3fd766a078dc9061f040a2b5dd80bf1fa5452008d29334d2e60b4e8dd684bdc6
@@ -1,8 +1,5 @@
1
1
  module RelatonOgc
2
2
  class Hit < RelatonBib::Hit
3
- # @return [RelatonNist::HitCollection]
4
- attr_reader :hit_collection
5
-
6
3
  # Parse page.
7
4
  # @return [RelatonNist::NistBliographicItem]
8
5
  def fetch
@@ -13,14 +13,11 @@ module RelatonOgc
13
13
  # @param ref [Strig]
14
14
  # @param year [String]
15
15
  # @param opts [Hash]
16
- def initialize(ref, year = nil, _opts = {})
17
- @text = ref
18
- @year = year
19
- @fetched = false
20
- hits = from_json(ref).sort_by do |hit|
16
+ def initialize(ref, year = nil)
17
+ super
18
+ @array = from_json(ref).sort_by do |hit|
21
19
  hit.hit["date"] ? Date.parse(hit.hit["date"]) : Date.new
22
- end
23
- concat hits.reverse
20
+ end.reverse
24
21
  end
25
22
 
26
23
  private
@@ -4,7 +4,7 @@ module RelatonOgc
4
4
  # @param text [String]
5
5
  # @return [RelatonOgc::HitCollection]
6
6
  def search(text, year = nil, opts = {})
7
- HitCollection.new text, year, opts
7
+ HitCollection.new text, year
8
8
  rescue Faraday::ConnectionFailed
9
9
  raise RelatonBib::RequestError, "Could not access https://www.nist.gov"
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.6.0".freeze
3
3
  end
data/relaton_ogc.gemspec CHANGED
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "webmock"
36
36
 
37
37
  spec.add_dependency "faraday", "~> 1.0.0"
38
- spec.add_dependency "relaton-iso-bib", "~> 0.7.0"
38
+ spec.add_dependency "relaton-iso-bib", "~> 0.8.0"
39
39
  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.5.0
4
+ version: 0.6.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-17 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.7.0
159
+ version: 0.8.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.7.0
166
+ version: 0.8.0
167
167
  description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
168
168
  model'
169
169
  email: