relaton-ietf 1.12.4 → 1.12.5
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_ietf/rfc_entry.rb +15 -4
- data/lib/relaton_ietf/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: 0eddad3431b1f0aade4e139456c33ae9cd067eaec9dd38b64257be00e285efd7
|
|
4
|
+
data.tar.gz: 156d9d50c7964ec4167526fc1f31460134c717fbd48c4dd41b7d4bc42450c094
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab78ea185c4bf6e7be09f78a7457f36ac3f1951b46bc0b2c3c33b6465fcdee9cdad00cb69f3fc606144bba3efe2e94e765a340933d129a67dfd29aa6c8dfa14f
|
|
7
|
+
data.tar.gz: 8e5e48e4257c89edcca19c85e54d5ef2dfc8a941ebed64cd3b826f63373774d25f2ef6b9c65ae2752e36fb7efa118874be489e5ee9f6faefceae674d9919e4dd
|
|
@@ -151,8 +151,8 @@ module RelatonIetf
|
|
|
151
151
|
# @return [Array<RelatonBib::ContributionInfo>] document contributors
|
|
152
152
|
#
|
|
153
153
|
def parse_contributor # rubocop:disable Metrics/MethodLength, Metrics/AbcSize, Metrics/CyclomaticComplexity
|
|
154
|
-
@doc.xpath("./xmlns:author").map do |
|
|
155
|
-
n =
|
|
154
|
+
@doc.xpath("./xmlns:author").map do |contrib| # rubocop:disable Metrics/BlockLength
|
|
155
|
+
n = contrib.at("./xmlns:name").text
|
|
156
156
|
case n
|
|
157
157
|
when "ISO"
|
|
158
158
|
entity = RelatonBib::Organization.new(abbrev: n, name: "International Organization for Standardization")
|
|
@@ -186,17 +186,28 @@ module RelatonIetf
|
|
|
186
186
|
when "International Telegraph and Telephone Consultative Committee of the International Telecommunication Union"
|
|
187
187
|
entity = RelatonBib::Organization.new(abbrev: "CCITT", name: n)
|
|
188
188
|
else
|
|
189
|
-
# int, snm = n.split
|
|
190
189
|
/^(?:(?<int>(?:\p{Lu}+(?:-\w|\(\w\))?\.{0,2}[-\s]?)+)\s)?(?<snm>[[:alnum:]\s'-.]+)$/ =~ n
|
|
191
190
|
surname = RelatonBib::LocalizedString.new(snm, "en", "Latn")
|
|
192
191
|
name = RelatonBib::LocalizedString.new(n, "en", "Latn")
|
|
193
192
|
fname = RelatonBib::FullName.new(completename: name, initial: initials(int), surname: surname)
|
|
194
193
|
entity = RelatonBib::Person.new(name: fname)
|
|
195
194
|
end
|
|
196
|
-
RelatonBib::ContributionInfo.new(entity: entity, role:
|
|
195
|
+
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib))
|
|
197
196
|
end
|
|
198
197
|
end
|
|
199
198
|
|
|
199
|
+
#
|
|
200
|
+
# Parse contributors role
|
|
201
|
+
#
|
|
202
|
+
# @param [Nokogiri::XML::Node] contrib <description>
|
|
203
|
+
#
|
|
204
|
+
# @return [Array<Hash>] contributors role
|
|
205
|
+
#
|
|
206
|
+
def parse_role(contrib)
|
|
207
|
+
type = contrib.at("./xmlns:title")&.text&.downcase || "author"
|
|
208
|
+
[{ type: type }]
|
|
209
|
+
end
|
|
210
|
+
|
|
200
211
|
#
|
|
201
212
|
# Ctreat initials
|
|
202
213
|
#
|
data/lib/relaton_ietf/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: relaton-ietf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.12.
|
|
4
|
+
version: 1.12.5
|
|
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-07-
|
|
11
|
+
date: 2022-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: equivalent-xml
|