relaton-nist 1.14.8 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/biblio.rng +1 -1
- 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
- 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: 0c116195f2ab6cfda43f76fea0833d11746ca245ed618e0600b0f212f5ab7400
|
4
|
+
data.tar.gz: 293ac575914bbc0c89380590ea1694ed68af31e473a8610b1e212fc072b6168d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01b643f55e58c222395ca2ecbb6b93a43918160663aaf693052081fd1414ce59dc6c78e4c5056bb96661ab0d9d592554d1d474532af351f25f30df0478a9048c
|
7
|
+
data.tar.gz: ff958be3d09d8f48e52dc55757fe15508c9ce4228997585ca939648bc721e82e9fc01460467b45a4441bf3b1e494ffc0d338ca61d761da4bdaacb9c3ece22cf0
|
data/grammars/biblio.rng
CHANGED
@@ -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
data/relaton_nist.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
25
25
|
|
26
|
-
spec.add_dependency "relaton-bib", "~> 1.
|
26
|
+
spec.add_dependency "relaton-bib", "~> 1.16.0"
|
27
27
|
spec.add_dependency "relaton-index", "~> 0.2.0"
|
28
28
|
spec.add_dependency "rubyzip"
|
29
29
|
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: 1.
|
4
|
+
version: 1.16.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: 2023-
|
11
|
+
date: 2023-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton-bib
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.16.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: relaton-index
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|