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 +4 -4
- data/lib/relaton_nist/hit.rb +0 -3
- data/lib/relaton_nist/hit_collection.rb +3 -9
- data/lib/relaton_nist/version.rb +1 -1
- data/relaton_nist.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5982953e5529d1c1617fd10bcc2ac6c7e12bbf9b5c9d035ace66d0ca8affbf6f
|
4
|
+
data.tar.gz: 434af1b628c2151aea0b989ec9f72de2cd8759558ebe4cd434dfddeba5d68b26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4ebae4c3fdc2fce1381849d6ce41c6766514e1a1148d8f048ea83a5e7b2d1cbd4950fced9b40b2abce13ae0f7aca437abaeee301acd6b7827bc54c9f940899
|
7
|
+
data.tar.gz: 95fb3c6a45e98e42b4c0ad7fdd10e618fc7b911bf55fa6f4484d01d2cdfa6c87638d65c2978e8a9351934192f63a4ffe68d5344f603516de577ab596299bc92b
|
data/lib/relaton_nist/hit.rb
CHANGED
@@ -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
|
-
|
24
|
-
@year = year
|
21
|
+
super ref_nbr, year
|
25
22
|
|
26
23
|
/(?<docid>(SP|FIPS)\s[0-9-]+)/ =~ text
|
27
|
-
|
24
|
+
@array = docid ? from_json(docid, **opts) : from_csrc(**opts)
|
28
25
|
|
29
|
-
|
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
|
|
data/lib/relaton_nist/version.rb
CHANGED
data/relaton_nist.gemspec
CHANGED
@@ -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.
|
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.
|
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-
|
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.
|
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.
|
180
|
+
version: 0.8.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: rubyzip
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|