relaton-nist 1.5.1 → 1.6.pre1
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_collection.rb +2 -2
- data/lib/relaton_nist/nist_bibliography.rb +8 -4
- data/lib/relaton_nist/version.rb +1 -1
- data/relaton_nist.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83911e87d23d384599e9d311ced2568d538e38adb7782a01396ae5db599b9c9e
|
4
|
+
data.tar.gz: dd9b9df50f61fe10efa8ba323598c261f13224065301b4914e1a9ff2a2ec2393
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 533c2c283684bf285c6221baecc36eee7068ef1d2c478f5e474b028b4fa5f599ff7efdb2117000c2fae452686c5577db32c7492051c74ae1cce321efa9b25f48
|
7
|
+
data.tar.gz: caee23be7c38f9ed33fa1adc48fc4610b0716eca1aadee6f0d66be8d08f33b8f02fb86cb8b199bd6979e8e7bb6ac5fc6c549a2c8dd86deaf598ee6d347f68ccb
|
@@ -83,7 +83,7 @@ module RelatonNist
|
|
83
83
|
select_data(docid, **opts).map do |h|
|
84
84
|
/(?<serie>(?<=-)\w+$)/ =~ h["series"]
|
85
85
|
title = [h["title-main"], h["title-sub"]].compact.join " - "
|
86
|
-
release_date = RelatonBib.parse_date h["published-date"]
|
86
|
+
release_date = RelatonBib.parse_date h["published-date"], false
|
87
87
|
Hit.new({ code: h["docidentifier"], serie: serie.upcase, title: title,
|
88
88
|
url: h["uri"], status: h["status"],
|
89
89
|
release_date: release_date, json: h }, self)
|
@@ -114,7 +114,7 @@ module RelatonNist
|
|
114
114
|
def match_year?(doc, date)
|
115
115
|
return true unless year
|
116
116
|
|
117
|
-
idate = RelatonBib.parse_date doc["issued-date"]
|
117
|
+
idate = RelatonBib.parse_date doc["issued-date"], false
|
118
118
|
idate.between? date, date.next_year.prev_day
|
119
119
|
end
|
120
120
|
|
@@ -93,19 +93,23 @@ module RelatonNist
|
|
93
93
|
result.each_slice(3) do |s| # ISO website only allows 3 connections
|
94
94
|
fetch_pages(s, 3).each_with_index do |r, _i|
|
95
95
|
if opts[:issued_date]
|
96
|
-
ids = r.date.select
|
96
|
+
ids = r.date.select do |d|
|
97
|
+
d.type == "issued" && d.on(:date) == opts[:issued_date]
|
98
|
+
end
|
97
99
|
next if ids.empty?
|
98
100
|
elsif opts[:updated_date]
|
99
|
-
pds = r.date.select
|
101
|
+
pds = r.date.select do |d|
|
102
|
+
d.type == "published" && d.on(:date) == opts[:updated_date]
|
103
|
+
end
|
100
104
|
next if pds.empty?
|
101
105
|
end
|
102
106
|
next if iter && r.status.iteration != iteration
|
103
107
|
return { ret: r } if !year
|
104
108
|
|
105
109
|
r.date.select { |d| d.type == "published" }.each do |d|
|
106
|
-
return { ret: r } if year.to_i == d.on
|
110
|
+
return { ret: r } if year.to_i == d.on(:year)
|
107
111
|
|
108
|
-
missed_years << d.on
|
112
|
+
missed_years << d.on(:year)
|
109
113
|
end
|
110
114
|
end
|
111
115
|
end
|
data/lib/relaton_nist/version.rb
CHANGED
data/relaton_nist.gemspec
CHANGED
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: 1.
|
4
|
+
version: 1.6.pre1
|
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-
|
11
|
+
date: 2020-11-11 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: 1.
|
159
|
+
version: 1.6.pre
|
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: 1.
|
166
|
+
version: 1.6.pre
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubyzip
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,9 +232,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
232
|
version: 2.4.0
|
233
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
234
|
requirements:
|
235
|
-
- - "
|
235
|
+
- - ">"
|
236
236
|
- !ruby/object:Gem::Version
|
237
|
-
version:
|
237
|
+
version: 1.3.1
|
238
238
|
requirements: []
|
239
239
|
rubygems_version: 3.0.6
|
240
240
|
signing_key:
|