relaton 3.0.8 → 3.1.0
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/lib/relaton/3gpp/processor.rb +1 -1
- data/lib/relaton/3gpp.rb +3 -3
- data/lib/relaton/adobe/processor.rb +1 -1
- data/lib/relaton/adobe.rb +3 -3
- data/lib/relaton/bib/item_data.rb +2 -2
- data/lib/relaton/bib.rb +2 -2
- data/lib/relaton/bibcollection.rb +1 -1
- data/lib/relaton/bipm/processor.rb +1 -1
- data/lib/relaton/bipm.rb +3 -3
- data/lib/relaton/bsi/processor.rb +1 -1
- data/lib/relaton/bsi.rb +1 -1
- data/lib/relaton/calconnect/data_fetcher.rb +2 -2
- data/lib/relaton/calconnect/model/item.rb +1 -1
- data/lib/relaton/calconnect/processor.rb +1 -1
- data/lib/relaton/calconnect.rb +2 -2
- data/lib/relaton/ccsds/data/fetcher.rb +1 -1
- data/lib/relaton/ccsds/model/item.rb +1 -1
- data/lib/relaton/ccsds/processor.rb +1 -1
- data/lib/relaton/ccsds/util.rb +1 -1
- data/lib/relaton/ccsds.rb +1 -1
- data/lib/relaton/cen/processor.rb +1 -1
- data/lib/relaton/cen.rb +2 -2
- data/lib/relaton/cie/data_fetcher.rb +3 -3
- data/lib/relaton/cie/processor.rb +1 -1
- data/lib/relaton/cie.rb +2 -2
- data/lib/relaton/cli/base_convertor.rb +3 -3
- data/lib/relaton/cli/command.rb +15 -9
- data/lib/relaton/cli/index_site_generator.rb +34 -6
- data/lib/relaton/cli/relaton_file.rb +4 -4
- data/lib/relaton/cli/subcommand_collection.rb +1 -1
- data/lib/relaton/cli/xml_convertor.rb +1 -1
- data/lib/relaton/cli/yaml_convertor.rb +2 -2
- data/lib/relaton/cli.rb +1 -11
- data/lib/relaton/core/processor.rb +1 -1
- data/lib/relaton/core.rb +1 -1
- data/lib/relaton/db/registry.rb +1 -1
- data/lib/relaton/db.rb +1 -1
- data/lib/relaton/doi/parser.rb +2 -1
- data/lib/relaton/doi/processor.rb +1 -1
- data/lib/relaton/doi.rb +4 -4
- data/lib/relaton/easc/processor.rb +1 -1
- data/lib/relaton/easc.rb +3 -3
- data/lib/relaton/ecma/data_fetcher.rb +1 -1
- data/lib/relaton/ecma/processor.rb +1 -1
- data/lib/relaton/ecma.rb +2 -2
- data/lib/relaton/etsi/data_fetcher.rb +2 -2
- data/lib/relaton/etsi/item.rb +1 -1
- data/lib/relaton/etsi/processor.rb +2 -2
- data/lib/relaton/etsi.rb +1 -1
- data/lib/relaton/evs/processor.rb +1 -1
- data/lib/relaton/evs.rb +2 -2
- data/lib/relaton/gb/bibliography.rb +1 -1
- data/lib/relaton/gb/processor.rb +1 -1
- data/lib/relaton/gb.rb +2 -2
- data/lib/relaton/gost/processor.rb +1 -1
- data/lib/relaton/gost.rb +3 -3
- data/lib/relaton/iala/processor.rb +1 -1
- data/lib/relaton/iala.rb +3 -3
- data/lib/relaton/iana/data_fetcher.rb +1 -1
- data/lib/relaton/iana/processor.rb +1 -1
- data/lib/relaton/iana.rb +2 -2
- data/lib/relaton/iec/data_fetcher.rb +1 -1
- data/lib/relaton/iec/processor.rb +1 -1
- data/lib/relaton/iec.rb +2 -2
- data/lib/relaton/ieee/processor.rb +1 -1
- data/lib/relaton/ieee.rb +2 -2
- data/lib/relaton/ietf/data_fetcher.rb +1 -1
- data/lib/relaton/ietf/processor.rb +1 -1
- data/lib/relaton/ietf.rb +2 -2
- data/lib/relaton/iho/hash_parser_v1.rb +1 -1
- data/lib/relaton/iho/processor.rb +1 -1
- data/lib/relaton/iho.rb +2 -2
- data/lib/relaton/index.rb +1 -1
- data/lib/relaton/isbn/processor.rb +1 -1
- data/lib/relaton/isbn.rb +1 -1
- data/lib/relaton/iso/hash_parser_v1.rb +1 -1
- data/lib/relaton/iso/processor.rb +1 -1
- data/lib/relaton/iso.rb +3 -3
- data/lib/relaton/itu/processor.rb +1 -1
- data/lib/relaton/itu.rb +3 -3
- data/lib/relaton/jcgm/processor.rb +1 -1
- data/lib/relaton/jcgm.rb +2 -2
- data/lib/relaton/jis/processor.rb +1 -1
- data/lib/relaton/jis.rb +2 -2
- data/lib/relaton/nist/processor.rb +1 -1
- data/lib/relaton/nist.rb +2 -2
- data/lib/relaton/oasis/processor.rb +1 -1
- data/lib/relaton/oasis.rb +2 -2
- data/lib/relaton/ogc/processor.rb +1 -1
- data/lib/relaton/ogc.rb +2 -2
- data/lib/relaton/oiml/processor.rb +1 -1
- data/lib/relaton/oiml.rb +2 -2
- data/lib/relaton/omg/processor.rb +1 -1
- data/lib/relaton/omg.rb +1 -1
- data/lib/relaton/plateau/data_fetcher.rb +1 -1
- data/lib/relaton/plateau/processor.rb +1 -1
- data/lib/relaton/plateau.rb +2 -2
- data/lib/relaton/render/iso690/elements/extent.rb +1 -1
- data/lib/relaton/sae/CLAUDE.md +89 -0
- data/lib/relaton/sae/bibdata.rb +8 -0
- data/lib/relaton/sae/bibitem.rb +8 -0
- data/lib/relaton/sae/bibliography.rb +128 -0
- data/lib/relaton/sae/data_fetcher.rb +219 -0
- data/lib/relaton/sae/doi_code.rb +83 -0
- data/lib/relaton/sae/item.rb +10 -0
- data/lib/relaton/sae/item_data.rb +6 -0
- data/lib/relaton/sae/processor.rb +62 -0
- data/lib/relaton/sae/util.rb +9 -0
- data/lib/relaton/sae.rb +37 -0
- data/lib/relaton/un/processor.rb +1 -1
- data/lib/relaton/un.rb +1 -1
- data/lib/relaton/version.rb +1 -1
- data/lib/relaton/w3c/bibliography.rb +1 -1
- data/lib/relaton/w3c/data_fetcher.rb +1 -1
- data/lib/relaton/w3c/processor.rb +1 -1
- data/lib/relaton/w3c.rb +2 -2
- data/lib/relaton/xsf/data_fetcher.rb +1 -1
- data/lib/relaton/xsf/processor.rb +1 -1
- data/lib/relaton/xsf.rb +2 -2
- data/lib/relaton-cli.rb +2 -2
- data/lib/relaton-render.rb +1 -2
- data/lib/relaton.rb +3 -2
- metadata +16 -7
- data/lib/relaton/cli/version.rb +0 -11
- data/lib/relaton/render/version.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0bdb2921b9e783bd265ac5fa7fdcf74e464624cc817f3a321e4206602ba94fcf
|
|
4
|
+
data.tar.gz: 5a329642cc5ed894e9008011cb99a7f35c49c9da624b19b87dbf53d12259325f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9828c92364edaca6d9f56655f8e67aa0de7bdf221a2fdaf03d9fb185a8eb448337dc9f77af028133a390c392c14a273fa31b32e8ab8c00ff1b80813a58efcf9a
|
|
7
|
+
data.tar.gz: 05a358f667af4b048fb3503d8208c1ff60796b785719da720e1039160c66eaff3c58dc43dbda270d2171197f3636166a32bdc944682435c6d6ed4f63e393a1f8
|
data/lib/relaton/3gpp.rb
CHANGED
|
@@ -3,9 +3,9 @@ require "net/http"
|
|
|
3
3
|
# index code names. Processor#remove_index_file names no pubid class: the
|
|
4
4
|
# delete never reads the index (see lib/relaton/index/CLAUDE.md).
|
|
5
5
|
require "pubid"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
require_relative "index"
|
|
7
|
+
require_relative "core"
|
|
8
|
+
require_relative "bib"
|
|
9
9
|
require_relative "version"
|
|
10
10
|
require_relative "3gpp/util"
|
|
11
11
|
require_relative "3gpp/item"
|
data/lib/relaton/adobe.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
require_relative "bib"
|
|
4
|
+
require_relative "index"
|
|
5
5
|
require "pubid"
|
|
6
|
-
|
|
6
|
+
require_relative "version"
|
|
7
7
|
|
|
8
8
|
# Relaton::Adobe is the Adobe (font tech notes, character collections,
|
|
9
9
|
# PostScript Language, etc.) flavor of the unified relaton gem. Adds
|
|
@@ -173,13 +173,13 @@ module Relaton
|
|
|
173
173
|
# ISO 690 rendered reference (the style instance lives in the
|
|
174
174
|
# relaton-models citation module; the engine in relaton-render).
|
|
175
175
|
def to_iso690(lang: "en", script: "Latn")
|
|
176
|
-
|
|
176
|
+
require_relative "../render/iso690"
|
|
177
177
|
Render::Iso690::Renderer.render(self, lang: lang, script: script)
|
|
178
178
|
end
|
|
179
179
|
|
|
180
180
|
# ISO 690 name-and-date in-text citation.
|
|
181
181
|
def to_iso690_citation(lang: "en", script: "Latn", disambiguator: nil)
|
|
182
|
-
|
|
182
|
+
require_relative "../render/iso690"
|
|
183
183
|
Render::Iso690::Renderer.citation(
|
|
184
184
|
self, disambiguator: disambiguator, lang: lang, script: script
|
|
185
185
|
)
|
data/lib/relaton/bib.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative "logger"
|
|
2
2
|
require "forwardable"
|
|
3
3
|
# require "htmlentities"
|
|
4
4
|
require "bibtex"
|
|
5
5
|
require "iso639"
|
|
6
6
|
require "rfcxml"
|
|
7
|
-
|
|
7
|
+
require_relative "core"
|
|
8
8
|
require "yeptris"
|
|
9
9
|
require_relative "version"
|
|
10
10
|
require_relative "bib/util"
|
data/lib/relaton/bipm.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require "zip"
|
|
2
2
|
require "fileutils"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
require_relative "bib"
|
|
4
|
+
require_relative "index"
|
|
5
|
+
require_relative "core"
|
|
6
6
|
require "pubid"
|
|
7
7
|
require_relative "version"
|
|
8
8
|
require_relative "bipm/util"
|
data/lib/relaton/bsi.rb
CHANGED
|
@@ -2,8 +2,8 @@ require "yeptris"
|
|
|
2
2
|
# frozen_string_literal:true
|
|
3
3
|
|
|
4
4
|
require "mechanize"
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
require_relative "../core"
|
|
6
|
+
require_relative "../index"
|
|
7
7
|
# The flavor top-level, for INDEXFILE and ::Pubid::Calconnect::Identifier.
|
|
8
8
|
# `relaton-data-calconnect`'s crawler requires THIS file and nothing else, so
|
|
9
9
|
# without it `#index` NameErrors on the very first document. (The ECMA form;
|
data/lib/relaton/calconnect.rb
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
# (The ECMA/IANA/IHO/OGC form; spec/relaton/lazy_loading_spec.rb guards that
|
|
4
4
|
# this file is not itself loaded when a Db is built.)
|
|
5
5
|
require "pubid"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
require_relative "index"
|
|
7
|
+
require_relative "core"
|
|
8
8
|
require_relative "version"
|
|
9
9
|
require_relative "calconnect/model/item"
|
|
10
10
|
require_relative "calconnect/util"
|
data/lib/relaton/ccsds/util.rb
CHANGED
data/lib/relaton/ccsds.rb
CHANGED
data/lib/relaton/cen.rb
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
require "digest/md5"
|
|
4
4
|
require "mechanize"
|
|
5
|
-
|
|
5
|
+
require_relative "core"
|
|
6
6
|
require "isoics"
|
|
7
7
|
require "pubid"
|
|
8
|
-
|
|
8
|
+
require_relative "bib"
|
|
9
9
|
require_relative "version"
|
|
10
10
|
require_relative "cen/util"
|
|
11
11
|
require_relative "cen/model/item"
|
|
@@ -5,9 +5,9 @@ require "fileutils"
|
|
|
5
5
|
require "ferrum"
|
|
6
6
|
require "moxml"
|
|
7
7
|
require "pubid"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
require_relative "../index"
|
|
9
|
+
require_relative "../bib"
|
|
10
|
+
require_relative "../core/data_fetcher"
|
|
11
11
|
require_relative "../cie"
|
|
12
12
|
|
|
13
13
|
module Relaton
|
data/lib/relaton/cie.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require "moxml"
|
|
2
2
|
# require "parslet"
|
|
3
3
|
require "pubid"
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
require_relative "index"
|
|
5
|
+
require_relative "bib"
|
|
6
6
|
# require "relaton_bib/name_parser"
|
|
7
7
|
require_relative "version"
|
|
8
8
|
require_relative "cie/authors_parser"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require "fileutils"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
require_relative "../bibdata"
|
|
3
|
+
require_relative "../bibcollection"
|
|
4
|
+
require_relative "xml_to_html_renderer"
|
|
5
5
|
|
|
6
6
|
module Relaton
|
|
7
7
|
module Cli
|
data/lib/relaton/cli/command.rb
CHANGED
|
@@ -2,13 +2,13 @@ require "date"
|
|
|
2
2
|
require "tmpdir"
|
|
3
3
|
require "shellwords"
|
|
4
4
|
require "pubid"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
require_relative "relaton_file"
|
|
6
|
+
require_relative "xml_convertor"
|
|
7
|
+
require_relative "yaml_convertor"
|
|
8
|
+
require_relative "data_fetcher"
|
|
9
|
+
require_relative "index_site_generator"
|
|
10
|
+
require_relative "subcommand_collection"
|
|
11
|
+
require_relative "subcommand_db"
|
|
12
12
|
require "fcntl"
|
|
13
13
|
|
|
14
14
|
module Relaton
|
|
@@ -34,6 +34,12 @@ module Relaton
|
|
|
34
34
|
Relaton::Cli.version
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
desc "types", "List the supported flavors (--type values of relaton fetch)"
|
|
38
|
+
|
|
39
|
+
def types
|
|
40
|
+
puts registered_types.sort.join(", ")
|
|
41
|
+
end
|
|
42
|
+
|
|
37
43
|
desc "fetch CODE", "Fetch Relaton XML for Standard identifier CODE"
|
|
38
44
|
option :type, aliases: :t,
|
|
39
45
|
desc: "Type of standard to get bibliographic entry for"
|
|
@@ -230,8 +236,8 @@ module Relaton
|
|
|
230
236
|
elsif options[:format] == "citation"
|
|
231
237
|
# The paths that exist in every published relaton-render;
|
|
232
238
|
# the gem's conventional "relaton/render" entry is newer.
|
|
233
|
-
|
|
234
|
-
|
|
239
|
+
require_relative "../render/general"
|
|
240
|
+
require_relative "../render/iso690"
|
|
235
241
|
Relaton::Render::General
|
|
236
242
|
.new(style: options[:style] || "author-date")
|
|
237
243
|
.render(item, embedded: true)
|
|
@@ -5,11 +5,11 @@ require "digest"
|
|
|
5
5
|
require "pathname"
|
|
6
6
|
require "fileutils"
|
|
7
7
|
require "liquid"
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
require_relative "frontend_assets"
|
|
9
|
+
require_relative "../index"
|
|
10
10
|
require "zip"
|
|
11
11
|
require "pubid"
|
|
12
|
-
|
|
12
|
+
require_relative "index_item_normalizer"
|
|
13
13
|
|
|
14
14
|
module Relaton
|
|
15
15
|
module Cli
|
|
@@ -288,8 +288,11 @@ module Relaton
|
|
|
288
288
|
# "#{index}.zip" without knowing the flavor's INDEXFILE.
|
|
289
289
|
"index" => @index_name,
|
|
290
290
|
# What the index actually contains, not what was scanned: rows
|
|
291
|
-
# whose id could not be resolved at all are dropped
|
|
292
|
-
|
|
291
|
+
# whose id could not be resolved at all are dropped, and an
|
|
292
|
+
# (id, file) pair a primary row already carries is collapsed
|
|
293
|
+
# (see #monolith_rows) — the count is what a consumer fetching
|
|
294
|
+
# "#{index}.zip" gets.
|
|
295
|
+
"count" => monolith_rows.size,
|
|
293
296
|
"shards" => shard_count,
|
|
294
297
|
"key" => key_strategy,
|
|
295
298
|
"algorithm" => "crc32",
|
|
@@ -304,6 +307,31 @@ module Relaton
|
|
|
304
307
|
{ "r" => row.rendered, "file" => row.file, "id" => row.id_hash }
|
|
305
308
|
end
|
|
306
309
|
|
|
310
|
+
# The rows the monolith carries: indexed_rows with redundant
|
|
311
|
+
# (id, file) pairs collapsed. A derived row whose (id, file) a
|
|
312
|
+
# primary row already carries is the same document in the same file
|
|
313
|
+
# under another spelling — the parse's canonical render beside the
|
|
314
|
+
# docid as written (the IHO faces where the record stores `P-5 2020`
|
|
315
|
+
# and pubid renders `P-5 Vol. 2020`; the 2026-11-04 relaton-data-iho
|
|
316
|
+
# deploy published 142 of those pairs, and the monolith consumer's
|
|
317
|
+
# key table rejected the flavor wholesale). The site keeps such rows
|
|
318
|
+
# — searching the canonical spelling should find the document — but
|
|
319
|
+
# the monolith that Relaton::Index consumers read is {id:, file:}
|
|
320
|
+
# only, so a second copy is a pure duplicate. First in
|
|
321
|
+
# indexed_rows' (key, rendered) order wins, so the collapse stays
|
|
322
|
+
# deterministic.
|
|
323
|
+
def monolith_rows
|
|
324
|
+
@monolith_rows ||= begin
|
|
325
|
+
seen = {}
|
|
326
|
+
indexed_rows.reject do |row|
|
|
327
|
+
seen_key = [row.id_hash, row.file]
|
|
328
|
+
dup = seen[seen_key]
|
|
329
|
+
seen[seen_key] = true
|
|
330
|
+
dup
|
|
331
|
+
end
|
|
332
|
+
end
|
|
333
|
+
end
|
|
334
|
+
|
|
307
335
|
# The rows actually written, in deterministic (key, rendered) order.
|
|
308
336
|
#
|
|
309
337
|
# Carries only rows whose id resolved: the consumer
|
|
@@ -383,7 +411,7 @@ module Relaton
|
|
|
383
411
|
def write_monolith(path)
|
|
384
412
|
File.open(path, "w:utf-8") do |f|
|
|
385
413
|
f << "---\n"
|
|
386
|
-
|
|
414
|
+
monolith_rows.each do |row|
|
|
387
415
|
f << "- :id:\n"
|
|
388
416
|
yaml_nested(f, row.id_hash, " ")
|
|
389
417
|
f << " :file: #{yaml_scalar(row.file)}\n"
|
|
@@ -119,8 +119,8 @@ module Relaton
|
|
|
119
119
|
if (bib = xml.at("//bibdata"))
|
|
120
120
|
bib = nokogiri_document(bib.to_xml)
|
|
121
121
|
elsif (rfc = xml.at("//rfc"))
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
require_relative "../ietf"
|
|
123
|
+
require_relative "../ietf/bibxml_parser"
|
|
124
124
|
ietf = Relaton::Ietf::BibXMLParser.parse_rfc rfc.to_xml
|
|
125
125
|
bib = nokogiri_document(ietf.to_xml(bibdata: true))
|
|
126
126
|
else
|
|
@@ -147,8 +147,8 @@ module Relaton
|
|
|
147
147
|
xml_files.flatten.reduce([]) do |mem, xml|
|
|
148
148
|
doc = nokogiri_document(xml[:content])
|
|
149
149
|
if (rfc = doc.at("/rfc"))
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
require_relative "../ietf"
|
|
151
|
+
require_relative "../ietf/bibxml_parser"
|
|
152
152
|
ietf = Relaton::Ietf::BibXMLParser.parse_rfc rfc.to_xml
|
|
153
153
|
d = nokogiri_document ietf.to_xml(bibdata: true)
|
|
154
154
|
mem << bibdata_instance(d, xml[:file])
|
data/lib/relaton/cli.rb
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require "fileutils"
|
|
2
2
|
require "thor"
|
|
3
3
|
require "thor/hollaback"
|
|
4
|
-
require_relative "cli/version"
|
|
5
4
|
require_relative "cli/util"
|
|
6
5
|
require_relative "cli/command"
|
|
7
6
|
|
|
@@ -41,17 +40,8 @@ module Relaton
|
|
|
41
40
|
|
|
42
41
|
class << self
|
|
43
42
|
def version
|
|
44
|
-
|
|
45
|
-
registry = Relaton::Db::Registry.instance
|
|
46
|
-
# Every flavor now ships inside the single `relaton` gem, so they all
|
|
47
|
-
# report Relaton::VERSION rather than a separate gem version.
|
|
48
|
-
puts "CLI => #{Relaton::Cli::VERSION}"
|
|
43
|
+
# One gem, one version.
|
|
49
44
|
puts "relaton => #{Relaton::VERSION}"
|
|
50
|
-
puts "relaton-bib => #{Relaton::VERSION}"
|
|
51
|
-
registry.processors.each_key do |k|
|
|
52
|
-
name = k.to_s.sub("_", "-")
|
|
53
|
-
puts "#{name} => #{Relaton::VERSION}"
|
|
54
|
-
end
|
|
55
45
|
end
|
|
56
46
|
|
|
57
47
|
def start(arguments)
|
|
@@ -69,7 +69,7 @@ module Relaton
|
|
|
69
69
|
pubid_class&.parse(ref)
|
|
70
70
|
rescue ArgumentError, ::Pubid::Errors::Error
|
|
71
71
|
# relaton-bib carries the log facade; core specs load without it.
|
|
72
|
-
|
|
72
|
+
require_relative "../bib"
|
|
73
73
|
Relaton::Bib::Util.info "does not parse as this flavor's pubid; " \
|
|
74
74
|
"passing the reference to the flavor as " \
|
|
75
75
|
"written", "relaton-db", key: ref
|
data/lib/relaton/core.rb
CHANGED
data/lib/relaton/db/registry.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Relaton
|
|
|
13
13
|
relaton/oasis relaton/doi relaton/jis relaton/xsf
|
|
14
14
|
relaton/ccsds relaton/etsi relaton/isbn relaton/plateau
|
|
15
15
|
relaton/oiml relaton/jcgm relaton/easc relaton/gost relaton/adobe
|
|
16
|
-
relaton/iala relaton/evs
|
|
16
|
+
relaton/iala relaton/evs relaton/sae
|
|
17
17
|
].freeze
|
|
18
18
|
|
|
19
19
|
include Singleton
|
data/lib/relaton/db.rb
CHANGED
data/lib/relaton/doi/parser.rb
CHANGED
|
@@ -731,7 +731,8 @@ module Relaton
|
|
|
731
731
|
#
|
|
732
732
|
def parse_relation # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
|
733
733
|
rels = included_in_relation
|
|
734
|
-
|
|
734
|
+
# Crossref leaves the key out of some records (SAE standards).
|
|
735
|
+
(@src["relation"] || {}).each_with_object(rels) do |(k, v), a|
|
|
735
736
|
type, desc = relation_type k
|
|
736
737
|
Array(v).each do |r|
|
|
737
738
|
rel_item = Crossref.get_by_id r["id"]
|
data/lib/relaton/doi.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
require_relative "bipm"
|
|
4
|
+
require_relative "ietf"
|
|
5
|
+
require_relative "ieee"
|
|
6
|
+
require_relative "nist"
|
|
7
7
|
require_relative "version"
|
|
8
8
|
require_relative "doi/util"
|
|
9
9
|
require_relative "doi/parser"
|
data/lib/relaton/easc.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
require_relative "bib"
|
|
4
|
+
require_relative "index"
|
|
5
|
+
require_relative "version"
|
|
6
6
|
require "pubid"
|
|
7
7
|
|
|
8
8
|
# Relaton::Easc is the EASC (Евразийский экономический совет /
|
data/lib/relaton/ecma.rb
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
# (The IANA/IHO/IALA/OGC form; spec/relaton/lazy_loading_spec.rb guards that
|
|
4
4
|
# this file is not itself loaded when a Db is built.)
|
|
5
5
|
require "pubid"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
require_relative "index"
|
|
7
|
+
require_relative "bib"
|
|
8
8
|
require_relative "version"
|
|
9
9
|
require_relative "ecma/util"
|
|
10
10
|
require_relative "ecma/item_data"
|
data/lib/relaton/etsi/item.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
require_relative "../core/processor"
|
|
2
2
|
|
|
3
3
|
module Relaton
|
|
4
4
|
module Etsi
|
|
@@ -54,7 +54,7 @@ module Relaton
|
|
|
54
54
|
# @return [String]
|
|
55
55
|
def grammar_hash
|
|
56
56
|
require "digest/md5" # not loaded by etsi.rb; needed on the cold path
|
|
57
|
-
|
|
57
|
+
require_relative "../version"
|
|
58
58
|
Digest::MD5.hexdigest Relaton::VERSION
|
|
59
59
|
end
|
|
60
60
|
|