relaton-nist 1.14.8 → 1.14.9
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 +4 -4
- data/lib/relaton_nist/scrapper.rb +6 -6
- data/lib/relaton_nist/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d70d5c4814d320a0e7de37ffa6c87f70303132fc93a667e1ea7397cda9e3b2cd
|
4
|
+
data.tar.gz: 4ac72228dfae2aeff749b90765235c374385647e16746d6efafc43ce3a86a0d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2128557619cae8f53fd3d80839303597d77e85065a58618a49302dd8593982ba374a7b73ab87fbe6c27661af923857f2382688990ff64acf27d2dd4607a8e0b5
|
7
|
+
data.tar.gz: 8a909befb6b35b64b9f48cbcbcbef0a9ef42f336709a9a628844bf29ac94266ba466067ea3636c57e92e8c5e789b9b65cbc7317941697e288ae65a7a619da55f
|
@@ -99,7 +99,7 @@ module RelatonNist
|
|
99
99
|
ver: match(/v(?:er)?(?<val>[\d.]+)/, id),
|
100
100
|
rev: match(/r(?<val>\d+)/, id),
|
101
101
|
add: match(/-Add(?<val>\d*)/, id),
|
102
|
-
draft: !match(
|
102
|
+
draft: !match(/\.ipd/, id).nil?,
|
103
103
|
}
|
104
104
|
end
|
105
105
|
|
@@ -150,8 +150,8 @@ module RelatonNist
|
|
150
150
|
def full_ref # rubocop:disable Metrics/AbcSize
|
151
151
|
@full_ref ||= begin
|
152
152
|
ref = [refparts[:perfix], refparts[:series], refparts[:code]].compact.join " "
|
153
|
-
ref += "pt#{refparts[:prt]}" if refparts[:prt]
|
154
|
-
ref += "ver#{refparts[:ver]}" if refparts[:ver]
|
153
|
+
ref += "pt#{refparts[:prt]}" if refparts[:prt]
|
154
|
+
ref += "ver#{refparts[:ver]}" if refparts[:ver]
|
155
155
|
ref += "v#{refparts[:vol]}" if refparts[:vol]
|
156
156
|
ref += "r#{refparts[:rev]}" if refparts[:rev]
|
157
157
|
ref
|
@@ -225,7 +225,7 @@ module RelatonNist
|
|
225
225
|
return json["docidentifier"] unless parts
|
226
226
|
|
227
227
|
id = parts[:code]
|
228
|
-
id = "#{parts[:series]} #{id}" if parts[:series]
|
228
|
+
id = "NIST #{parts[:series]} #{id}" if parts[:series]
|
229
229
|
id += " Part #{parts[:prt]}" if parts[:prt]
|
230
230
|
id += " Vol. #{parts[:vol]}" if parts[:vol]
|
231
231
|
id += " Ver. #{parts[:ver]}" if parts[:ver]
|
@@ -11,7 +11,7 @@ module RelatonNist
|
|
11
11
|
# @param hit_data [Hash]
|
12
12
|
# @return [Hash]
|
13
13
|
def parse_page(hit_data)
|
14
|
-
hit_data[:
|
14
|
+
hit_data[:path] ? fetch_gh(hit_data) : parse_json(hit_data)
|
15
15
|
end
|
16
16
|
|
17
17
|
def fetch_gh(hit_data)
|
@@ -24,11 +24,11 @@ module RelatonNist
|
|
24
24
|
def parse_json(hit_data)
|
25
25
|
item_data = from_json hit_data
|
26
26
|
titles = fetch_titles(hit_data)
|
27
|
-
unless /^(SP|NISTIR|FIPS) /.match? item_data[:docid][0].id
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
27
|
+
# unless /^(SP|NISTIR|FIPS) /.match? item_data[:docid][0].id
|
28
|
+
# item_data[:docid][0] = RelatonBib::DocumentIdentifier.new(
|
29
|
+
# id: titles[0][:content].upcase, type: "NIST", primary: true,
|
30
|
+
# )
|
31
|
+
# end
|
32
32
|
item_data[:fetched] = Date.today.to_s
|
33
33
|
item_data[:type] = "standard"
|
34
34
|
item_data[:title] = titles
|
data/lib/relaton_nist/version.rb
CHANGED