relaton-ietf 1.13.6 → 1.13.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abf2e3b09f55866428d84a3259ef239b3c353b417b29ce7981081ff71f4814b6
|
4
|
+
data.tar.gz: ba9abf5de01ba76f23780a9bb04ab23c3260a748ba29768d3de30805eee95f30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc0010239cb7b931520dd36ec7e6486501e650fe180b2f6990caed4ba3a691f57f11ea4e1100b913d950b3b09634b461fe2ab6dd95858c6a090f7e14d2a9cbed
|
7
|
+
data.tar.gz: 6423fa49cf9d50639b9ffbbefc2a919b49a00fa7a2445bb57b46fb116e44dcd4b439ed9933df25488f40ce0cfcf40a8077d47d718276babf78d4f06ccfa8d191
|
@@ -144,12 +144,12 @@ module RelatonIetf
|
|
144
144
|
#
|
145
145
|
# @return [Array<String, nil>] surname, initials, forename
|
146
146
|
#
|
147
|
-
def parse_surname_initials(fname, sname, inits)
|
147
|
+
def parse_surname_initials(fname, sname, inits) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
148
148
|
regex = /(?:(?<name>\w{3,})\s)?(?<inits>(?:[A-Z]{1,2}(?:\.[\s-]?|\s))+)?/
|
149
|
-
match = fname
|
150
|
-
surname = sname || fname
|
151
|
-
initials = inits || match[:inits]&.strip
|
152
|
-
[surname, initials, match[:name]]
|
149
|
+
match = fname&.match(regex)
|
150
|
+
surname = sname || fname&.sub(regex, "")&.strip
|
151
|
+
initials = inits || (match && match[:inits]&.strip)
|
152
|
+
[surname, initials, (match && match[:name])]
|
153
153
|
end
|
154
154
|
end
|
155
155
|
end
|
@@ -34,5 +34,16 @@ module RelatonIetf
|
|
34
34
|
opts[:date_format] ||= :short
|
35
35
|
super(**opts)
|
36
36
|
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Render date as BibXML
|
40
|
+
#
|
41
|
+
# @param [Nokogiri::XML::Builder] builder xml builder
|
42
|
+
#
|
43
|
+
# def render_date(builder)
|
44
|
+
# return if doidentifier.detect { |i| i.type == "IANA" }
|
45
|
+
|
46
|
+
# super
|
47
|
+
# end
|
37
48
|
end
|
38
49
|
end
|
@@ -149,8 +149,8 @@ module RelatonIetf
|
|
149
149
|
#
|
150
150
|
# @return [Array<RelatonBib::ContributionInfo>] document contributors
|
151
151
|
#
|
152
|
-
def parse_contributor
|
153
|
-
@doc.xpath("./xmlns:author").map do |contrib|
|
152
|
+
def parse_contributor # rubocop:disable Metrics/MethodLength
|
153
|
+
contribs = @doc.xpath("./xmlns:author").map do |contrib|
|
154
154
|
name = contrib.at("./xmlns:name").text
|
155
155
|
entity = BibXMLParser.full_name_org name
|
156
156
|
unless entity
|
@@ -159,6 +159,13 @@ module RelatonIetf
|
|
159
159
|
end
|
160
160
|
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib))
|
161
161
|
end
|
162
|
+
contribs << create_org_contrib("RFC Publisher", "publisher")
|
163
|
+
contribs << create_org_contrib("RFC Series", "authorizer")
|
164
|
+
end
|
165
|
+
|
166
|
+
def create_org_contrib(org_name, role_type)
|
167
|
+
org = RelatonBib::Organization.new name: org_name
|
168
|
+
RelatonBib::ContributionInfo.new entity: org, role: [{ type: role_type }]
|
162
169
|
end
|
163
170
|
|
164
171
|
#
|
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.13.
|
4
|
+
version: 1.13.8
|
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-
|
11
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|