relaton-nist 1.14.8 → 1.16.0

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: 0c116195f2ab6cfda43f76fea0833d11746ca245ed618e0600b0f212f5ab7400
4
+ data.tar.gz: 293ac575914bbc0c89380590ea1694ed68af31e473a8610b1e212fc072b6168d
5
5
  SHA512:
6
- metadata.gz: b2f68dc9000e02d2b23a611d02d84d76222d24811313b88fa5ccef8fbda2564058a93dd6ef1b0f71a7b36e0f278cb1107046c47b5098d3d0c43a423f235c3c70
7
- data.tar.gz: c38c9c1d2faf307843417b2be67d52a1064160b8ad3b2412c120b26cbe730ecef57ea1019d75eddf47d3e9d5155109571cf1ba69c2a3bce17d02960576ce9e3d
6
+ metadata.gz: 01b643f55e58c222395ca2ecbb6b93a43918160663aaf693052081fd1414ce59dc6c78e4c5056bb96661ab0d9d592554d1d474532af351f25f30df0478a9048c
7
+ data.tar.gz: ff958be3d09d8f48e52dc55757fe15508c9ce4228997585ca939648bc721e82e9fc01460467b45a4441bf3b1e494ffc0d338ca61d761da4bdaacb9c3ece22cf0
data/grammars/biblio.rng CHANGED
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -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.16.0".freeze
3
3
  end
data/relaton_nist.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.require_paths = ["lib"]
24
24
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
25
25
 
26
- spec.add_dependency "relaton-bib", "~> 1.14.0"
26
+ spec.add_dependency "relaton-bib", "~> 1.16.0"
27
27
  spec.add_dependency "relaton-index", "~> 0.2.0"
28
28
  spec.add_dependency "rubyzip"
29
29
  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.14.8
4
+ version: 1.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-19 00:00:00.000000000 Z
11
+ date: 2023-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaton-bib
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.14.0
19
+ version: 1.16.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.14.0
26
+ version: 1.16.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: relaton-index
29
29
  requirement: !ruby/object:Gem::Requirement