checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
---
2
- SHA1:
3
- metadata.gz: c0ebd9e2599158190bfb80e6afd267317b5ad57e
4
- data.tar.gz: ea4a05288f2669b237abb5a7c0b0da28fd51b796
2
+ SHA256:
3
+ metadata.gz: 4a3bfb018267a6fe830f7383aeaf33ae641a32d648929a2aaf07672590290ee7
4
+ data.tar.gz: e66b1054ddf701faa547805f540a993ceffe96ed6c778965d58cfe158ea03bc9
5
5
SHA512:
6
- metadata.gz: 4f65f7eb84352872c0f2752bd7c237c3d47691d09d35612819dc0f03fccf91c209e7372f4829f6db1763e511d6ac25b57a24a0513b97e226799e0bd2bda4af64
7
- data.tar.gz: 47cd0da6fdc82293626b4546bcf92dbdd0000e1b3914c96bc5948ff711b99433da98061efb82b766366246d381c587020e77452f0492cb9ceb35f8533f2e8de1
6
+ metadata.gz: cee4a6e78a57d95f83f64578f3bedb0548f6ac9dd515706e7988bd392ee9a86310de478cecf6422cf3bce5e25283c066d6df9a45327511e231055dc68f04bef3
7
+ data.tar.gz: 59b0e362340ab0016fc083d1f37c527adc5121a1b33fad573dbf78a4d3998e04a6945a87b0d3b064af382048d0b38fd3becac5b09f2f76aefb499f675183249d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
PATH
2
2
remote: .
3
3
specs:
4
- relaton-nist (0.3.6)
4
+ relaton-nist (0.3.7)
5
5
relaton-bib (~> 0.3.0)
6
6
rubyzip
7
7
@@ -35,7 +35,7 @@ GEM
35
35
pry (~> 0.10)
36
36
public_suffix (4.0.1)
37
37
rake (10.5.0)
38
- relaton-bib (0.3.9)
38
+ relaton-bib (0.3.11)
39
39
addressable
40
40
nokogiri
41
41
rspec (3.8.0)
data/lib/relaton_nist/data/pubs-export.zip DELETED
Binary file
data/lib/relaton_nist/hit_collection.rb CHANGED
@@ -10,7 +10,8 @@ module RelatonNist
10
10
# Page of hit collection.
11
11
class HitCollection < RelatonBib::HitCollection
12
12
DOMAIN = "https://csrc.nist.gov"
13
- DATAFILE = File.expand_path "data/pubs-export.zip", __dir__
13
+ DATAFILEDIR = File.expand_path ".relaton/nist", Dir.home
14
+ DATAFILE = File.expand_path "pubs-export.zip", DATAFILEDIR
14
15
15
16
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
16
17
@@ -139,6 +140,7 @@ module RelatonNist
139
140
@data = nil
140
141
zip = OpenURI.open_uri "https://csrc.nist.gov/CSRC/media/feeds/metanorma/pubs-export.zip"
141
142
zip.close
143
+ FileUtils.mkdir_p DATAFILEDIR unless Dir.exist? DATAFILEDIR
142
144
FileUtils.mv zip.path, DATAFILE
143
145
end
144
146
end
data/lib/relaton_nist/scrapper.rb CHANGED
@@ -21,7 +21,7 @@ module RelatonNist
21
21
unless /^(SP|NISTIR|FIPS) / =~ item_data[:docid][0].id
22
22
doctype = id_cleanup(item_data[:docid][0].id)
23
23
item_data[:docid][0] = RelatonBib::DocumentIdentifier.new(
24
- id: titles[0][:content], type: "NIST",
24
+ id: titles[0][:content].upcase, type: "NIST",
25
25
)
26
26
end
27
27
item_data[:fetched] = Date.today.to_s
data/lib/relaton_nist/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
module RelatonNist
2
- VERSION = "0.3.6".freeze
2
+ VERSION = "0.3.7".freeze
3
3
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.3.6
4
+ version: 0.3.7
5
5
platform: ruby
6
6
authors:
7
7
- Ribose Inc.
8
8
autorequire:
9
9
bindir: exe
10
10
cert_chain: []
11
- date: 2019-10-14 00:00:00.000000000 Z
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
12
dependencies:
13
13
- !ruby/object:Gem::Dependency
14
14
name: bundler
@@ -213,7 +213,6 @@ files:
213
213
- bin/setup
214
214
- lib/relaton_nist.rb
215
215
- lib/relaton_nist/comment_period.rb
216
- - lib/relaton_nist/data/pubs-export.zip
217
216
- lib/relaton_nist/document_status.rb
218
217
- lib/relaton_nist/hash_converter.rb
219
218
- lib/relaton_nist/hit.rb
@@ -245,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
244
- !ruby/object:Gem::Version
246
245
version: '0'
247
246
requirements: []
248
- rubyforge_project:
247
+ rubygems_version: 3.0.6
249
- rubygems_version: 2.6.12
250
248
signing_key:
251
249
specification_version: 4
252
250
summary: 'RelatonNist: retrive NIST standards.'