relaton-nist 1.14.8 → 1.14.9

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: bb068b75779f92292d1fef25e9ae392a76df53d5d52bc2a644fb9d16ec0c5998
4
- data.tar.gz: f64ba4dd75be3fd93a5a134c4babe39f08d4b6f774e2d488ba8df525f469fa1c
3
+ metadata.gz: d70d5c4814d320a0e7de37ffa6c87f70303132fc93a667e1ea7397cda9e3b2cd
4
+ data.tar.gz: 4ac72228dfae2aeff749b90765235c374385647e16746d6efafc43ce3a86a0d6
5
5
  SHA512:
6
- metadata.gz: b2f68dc9000e02d2b23a611d02d84d76222d24811313b88fa5ccef8fbda2564058a93dd6ef1b0f71a7b36e0f278cb1107046c47b5098d3d0c43a423f235c3c70
7
- data.tar.gz: c38c9c1d2faf307843417b2be67d52a1064160b8ad3b2412c120b26cbe730ecef57ea1019d75eddf47d3e9d5155109571cf1ba69c2a3bce17d02960576ce9e3d
6
+ metadata.gz: 2128557619cae8f53fd3d80839303597d77e85065a58618a49302dd8593982ba374a7b73ab87fbe6c27661af923857f2382688990ff64acf27d2dd4607a8e0b5
7
+ data.tar.gz: 8a909befb6b35b64b9f48cbcbcbef0a9ef42f336709a9a628844bf29ac94266ba466067ea3636c57e92e8c5e789b9b65cbc7317941697e288ae65a7a619da55f
@@ -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(/-draft/, id).nil?,
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] # long_to_short(refparts, "prt").to_s
154
- ref += "ver#{refparts[:ver]}" if refparts[:ver] # long_to_short(refparts, "vol").to_s
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[:url] ? parse_json(hit_data) : fetch_gh(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
- item_data[:docid][0] = RelatonBib::DocumentIdentifier.new(
29
- id: titles[0][:content].upcase, type: "NIST", primary: true,
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
@@ -1,3 +1,3 @@
1
1
  module RelatonNist
2
- VERSION = "1.14.8".freeze
2
+ VERSION = "1.14.9".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-nist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.8
4
+ version: 1.14.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.