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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3697bb0d3737e3f29c9b68d2395013762ed2d5b56b8003325f495f67f670532
4
- data.tar.gz: 8e41e1180ea1fb3403546eb5493df7a7588b5fff934a453f33d9f60ed1730a7f
3
+ metadata.gz: 27f46f4290ada7c96ae0d01052f04586cd82a6c8800c42b151c2f70b31ebc700
4
+ data.tar.gz: 6927543ec8f9f8e2dbf8f3d981952d1e7dbd92c53f27be8823abbc4fc6481930
5
5
  SHA512:
6
- metadata.gz: 42c02c151388863e207012f6cc2dae9fc796ef18abf5f6ebf73f9683b0e7322f35bde10471fe357515593c492db136a0b9514103fdb127fb53096b75c6197eea
7
- data.tar.gz: d085edddc926b57e6e8613886c661e7296e23ab121861fe880e61044d0d25c1dd3ca9474da89356aa3861b5426a749d3f737ad8b4d20c95c5839d9ea284da85b
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 builder [Nokogiri::XML::Builder]
67
- def to_xml(builder = nil, **opts)
68
- super builder, date_format: :short, **opts do |b|
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) / =~ item_data[:docid][0].id
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", format: "text/plain" }]
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
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.5.pre".freeze
3
3
  end
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "vcr"
35
35
  spec.add_development_dependency "webmock"
36
36
 
37
- spec.add_dependency "relaton-bib", "~> 1.4.0"
37
+ spec.add_dependency "relaton-bib", "~> 1.5.pre"
38
38
  spec.add_dependency "rubyzip"
39
39
  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.0
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-09-18 00:00:00.000000000 Z
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.4.0
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.4.0
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: '0'
236
+ version: 1.3.1
237
237
  requirements: []
238
238
  rubygems_version: 3.0.6
239
239
  signing_key: