relaton-nist 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/relaton_nist/nist_bibliography.rb +3 -3
- data/lib/relaton_nist/scrapper.rb +4 -3
- data/lib/relaton_nist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eafbe4c1cb7719d3f782f77547db4b759bd8c41
|
4
|
+
data.tar.gz: 912039be62b33bdf6fab94966614e5de7adea3ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49aaf8910c7fc910da3f7581fd4f6dcc3fb9beb0dba9575ca266d4bc5edf2d9a0b013470308553c9a30f563aad84c5c7ae9d85ccbc4715bc8480e7bcb27ccc4
|
7
|
+
data.tar.gz: 84105c9c7612a47a9f3d6bebd873434147fa5a8e9ba0bedcc8ff0961939902eaf087fd3d08682eb2e45cbec10c262afabb4c5ec364d4f0e44262a061a6507048
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton-nist (0.3.
|
4
|
+
relaton-nist (0.3.2)
|
5
5
|
relaton-bib (~> 0.3.0)
|
6
6
|
rubyzip
|
7
7
|
|
@@ -25,7 +25,7 @@ GEM
|
|
25
25
|
json (2.2.0)
|
26
26
|
method_source (0.9.2)
|
27
27
|
mini_portile2 (2.4.0)
|
28
|
-
nokogiri (1.10.
|
28
|
+
nokogiri (1.10.4)
|
29
29
|
mini_portile2 (~> 2.4.0)
|
30
30
|
pry (0.12.2)
|
31
31
|
coderay (~> 1.1.0)
|
@@ -35,7 +35,7 @@ GEM
|
|
35
35
|
pry (~> 0.10)
|
36
36
|
public_suffix (3.1.1)
|
37
37
|
rake (10.5.0)
|
38
|
-
relaton-bib (0.3.
|
38
|
+
relaton-bib (0.3.4)
|
39
39
|
addressable
|
40
40
|
nokogiri (~> 1.10)
|
41
41
|
rspec (3.8.0)
|
@@ -15,7 +15,7 @@ module RelatonNist
|
|
15
15
|
# @return [RelatonNist::HitCollection]
|
16
16
|
def search(text, year = nil, opts = {})
|
17
17
|
HitCollection.new text, year, opts
|
18
|
-
rescue OpenURI::HTTPError, SocketError
|
18
|
+
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
|
19
19
|
raise RelatonBib::RequestError, "Could not access https://www.nist.gov"
|
20
20
|
end
|
21
21
|
|
@@ -34,9 +34,9 @@ module RelatonNist
|
|
34
34
|
code = code2.strip
|
35
35
|
if date2
|
36
36
|
if /\w+\s\d{4}/ =~ date2
|
37
|
-
opts[:issued_date] =
|
37
|
+
opts[:issued_date] = Date.strptime date2, "%B %Y"
|
38
38
|
elsif /\w+\s\d{2},\s\d{4}/ =~ date2
|
39
|
-
opts[:updated_date] =
|
39
|
+
opts[:updated_date] = Date.strptime date2, "%B %d, %Y"
|
40
40
|
end
|
41
41
|
end
|
42
42
|
opts[:stage] = stage if stage
|
@@ -91,7 +91,8 @@ module RelatonNist
|
|
91
91
|
resp = Net::HTTP.get_response(uri) # .encode("UTF-8")
|
92
92
|
Nokogiri::HTML(resp.body)
|
93
93
|
rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
|
94
|
-
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError
|
94
|
+
Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
|
95
|
+
OpenSSL::SSL::SSLError
|
95
96
|
raise RelatonBib::RequestError, "Could not access #{url}"
|
96
97
|
end
|
97
98
|
|
@@ -230,7 +231,7 @@ module RelatonNist
|
|
230
231
|
)
|
231
232
|
end
|
232
233
|
if contr["surname"]
|
233
|
-
affiliation = RelatonBib::Affilation.new org
|
234
|
+
affiliation = RelatonBib::Affilation.new organization: org
|
234
235
|
entity = RelatonBib::Person.new(
|
235
236
|
name: full_name(contr, lang, script), affiliation: [affiliation],
|
236
237
|
)
|
@@ -266,7 +267,7 @@ module RelatonNist
|
|
266
267
|
url = nil
|
267
268
|
end
|
268
269
|
org = RelatonBib::Organization.new name: org_name, url: url, abbreviation: abbrev
|
269
|
-
affiliation = RelatonBib::Affilation.new org
|
270
|
+
affiliation = RelatonBib::Affilation.new organization: org
|
270
271
|
entity = RelatonBib::Person.new(
|
271
272
|
name: fullname, affiliation: [affiliation],
|
272
273
|
)
|
data/lib/relaton_nist/version.rb
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: 0.3.
|
4
|
+
version: 0.3.2
|
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-08-
|
11
|
+
date: 2019-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|