relaton-bib 1.10.5 → 1.10.6
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_bib/bibliographic_item.rb +2 -1
- data/lib/relaton_bib/bibxml_parser.rb +10 -4
- data/lib/relaton_bib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1609d9e48b478f743233091295cf554d9799d1e0c320379eca48e929d54f1477
|
4
|
+
data.tar.gz: 13440319619354c7aba95f519fef7cd7161da5b7282d67634b205d1b2a50018d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c43da7fab499c9395b7d426798674536c75b2d86086fb1f86c386eaf745c40e3c73e8dc9e8ef17c6052863b21498f03f62fc26479f8c6f05fd19ab7ad9b606e8
|
7
|
+
data.tar.gz: 35f0e51ab71f5940d079c116655199288e382dcbb4e682589c2d3f4323b8c0784b466a45a595d9f1739ff3096260efbafe348578bcb6f67b36b8785a638e1daa
|
@@ -834,7 +834,8 @@ module RelatonBib
|
|
834
834
|
return attrs if attrs.any?
|
835
835
|
|
836
836
|
docidentifier.first&.tap do |di|
|
837
|
-
|
837
|
+
anchor = di.type == "IANA" ? di.id.split[1..-1].join(" ").upcase : di.id
|
838
|
+
return { anchor: anchor.gsub(" ", ".") }
|
838
839
|
end
|
839
840
|
end
|
840
841
|
|
@@ -2,6 +2,7 @@ module RelatonBib
|
|
2
2
|
module BibXMLParser
|
3
3
|
# SeriesInfo what should be saved as docidentifiers in the Relaton model.
|
4
4
|
SERIESINFONAMES = ["DOI"].freeze
|
5
|
+
RFCPREFIXES = %w[RFC BCP FYI STD].freeze
|
5
6
|
|
6
7
|
FLAVOR = nil
|
7
8
|
|
@@ -88,8 +89,14 @@ module RelatonBib
|
|
88
89
|
|
89
90
|
%w[anchor docName number].each do |atr|
|
90
91
|
if reference[atr]
|
92
|
+
pref, num = id_to_pref_num reference[atr]
|
93
|
+
atrid = if atr == "anchor" && RFCPREFIXES.include?(pref)
|
94
|
+
"#{pref}#{num.sub(/^-?0+/, '')}"
|
95
|
+
else
|
96
|
+
reference[atr]
|
97
|
+
end
|
91
98
|
type = pubid_type id
|
92
|
-
ret << DocumentIdentifier.new(id:
|
99
|
+
ret << DocumentIdentifier.new(id: atrid, type: type, scope: atr)
|
93
100
|
end
|
94
101
|
end
|
95
102
|
|
@@ -104,9 +111,8 @@ module RelatonBib
|
|
104
111
|
|
105
112
|
def create_docid(id, ver) # rubocop:disable Metrics/MethodLength
|
106
113
|
pref, num = id_to_pref_num(id)
|
107
|
-
if
|
108
|
-
num.sub
|
109
|
-
pid = "#{pref} #{num}"
|
114
|
+
if RFCPREFIXES.include?(pref)
|
115
|
+
pid = "#{pref} #{num.sub(/^-?0+/, '')}"
|
110
116
|
type = pubid_type id
|
111
117
|
elsif %w[I-D draft].include?(pref)
|
112
118
|
pid = "draft-#{num}"
|
data/lib/relaton_bib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.
|
4
|
+
version: 1.10.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|