relaton 3.0.0.pre.alpha.12 → 3.0.0.pre.alpha.14
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/core/request_error.rb +7 -2
- data/lib/relaton/ieee/bibliography.rb +9 -1
- data/lib/relaton/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae960484bc725faebbbd3043130ae0353687a01e50f4577651a914c0c513990f
|
|
4
|
+
data.tar.gz: df9e3355cc6e457c2f5256f8a64320ec95e6dbfd3e212d95aa4aa45dcecba9b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd652ed9f48e612d5c1ee099c19ebc189b8d12a7081deb21852b144b9d43de9ab88b017640863a831a312ea511b9e98d7ca7f7efec19b652914ef95a3fe1c109
|
|
7
|
+
data.tar.gz: 2c95ed6c0cb7f0cbb291829667dece4df79cd566ff73cc70cfc16982a7eb4aa48513ac942542f37a1a149de8f3bc6bae6ffeab49da33351554f124b5090ea5ae
|
|
@@ -9,8 +9,13 @@ module Relaton
|
|
|
9
9
|
#
|
|
10
10
|
# The class is named `Relaton::RequestError`, not `Relaton::Core::...`: an
|
|
11
11
|
# error raised without a message uses the class name as its message, and
|
|
12
|
-
# relaton-cli prints that message.
|
|
13
|
-
|
|
12
|
+
# relaton-cli prints that message. relaton-bib also declares this name
|
|
13
|
+
# (< StandardError) and may load first: reopen instead of redefining,
|
|
14
|
+
# or the coexisting require of both gems dies on a superclass mismatch.
|
|
15
|
+
# relaton-bib also declares this name (< StandardError) and may load
|
|
16
|
+
# first; redefining it (< Error) dies on a superclass mismatch, so
|
|
17
|
+
# declare only when absent — both forms rescue as StandardError
|
|
18
|
+
class RequestError < Error; end unless defined?(Relaton::RequestError)
|
|
14
19
|
|
|
15
20
|
# `Relaton::Db` found no flavor for a reference: no flavor's pubid grammar
|
|
16
21
|
# reads it exactly, and no flavor's prefix matches it. relaton-cli rescues
|
|
@@ -23,7 +23,15 @@ module Relaton
|
|
|
23
23
|
# the string form.
|
|
24
24
|
pubid = parse_pubid ref
|
|
25
25
|
needle = pubid.to_s
|
|
26
|
-
|
|
26
|
+
# pubid's normalization moves a legacy base year into its own
|
|
27
|
+
# comma segment ("IEEE P802.16/D5, 2004/Cor. 1-2005"); the
|
|
28
|
+
# index rows carry the canonical form without it, so the
|
|
29
|
+
# block also matches with the moved year stripped
|
|
30
|
+
row = index.search(pubid) do |r|
|
|
31
|
+
id = r[:id].to_s
|
|
32
|
+
id.include?(needle) ||
|
|
33
|
+
id.include?(needle.gsub(/, (19|20)\d{2}\//, "/"))
|
|
34
|
+
end.min_by { |r| r[:id].to_s }
|
|
27
35
|
return unless row
|
|
28
36
|
|
|
29
37
|
resp = Faraday.get "#{GH_URL}#{row[:file]}"
|
data/lib/relaton/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.0.pre.alpha.
|
|
4
|
+
version: 3.0.0.pre.alpha.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -442,14 +442,14 @@ dependencies:
|
|
|
442
442
|
requirements:
|
|
443
443
|
- - "~>"
|
|
444
444
|
- !ruby/object:Gem::Version
|
|
445
|
-
version: 2.0.0.pre.alpha.
|
|
445
|
+
version: 2.0.0.pre.alpha.28
|
|
446
446
|
type: :runtime
|
|
447
447
|
prerelease: false
|
|
448
448
|
version_requirements: !ruby/object:Gem::Requirement
|
|
449
449
|
requirements:
|
|
450
450
|
- - "~>"
|
|
451
451
|
- !ruby/object:Gem::Version
|
|
452
|
-
version: 2.0.0.pre.alpha.
|
|
452
|
+
version: 2.0.0.pre.alpha.28
|
|
453
453
|
- !ruby/object:Gem::Dependency
|
|
454
454
|
name: yeptris
|
|
455
455
|
requirement: !ruby/object:Gem::Requirement
|