relaton-nist 2.1.1 → 2.2.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CLAUDE.md +8 -6
- data/Gemfile +7 -0
- data/README.adoc +2 -2
- data/Rakefile +3 -3
- data/lib/relaton/nist/bibliography.rb +24 -1
- data/lib/relaton/nist/data_fetcher.rb +16 -3
- data/lib/relaton/nist/hit_collection.rb +66 -12
- data/lib/relaton/nist/mods_parser.rb +8 -2
- data/lib/relaton/nist/processor.rb +3 -1
- data/lib/relaton/nist/version.rb +1 -1
- data/lib/relaton/nist.rb +5 -1
- data/relaton-nist.gemspec +5 -5
- metadata +11 -17
- data/.rubocop.yml +0 -12
- data/grammars/basicdoc.rng +0 -2140
- data/grammars/biblio-standoc.rng +0 -268
- data/grammars/biblio.rng +0 -2125
- data/grammars/relaton-nist-compile.rng +0 -11
- data/grammars/relaton-nist.rng +0 -50
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz: '
|
|
3
|
+
metadata.gz: '0280f417f1d69e2293595f8375ea938b9967746c83ac856d5239a2844300b701'
|
|
4
|
+
data.tar.gz: '0999f475da67c20b9fedee04085c477e9e7bc32c79f1753e54a460cd6425d9a7'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8552b405a62bda69ff86fd723e02839b3e5623b07da4c9e25bb52054726f1e68de792edc6bd58bc7ecd00660c51009c70f3d3424d35136fca888c5dc6e3fb4f6
|
|
7
|
+
data.tar.gz: c08297fb05fe7b998f26c57aec6a6fae93481b26a5bd9e5d54b7cce8d3c244f4fc4bcce1e68eb4edb601a5a4181adb66eb8a666392adc15e43c26c811afe3041
|
data/CLAUDE.md
CHANGED
|
@@ -84,17 +84,19 @@ Tests use VCR with WebMock. Cassettes are stored in `spec/vcr_cassettes/` and re
|
|
|
84
84
|
|
|
85
85
|
### Test Data Stubbing
|
|
86
86
|
|
|
87
|
-
Tests pre-load both the NIST index and CSRC pubs-export data from local fixtures in `before(:suite)` (see `spec/support/webmock.rb`), avoiding all HTTP requests for these data sources. VCR is configured to ignore both `index-
|
|
87
|
+
Tests pre-load both the NIST index and CSRC pubs-export data from local fixtures in `before(:suite)` (see `spec/support/webmock.rb`), avoiding all HTTP requests for these data sources. VCR is configured to ignore both `index-v2.zip` and `pubs-export` requests (`spec/support/vcr.rb`).
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
The gem consumes the **index-v2** index (`INDEXFILE = "index-v2"`): each row's `:id` is a `Pubid::Nist::Identifier` hash (lean `to_hash` form), so `HitCollection#from_ga` narrows candidates by number via binary search before the substring block filter, and stringifies `row[:id].to_s` at the Hit boundary. `spec/fixtures/index-v2.zip` is required for the suite to run (`rake spec:update_index` downloads it from `relaton-data-nist/v2`).
|
|
90
|
+
|
|
91
|
+
- **Index**: The YAML inside `spec/fixtures/index-v2.zip` is written to a temp file and loaded through `Relaton::Index::Type.new(:nist, nil, file, nil, ::Pubid::Nist::Identifier)`; calling `type.index` forces the offline read + `pubid_class` deserialization (and sort) before net is blocked. The instance is injected into `Relaton::Index.pool`, with `actual?` overridden to match only the remote (`url:`) lookup so the producer-side `find_or_create(:nist, file:, pubid_class:)` still gets a fresh instance. Run `rake spec:update_index` to refresh.
|
|
90
92
|
- **PubsExport**: The `PubsExport` singleton's `@data` is set directly from `spec/fixtures/pubs-export.zip`. Run `rake spec:update_pubs_export` to refresh.
|
|
91
93
|
|
|
92
94
|
To apply the index stubbing pattern to other relaton gems:
|
|
93
95
|
|
|
94
|
-
1. Add `spec:update_index` rake task (downloads `index-
|
|
95
|
-
2. Run `rake spec:update_index` to create `spec/fixtures/index-
|
|
96
|
-
3. In `spec/support/webmock.rb`:
|
|
97
|
-
4. In `spec/support/vcr.rb`: add `ignore_request` for `index-
|
|
96
|
+
1. Add a `spec:update_index` rake task (downloads `index-v2.zip` from the gem's GitHub data repo)
|
|
97
|
+
2. Run `rake spec:update_index` to create `spec/fixtures/index-v2.zip`
|
|
98
|
+
3. In `spec/support/webmock.rb`: extract the zip's YAML, write it to a temp file, create a `Type` with the flavor's `pubid_class`, call `type.index` to deserialize + sort, override `actual?` to match the remote `url:` lookup, and inject into `Relaton::Index.pool`
|
|
99
|
+
4. In `spec/support/vcr.rb`: add `ignore_request` for `index-v2.zip`
|
|
98
100
|
5. Remove any `allow_any_instance_of(Relaton::Index::Type)` workarounds from specs
|
|
99
101
|
|
|
100
102
|
## Key Dependencies
|
data/Gemfile
CHANGED
|
@@ -3,6 +3,13 @@ source "https://rubygems.org"
|
|
|
3
3
|
# Specify your gem's dependencies in relaton_nist.gemspec
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
|
+
# Use local monorepo sibling gems where available.
|
|
7
|
+
Dir["../*/"].each do |dir|
|
|
8
|
+
name = File.basename(dir)
|
|
9
|
+
next if name == File.basename(__dir__)
|
|
10
|
+
next unless File.exist?(File.join(dir, "#{name}.gemspec"))
|
|
11
|
+
gem name, path: dir
|
|
12
|
+
end
|
|
6
13
|
|
|
7
14
|
gem "equivalent-xml", "~> 0.6"
|
|
8
15
|
gem "pry-byebug"
|
data/README.adoc
CHANGED
|
@@ -74,7 +74,7 @@ https://github.com/relaton/loc_mods[`loc_mods`] library and its data mapped to
|
|
|
74
74
|
the Relaton model.
|
|
75
75
|
|
|
76
76
|
The NIST Library dataset provides documents listed in the
|
|
77
|
-
https://github.com/relaton/relaton-data-nist/blob/
|
|
77
|
+
https://github.com/relaton/relaton-data-nist/blob/v2/index-v2.yaml[index].
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
|
|
@@ -418,7 +418,7 @@ $ rake spec:update_index
|
|
|
418
418
|
$ rake spec:update_pubs_export
|
|
419
419
|
----
|
|
420
420
|
|
|
421
|
-
`spec:update_index` downloads the latest `index-
|
|
421
|
+
`spec:update_index` downloads the latest `index-v2.zip` from the
|
|
422
422
|
https://github.com/relaton/relaton-data-nist[relaton-data-nist] repository.
|
|
423
423
|
|
|
424
424
|
`spec:update_pubs_export` downloads the latest `pubs-export.zip` from
|
data/Rakefile
CHANGED
|
@@ -6,13 +6,13 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
6
6
|
task :default => :spec
|
|
7
7
|
|
|
8
8
|
namespace :spec do
|
|
9
|
-
desc "Download latest NIST index fixture from relaton-data-nist"
|
|
9
|
+
desc "Download latest NIST index fixture (index-v2) from relaton-data-nist"
|
|
10
10
|
task :update_index do
|
|
11
11
|
require "net/http"
|
|
12
12
|
require "uri"
|
|
13
13
|
|
|
14
|
-
url = "https://raw.githubusercontent.com/relaton/relaton-data-nist/v2/index-
|
|
15
|
-
dest = File.join(__dir__, "spec", "fixtures", "index-
|
|
14
|
+
url = "https://raw.githubusercontent.com/relaton/relaton-data-nist/v2/index-v2.zip"
|
|
15
|
+
dest = File.join(__dir__, "spec", "fixtures", "index-v2.zip")
|
|
16
16
|
|
|
17
17
|
puts "Downloading #{url} ..."
|
|
18
18
|
uri = URI.parse(url)
|
|
@@ -13,6 +13,11 @@ module Relaton
|
|
|
13
13
|
#
|
|
14
14
|
def search(text, year = nil, opts = {})
|
|
15
15
|
ref = text.sub(/^NISTIR/, "NIST IR").sub(/\/Add/, " Add")
|
|
16
|
+
# pubid 2.x only recognizes the addendum marker with a trailing
|
|
17
|
+
# period, and only splits an uppercase part letter — canonicalize
|
|
18
|
+
# both ("800-38a Add" -> "800-38A Add.") so @reference parses to the
|
|
19
|
+
# same pubid the index/CSRC carry.
|
|
20
|
+
ref = ref.sub(/\bAdd\b\.?/i, "Add.").sub(/([0-9])([a-z])(?=\s+Add\.)/) { "#{$1}#{$2.upcase}" }
|
|
16
21
|
HitCollection.search ref, year, opts
|
|
17
22
|
rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError => e
|
|
18
23
|
raise Relaton::RequestError, e.message
|
|
@@ -86,7 +91,18 @@ module Relaton
|
|
|
86
91
|
missed_years = []
|
|
87
92
|
iteration = parse_iteration(opts[:stage])
|
|
88
93
|
|
|
89
|
-
|
|
94
|
+
# A stageless query means "the published document". Multiple
|
|
95
|
+
# editions can match once stage is excluded (e.g. a final "r2"
|
|
96
|
+
# and its draft "Rev. 2 ipd"), so try published hits before
|
|
97
|
+
# drafts. An explicit stage keeps the original order. Stable
|
|
98
|
+
# partition preserves existing tie-order among finals.
|
|
99
|
+
ordered = if iteration
|
|
100
|
+
result.array
|
|
101
|
+
else
|
|
102
|
+
result.array.sort_by.with_index { |h, i| [draft_hit?(h) ? 1 : 0, i] }
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
ordered.each do |h|
|
|
90
106
|
r = h.item
|
|
91
107
|
next if opts[:date] && !match_date?(r, opts[:date])
|
|
92
108
|
next if iteration && r.status&.iteration != iteration
|
|
@@ -98,6 +114,13 @@ module Relaton
|
|
|
98
114
|
{ years: missed_years }
|
|
99
115
|
end
|
|
100
116
|
|
|
117
|
+
# A hit is a draft when its CSRC status says so (e.g. "draft-public")
|
|
118
|
+
# or its rendered code carries a PD stage marker (ipd/fpd/NpD).
|
|
119
|
+
def draft_hit?(hit)
|
|
120
|
+
hit.hit[:status].to_s.include?("draft") ||
|
|
121
|
+
hit.hit[:code].to_s.match?(/(?:\bi|\bf|\b\d)pd\b|\(Draft\)/i)
|
|
122
|
+
end
|
|
123
|
+
|
|
101
124
|
def parse_iteration(stage)
|
|
102
125
|
iter = /\w+(?=PD)|(?<=PD-)\w+/.match(stage)&.to_s
|
|
103
126
|
case iter
|
|
@@ -29,13 +29,24 @@ module Relaton
|
|
|
29
29
|
id = bib.docidentifier.find(&:primary) || bib.docidentifier.first
|
|
30
30
|
file = output_file id.content.sub(/^NIST IR/, "NISTIR")
|
|
31
31
|
if @files.include? file
|
|
32
|
-
Util.warn "File #{file} exists. Docid: #{
|
|
32
|
+
Util.warn "File #{file} exists. Docid: #{id.content}"
|
|
33
33
|
else @files << file
|
|
34
34
|
end
|
|
35
|
-
|
|
35
|
+
pid = pubid id.content
|
|
36
|
+
index.add_or_update pid, file if pid
|
|
36
37
|
File.write file, serialize(bib), encoding: "UTF-8"
|
|
37
38
|
end
|
|
38
39
|
|
|
40
|
+
# Parse a docidentifier string into a Pubid::Nist::Identifier; nil (with a
|
|
41
|
+
# warning) if pubid can't parse it, so a single bad id never aborts the
|
|
42
|
+
# crawl or corrupts index-v2.
|
|
43
|
+
def pubid(id)
|
|
44
|
+
::Pubid::Nist::Identifier.parse id
|
|
45
|
+
rescue StandardError => e
|
|
46
|
+
Util.warn "Failed to parse `#{id}` with pubid: #{e.message}"
|
|
47
|
+
nil
|
|
48
|
+
end
|
|
49
|
+
|
|
39
50
|
# def add_static_files
|
|
40
51
|
# Dir["./static/*.yaml"].each do |file|
|
|
41
52
|
# bib = Item.from_yaml(File.read(file, encoding: "UTF-8"))
|
|
@@ -60,7 +71,9 @@ module Relaton
|
|
|
60
71
|
end
|
|
61
72
|
|
|
62
73
|
def index
|
|
63
|
-
@index ||= Relaton::Index.find_or_create
|
|
74
|
+
@index ||= Relaton::Index.find_or_create(
|
|
75
|
+
:nist, file: "#{INDEXFILE}.yaml", pubid_class: ::Pubid::Nist::Identifier
|
|
76
|
+
)
|
|
64
77
|
end
|
|
65
78
|
|
|
66
79
|
def series
|
|
@@ -61,7 +61,7 @@ module Relaton
|
|
|
61
61
|
refid = ::Pubid::Nist::Identifier.parse(@reference)
|
|
62
62
|
parts = exclude_parts refid
|
|
63
63
|
arr = @array.select do |item|
|
|
64
|
-
pubid = ::Pubid::Nist::Identifier.parse(item.hit[:code]
|
|
64
|
+
pubid = ::Pubid::Nist::Identifier.parse(item.hit[:code])
|
|
65
65
|
pubid.exclude(*parts) == refid
|
|
66
66
|
rescue StandardError
|
|
67
67
|
item.hit[:code] == ref
|
|
@@ -74,10 +74,31 @@ module Relaton
|
|
|
74
74
|
return dup
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
# The edition/revision/version attributes that together identify a
|
|
78
|
+
# specific edition of a document. Treated as one unit when deciding
|
|
79
|
+
# whether a reference is "incomplete" (no edition given).
|
|
80
|
+
EDITION_FAMILY = %i[
|
|
81
|
+
edition edition_component revision revision_year revision_month
|
|
82
|
+
version version_component edition_year
|
|
83
|
+
].freeze
|
|
84
|
+
|
|
77
85
|
def exclude_parts(pubid)
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
# Pubid 2.x exposes update via two slots (:update and :update_component),
|
|
87
|
+
# and pubs_export_id assigns to update_component — so checking only
|
|
88
|
+
# :update misses the case where the indexed pubid carries the update
|
|
89
|
+
# info there. Same logic for both legacy and component slots.
|
|
90
|
+
parts = %i[stage update update_component].select do |part|
|
|
91
|
+
pubid.respond_to?(part) && pubid.send(part).nil?
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Incomplete reference: no edition/revision/version specified (e.g.
|
|
95
|
+
# "NIST SP 800-60v1"). Exclude the whole edition family so it matches
|
|
96
|
+
# any edition; result selection (sort_hits! + results_filter) then
|
|
97
|
+
# picks the latest/preferred one.
|
|
98
|
+
if EDITION_FAMILY.all? { |p| !pubid.respond_to?(p) || pubid.send(p).nil? }
|
|
99
|
+
parts += EDITION_FAMILY
|
|
80
100
|
end
|
|
101
|
+
parts
|
|
81
102
|
end
|
|
82
103
|
|
|
83
104
|
private
|
|
@@ -208,13 +229,31 @@ module Relaton
|
|
|
208
229
|
#
|
|
209
230
|
def from_ga # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
210
231
|
Util.info "Fetching from Relaton repository ...", key: @reference
|
|
211
|
-
|
|
232
|
+
# Parse the reference so index.search narrows candidates by number via
|
|
233
|
+
# binary search; fall back to the raw string for index lookup if pubid
|
|
234
|
+
# can't parse it.
|
|
235
|
+
r = begin
|
|
236
|
+
::Pubid::Nist::Identifier.parse(@reference)
|
|
237
|
+
rescue StandardError
|
|
238
|
+
@reference
|
|
239
|
+
end
|
|
212
240
|
|
|
213
|
-
index = Relaton::Index.find_or_create
|
|
214
|
-
|
|
241
|
+
index = Relaton::Index.find_or_create(
|
|
242
|
+
:nist, url: "#{GHNISTDATA}#{INDEXFILE}.zip", file: "#{INDEXFILE}.yaml",
|
|
243
|
+
pubid_class: ::Pubid::Nist::Identifier
|
|
244
|
+
)
|
|
245
|
+
# search(r) narrows candidates by number via binary search; the block
|
|
246
|
+
# keeps the broad family match (this doc and all its editions/parts)
|
|
247
|
+
# the old string index gave via substring, leaving finer filtering to
|
|
248
|
+
# search_filter.
|
|
249
|
+
needle = r.to_s
|
|
250
|
+
rows = index.search(r) { |row| row[:id].to_s.include?(needle) }
|
|
251
|
+
.sort_by { |row| row[:id].to_s }
|
|
215
252
|
|
|
216
253
|
rows.map do |row|
|
|
217
|
-
|
|
254
|
+
# index-v2 stores Pubid objects; the rest of the pipeline (search_filter,
|
|
255
|
+
# Hit, Scraper) works on string codes, so stringify at the boundary.
|
|
256
|
+
Hit.new({ code: row[:id].to_s, path: row[:file] }, self)
|
|
218
257
|
end
|
|
219
258
|
rescue OpenURI::HTTPError => e
|
|
220
259
|
return [] if e.io.status[0] == "404"
|
|
@@ -246,8 +285,19 @@ module Relaton
|
|
|
246
285
|
end => id
|
|
247
286
|
|
|
248
287
|
id.sub!(/(?:-draft\d*|\.\wpd)$/, "")
|
|
249
|
-
id = id.gsub(".", " ").sub(/-Add(\d*)$/, ' Add
|
|
250
|
-
|
|
288
|
+
id = id.gsub(".", " ").sub(/-Add(\d*)$/, ' Add.\1') if id.match?(/-Add\d*$/)
|
|
289
|
+
# Normalize to space-separated form so pubid 2.x parses as
|
|
290
|
+
# parsed_format=:short and renders without dots; also force the
|
|
291
|
+
# "NIST " prefix so publisher_was_parsed is set.
|
|
292
|
+
parse_input = id.gsub(/\bNIST\./, "NIST ")
|
|
293
|
+
parse_input = "NIST #{parse_input}" unless parse_input.start_with?("NIST ")
|
|
294
|
+
pid = ::Pubid::Nist::Identifier.parse(parse_input)
|
|
295
|
+
|
|
296
|
+
# Canonicalize edition spelling: DOI-derived codes are already short
|
|
297
|
+
# ("…r2"), but no-DOI drafts come from the verbose docidentifier
|
|
298
|
+
# ("… Rev. 2") and pubid preserves that spelling via original_prefix.
|
|
299
|
+
# Drop it so every code renders the canonical short form.
|
|
300
|
+
pid.edition.original_prefix = nil if pid.respond_to?(:edition) && pid.edition
|
|
251
301
|
|
|
252
302
|
# Stage: URI is authoritative, fall back to iteration. "final" => no stage.
|
|
253
303
|
uri_stage = json["uri"] && json["uri"][%r{/(final|ipd|fpd|\dpd)(?:-\(\d+\))?(?:/|$)}, 1]
|
|
@@ -256,13 +306,17 @@ module Relaton
|
|
|
256
306
|
when nil, "final"
|
|
257
307
|
# no stage — "final" means published
|
|
258
308
|
when "fpd"
|
|
259
|
-
pid.stage = ::Pubid::Nist::Stage.new id: "f", type: "pd"
|
|
309
|
+
pid.stage = ::Pubid::Nist::Components::Stage.new id: "f", type: "pd"
|
|
260
310
|
when /\A(\w)pd\z/
|
|
261
|
-
pid.stage = ::Pubid::Nist::Stage.new id: Regexp.last_match(1), type: "pd"
|
|
311
|
+
pid.stage = ::Pubid::Nist::Components::Stage.new id: Regexp.last_match(1), type: "pd"
|
|
262
312
|
end
|
|
263
313
|
|
|
264
314
|
/\/upd(?<upd>\d+)\// =~ json["uri"]
|
|
265
|
-
|
|
315
|
+
# In pubid 2.x render paths the Update is read from
|
|
316
|
+
# update_component (Components::Update), not the legacy :update
|
|
317
|
+
# slot — assigning to :update would render as "-upd/Upd2" via the
|
|
318
|
+
# elsif fallback path in Base#to_short_style.
|
|
319
|
+
pid.update_component = ::Pubid::Nist::Components::Update.new(number: upd) if upd
|
|
266
320
|
pid.to_s
|
|
267
321
|
rescue StandardError
|
|
268
322
|
id += " #{json["iteration"]}" if json["iteration"] && json["iteration"] != "final"
|
|
@@ -48,8 +48,14 @@ module Relaton
|
|
|
48
48
|
def get_id_from_str(str)
|
|
49
49
|
return if str.nil? || str.empty?
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
# DOIs arrive dotted ("NIST.HB.135e2022-upd1"); that MR-style form
|
|
52
|
+
# parses through a path that skips UpdateCodes date lookup and drops
|
|
53
|
+
# letter suffixes. Space the leading "PUB.SERIES." prefix so it parses
|
|
54
|
+
# like the canonical short form (only the separator dots are touched,
|
|
55
|
+
# not any inside the number). Then force :human rendering.
|
|
56
|
+
spaced = str.sub(/\A(NIST|NBS)\.([A-Z][A-Za-z]*)\./, '\1 \2 ')
|
|
57
|
+
::Pubid::Nist::Identifier.parse(spaced).to_s(format: :human)
|
|
58
|
+
rescue Parslet::ParseFailed
|
|
53
59
|
str.gsub(".", " ").sub(/^[\D]+/, &:upcase)
|
|
54
60
|
end
|
|
55
61
|
|
|
@@ -59,7 +59,9 @@ module Relaton
|
|
|
59
59
|
#
|
|
60
60
|
def remove_index_file
|
|
61
61
|
require_relative "../nist"
|
|
62
|
-
Relaton::Index.find_or_create(
|
|
62
|
+
Relaton::Index.find_or_create(
|
|
63
|
+
:nist, url: true, file: "#{INDEXFILE}.yaml", pubid_class: ::Pubid::Nist::Identifier
|
|
64
|
+
).remove_file
|
|
63
65
|
end
|
|
64
66
|
end
|
|
65
67
|
end
|
data/lib/relaton/nist/version.rb
CHANGED
data/lib/relaton/nist.rb
CHANGED
|
@@ -17,7 +17,11 @@ require_relative "nist/bibliography"
|
|
|
17
17
|
|
|
18
18
|
module Relaton
|
|
19
19
|
module Nist
|
|
20
|
-
|
|
20
|
+
# Pubid-based index (index-v2): `:id` is a Pubid::Nist::Identifier hash, so
|
|
21
|
+
# search narrows by number via binary search. The legacy string index-v1
|
|
22
|
+
# (for older gem versions) is rebuilt separately by the relaton-data-nist
|
|
23
|
+
# crawler, not by this gem's DataFetcher.
|
|
24
|
+
INDEXFILE = "index-v2"
|
|
21
25
|
|
|
22
26
|
class Error < StandardError; end
|
|
23
27
|
|
data/relaton-nist.gemspec
CHANGED
|
@@ -21,14 +21,14 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.bindir = "exe"
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
23
23
|
spec.require_paths = ["lib"]
|
|
24
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 3.
|
|
24
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
|
|
25
25
|
|
|
26
26
|
spec.add_dependency "base64"
|
|
27
27
|
spec.add_dependency "mechanize", "~> 2.0"
|
|
28
28
|
spec.add_dependency "loc_mods", "~> 0.3.0"
|
|
29
|
-
spec.add_dependency "pubid", "~>
|
|
30
|
-
spec.add_dependency "relaton-bib", "~> 2.
|
|
31
|
-
spec.add_dependency "relaton-core", "~>
|
|
32
|
-
spec.add_dependency "relaton-index", "~>
|
|
29
|
+
spec.add_dependency "pubid", "~> 2.0.0.pre.alpha.3"
|
|
30
|
+
spec.add_dependency "relaton-bib", "~> 2.2.0.pre.alpha.1"
|
|
31
|
+
spec.add_dependency "relaton-core", "~> 2.2.0.pre.alpha.1"
|
|
32
|
+
spec.add_dependency "relaton-index", "~> 2.2.0.pre.alpha.1"
|
|
33
33
|
spec.add_dependency "rubyzip"
|
|
34
34
|
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: 2.
|
|
4
|
+
version: 2.2.0.pre.alpha.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -58,56 +58,56 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: 2.0.0.pre.alpha.3
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: 2.0.0.pre.alpha.3
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: relaton-bib
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: 2.
|
|
75
|
+
version: 2.2.0.pre.alpha.1
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: 2.
|
|
82
|
+
version: 2.2.0.pre.alpha.1
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: relaton-core
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
89
|
+
version: 2.2.0.pre.alpha.1
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
96
|
+
version: 2.2.0.pre.alpha.1
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: relaton-index
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
103
|
+
version: 2.2.0.pre.alpha.1
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
110
|
+
version: 2.2.0.pre.alpha.1
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
112
|
name: rubyzip
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -133,7 +133,6 @@ files:
|
|
|
133
133
|
- ".github/workflows/release.yml"
|
|
134
134
|
- ".gitignore"
|
|
135
135
|
- ".rspec"
|
|
136
|
-
- ".rubocop.yml"
|
|
137
136
|
- CLAUDE.md
|
|
138
137
|
- Gemfile
|
|
139
138
|
- LICENSE.txt
|
|
@@ -142,11 +141,6 @@ files:
|
|
|
142
141
|
- bin/console
|
|
143
142
|
- bin/rspec
|
|
144
143
|
- bin/setup
|
|
145
|
-
- grammars/basicdoc.rng
|
|
146
|
-
- grammars/biblio-standoc.rng
|
|
147
|
-
- grammars/biblio.rng
|
|
148
|
-
- grammars/relaton-nist-compile.rng
|
|
149
|
-
- grammars/relaton-nist.rng
|
|
150
144
|
- lib/relaton/nist.rb
|
|
151
145
|
- lib/relaton/nist/bibdata.rb
|
|
152
146
|
- lib/relaton/nist/bibitem.rb
|
|
@@ -181,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
181
175
|
requirements:
|
|
182
176
|
- - ">="
|
|
183
177
|
- !ruby/object:Gem::Version
|
|
184
|
-
version: 3.
|
|
178
|
+
version: 3.3.0
|
|
185
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
180
|
requirements:
|
|
187
181
|
- - ">="
|
data/.rubocop.yml
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# This project follows the Ribose OSS style guide.
|
|
2
|
-
# https://github.com/riboseinc/oss-guides
|
|
3
|
-
# All project-specific additions and overrides should be specified in this file.
|
|
4
|
-
|
|
5
|
-
require: rubocop-rails
|
|
6
|
-
|
|
7
|
-
inherit_from:
|
|
8
|
-
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
|
9
|
-
AllCops:
|
|
10
|
-
TargetRubyVersion: 3.2
|
|
11
|
-
Rails:
|
|
12
|
-
Enabled: false
|