relaton-nist 1.4.0 → 1.5.pre
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/nist_bibliographic_item.rb +7 -4
- data/lib/relaton_nist/scrapper.rb +5 -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: 27f46f4290ada7c96ae0d01052f04586cd82a6c8800c42b151c2f70b31ebc700
|
4
|
+
data.tar.gz: 6927543ec8f9f8e2dbf8f3d981952d1e7dbd92c53f27be8823abbc4fc6481930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3104efb08ff4e56ee69b584d27d2b8353956107eeacc2d14fcdf11e285a37d9d8629f6e9f31f0ed383bb644ca4b9b4fdc56bf1f5f4d4b2dc889af15ec2726c81
|
7
|
+
data.tar.gz: 02d479127243b75eaea466a6d7ec531d1f1aa22ee9c1d039898a39e18fda57be92d9b290a954e8c424d926e4f1a5b4500d5395a46277b5c0937a99b702553093
|
@@ -63,13 +63,16 @@ module RelatonNist
|
|
63
63
|
super
|
64
64
|
end
|
65
65
|
|
66
|
-
# @param
|
67
|
-
|
68
|
-
|
66
|
+
# @param opts [Hash]
|
67
|
+
# @option opts [Nokogiri::XML::Builder] :builder XML builder
|
68
|
+
# @option opts [Boolean] :bibdata
|
69
|
+
# @option opts [String] :lang language
|
70
|
+
# @return [String] XML
|
71
|
+
def to_xml(**opts)
|
72
|
+
super date_format: :short, **opts do |b|
|
69
73
|
if opts[:bibdata]
|
70
74
|
b.ext do
|
71
75
|
b.doctype doctype if doctype
|
72
|
-
# keyword.each { |kw| b.keyword { kw.to_xml b } }
|
73
76
|
commentperiod&.to_xml b
|
74
77
|
end
|
75
78
|
end
|
@@ -18,10 +18,10 @@ module RelatonNist
|
|
18
18
|
end
|
19
19
|
# doctype = "standard"
|
20
20
|
titles = fetch_titles(hit_data)
|
21
|
-
unless /^(SP|NISTIR|FIPS)
|
21
|
+
unless /^(SP|NISTIR|FIPS) /.match? 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].upcase, type: "NIST"
|
24
|
+
id: titles[0][:content].upcase, type: "NIST"
|
25
25
|
)
|
26
26
|
end
|
27
27
|
item_data[:fetched] = Date.today.to_s
|
@@ -172,14 +172,15 @@ module RelatonNist
|
|
172
172
|
# @param hit_data [Hash]
|
173
173
|
# @return [Array<Hash>]
|
174
174
|
def fetch_titles(hit_data)
|
175
|
-
[{ content: hit_data[:title], language: "en", script: "Latn",
|
175
|
+
[{ content: hit_data[:title], language: "en", script: "Latn",
|
176
|
+
format: "text/plain" }]
|
176
177
|
end
|
177
178
|
|
178
179
|
# Fetch dates
|
179
180
|
# @param doc [Nokogiri::HTML::Document]
|
180
181
|
# @param release_date [Date]
|
181
182
|
# @return [Array<Hash>]
|
182
|
-
def fetch_dates(doc, release_date)
|
183
|
+
def fetch_dates(doc, release_date) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
183
184
|
dates = [{ type: "published", on: release_date.to_s }]
|
184
185
|
|
185
186
|
if doc.is_a? Hash
|
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.5.pre
|
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
|
+
date: 2020-10-07 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.5.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.5.pre
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubyzip
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,9 +231,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: 2.4.0
|
232
232
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
|
-
- - "
|
234
|
+
- - ">"
|
235
235
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
236
|
+
version: 1.3.1
|
237
237
|
requirements: []
|
238
238
|
rubygems_version: 3.0.6
|
239
239
|
signing_key:
|