relaton-nist 0.7.0 → 0.8.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: c87f09763dbcc319401cbc3b2c86de4a1cdd60743f00db8526d2a28e52a71dfd
4
- data.tar.gz: 9d690b4c771ae2f7256c6dd0770022b7709e00f08ee4efa625cbb144d3ba80b6
3
+ metadata.gz: 5982953e5529d1c1617fd10bcc2ac6c7e12bbf9b5c9d035ace66d0ca8affbf6f
4
+ data.tar.gz: 434af1b628c2151aea0b989ec9f72de2cd8759558ebe4cd434dfddeba5d68b26
5
5
  SHA512:
6
- metadata.gz: ad3251b6140a8b79de2a952eed6ba721011efe3d77dff8f195147e0a0819356a6dcd52b48868d883bbb8572d32ff27216ec29bc76f942e2da51c2f69f5a687e7
7
- data.tar.gz: a6f32c9121980c23c324e6a1c7daead5baf266401dcad3efab1dfe0f46e6d886b21c84fe9750df2ed1a14f3cfc2377183b497e95c84f739c8277e727514459f2
6
+ metadata.gz: 6f4ebae4c3fdc2fce1381849d6ce41c6766514e1a1148d8f048ea83a5e7b2d1cbd4950fced9b40b2abce13ae0f7aca437abaeee301acd6b7827bc54c9f940899
7
+ data.tar.gz: 95fb3c6a45e98e42b4c0ad7fdd10e618fc7b911bf55fa6f4484d01d2cdfa6c87638d65c2978e8a9351934192f63a4ffe68d5344f603516de577ab596299bc92b
@@ -3,9 +3,6 @@
3
3
  module RelatonNist
4
4
  # Hit.
5
5
  class Hit < RelatonBib::Hit
6
- # @return [RelatonNist::HitCollection]
7
- attr_reader :hit_collection
8
-
9
6
  # Parse page.
10
7
  # @return [RelatonNist::NistBliographicItem]
11
8
  def fetch
@@ -13,30 +13,24 @@ module RelatonNist
13
13
  DATAFILEDIR = File.expand_path ".relaton/nist", Dir.home
14
14
  DATAFILE = File.expand_path "pubs-export.zip", DATAFILEDIR
15
15
 
16
- # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
17
-
18
16
  # @param ref_nbr [String]
19
17
  # @param year [String]
20
18
  # @param opts [Hash]
21
19
  # @option opts [String] :stage
22
20
  def initialize(ref_nbr, year = nil, opts = {})
23
- @text = ref_nbr
24
- @year = year
21
+ super ref_nbr, year
25
22
 
26
23
  /(?<docid>(SP|FIPS)\s[0-9-]+)/ =~ text
27
- hits = docid ? from_json(docid, **opts) : from_csrc(**opts)
24
+ @array = docid ? from_json(docid, **opts) : from_csrc(**opts)
28
25
 
29
- hits.sort! do |a, b|
26
+ @array.sort! do |a, b|
30
27
  if a.sort_value != b.sort_value
31
28
  b.sort_value - a.sort_value
32
29
  else
33
30
  (b.hit[:release_date] - a.hit[:release_date]).to_i
34
31
  end
35
32
  end
36
- concat hits
37
- @fetched = false
38
33
  end
39
- # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
40
34
 
41
35
  private
42
36
 
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "0.7.0".freeze
2
+ VERSION = "0.8.0".freeze
3
3
  end
@@ -35,6 +35,6 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "webmock"
36
36
  spec.add_development_dependency "ruby-jing"
37
37
 
38
- spec.add_dependency "relaton-bib", "~> 0.7.0"
38
+ spec.add_dependency "relaton-bib", "~> 0.8.0"
39
39
  spec.add_dependency "rubyzip"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.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: byebug
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - "~>"
172
172
  - !ruby/object:Gem::Version
173
- version: 0.7.0
173
+ version: 0.8.0
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - "~>"
179
179
  - !ruby/object:Gem::Version
180
- version: 0.7.0
180
+ version: 0.8.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rubyzip
183
183
  requirement: !ruby/object:Gem::Requirement