relaton-ietf 1.13.2 → 1.13.4
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/bibxml_parser.rb +47 -2
- data/lib/relaton_ietf/rfc_entry.rb +7 -13
- data/lib/relaton_ietf/version.rb +1 -1
- data/relaton_ietf.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db91bbb481894890a4cbeaa2be2360cdec706ed70032802445be832c563894cb
|
4
|
+
data.tar.gz: 46d9f9e438e4dbe4d42f8d12c6236c864677a56940358abf87a314987ac22579
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc5e578aa8f3669bd0a4edea2de81ec2b4413d4c35c569458bf8b30ac4f8d05e777aaf7180d4c2488041cfc8f0963e4730cb7364668e95c0f166bd81f189e84d
|
7
|
+
data.tar.gz: 64ff855b716bc70c09c3790bf7bb24fb2d208aee7ef92080d74d72e1a4425183d4ccf0d3ed33530c8a63fe41260cbac589618e82b3f0c12280dfcd4715e2f4fb
|
@@ -3,6 +3,25 @@ module RelatonIetf
|
|
3
3
|
include RelatonBib::BibXMLParser
|
4
4
|
extend BibXMLParser
|
5
5
|
|
6
|
+
FULLNAMEORG = [
|
7
|
+
"IAB", "Internet Architecture Board", "IAB and IESG", "IESG",
|
8
|
+
"IAB Advisory Committee", "Internet Engineering Steering Group",
|
9
|
+
"Network Information Center. Stanford Research Institute",
|
10
|
+
"Information Sciences Institute University of Southern California",
|
11
|
+
"International Telegraph and Telephone Consultative Committee of the International Telecommunication Union",
|
12
|
+
"National Bureau of Standards", "International Organization for Standardization",
|
13
|
+
"National Research Council", "Gateway Algorithms and Data Structures Task Force",
|
14
|
+
"National Science Foundation", "Network Technical Advisory Group",
|
15
|
+
"NetBIOS Working Group in the Defense Advanced Research Projects Agency",
|
16
|
+
"Internet Activities Board", "End-to-End Services Task Force",
|
17
|
+
"Defense Advanced Research Projects Agency", "The North American Directory Forum",
|
18
|
+
"ESCC X.500/X.400 Task Force", "ESnet Site Coordinating Comittee (ESCC)",
|
19
|
+
"Energy Sciences Network (ESnet)", "RARE WG-MSG Task Force 88",
|
20
|
+
"Internet Assigned Numbers Authority (IANA)", "Federal Networking Council",
|
21
|
+
"Audio-Video Transport Working Group", "KOI8-U Working Group",
|
22
|
+
"The Internet Society", "Sun Microsystems"
|
23
|
+
].freeze
|
24
|
+
|
6
25
|
# @param attrs [Hash]
|
7
26
|
# @return [RelatonIetf::IetfBibliographicItem]
|
8
27
|
def bib_item(**attrs)
|
@@ -24,7 +43,8 @@ module RelatonIetf
|
|
24
43
|
type = super
|
25
44
|
case type
|
26
45
|
when "BCP", "FYI", "STD", "RFC" then "RFC"
|
27
|
-
when "Internet-Draft" then type
|
46
|
+
# when "Internet-Draft" then type
|
47
|
+
when "I-D" then "Internet-Draft"
|
28
48
|
else "IETF"
|
29
49
|
end
|
30
50
|
end
|
@@ -46,7 +66,32 @@ module RelatonIetf
|
|
46
66
|
}
|
47
67
|
end
|
48
68
|
contribs + super
|
49
|
-
|
69
|
+
end
|
70
|
+
|
71
|
+
#
|
72
|
+
# Overrade RelatonBib::BibXMLParser#full_name method
|
73
|
+
#
|
74
|
+
# @param author [Nokogiri::XML::Element]
|
75
|
+
# @param reference [Nokogiri::XML::Element]
|
76
|
+
#
|
77
|
+
# @return [RelatonBib::FullName]
|
78
|
+
#
|
79
|
+
def full_name(author, reference)
|
80
|
+
lang = language reference
|
81
|
+
sname, inits = parse_surname_initials author
|
82
|
+
initials = localized_string(inits, lang)
|
83
|
+
RelatonBib::FullName.new(
|
84
|
+
completename: localized_string(author[:fullname], lang),
|
85
|
+
initials: initials, forename: forename(inits, lang),
|
86
|
+
surname: localized_string(sname, lang)
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
def parse_surname_initials(author)
|
91
|
+
regex = /(?:[A-Z]{1,2}(?:\.[\s-]?|\s))+/
|
92
|
+
surname = author[:surname] || author[:fullname].sub(regex, "").strip
|
93
|
+
inits = author[:initials] || regex.match(author[:fullname])&.to_s&.strip
|
94
|
+
[surname, inits]
|
50
95
|
end
|
51
96
|
end
|
52
97
|
end
|
@@ -157,14 +157,9 @@ module RelatonIetf
|
|
157
157
|
entity = RelatonBib::Organization.new(abbrev: n, name: "International Organization for Standardization")
|
158
158
|
when "International Organization for Standardization"
|
159
159
|
entity = RelatonBib::Organization.new(abbrev: "ISO", name: n)
|
160
|
-
# when "IAB", "IESG", "Internet Architecture Board", "IAB and IESG",
|
161
|
-
# "IAB Advisory Committee", "Internet Engineering Steering Group"
|
162
160
|
when /#{RelatonBib::BibXMLParser::FULLNAMEORG.join("|")}/
|
163
161
|
abbr = n.upcase == n ? n : n.split.reduce([]) { |a, w| w == w.upcase ? break : a << w[0] }&.join
|
164
162
|
entity = RelatonBib::Organization.new(abbrev: abbr, name: n)
|
165
|
-
desc = "BibXML author"
|
166
|
-
# when "IESG"
|
167
|
-
# entity = RelatonBib::Organization.new(abbrev: n, name: "Internet Engineering Steering Group")
|
168
163
|
when "Federal Networking Council", "Internet Activities Board",
|
169
164
|
"Defense Advanced Research Projects Agency", "National Science Foundation",
|
170
165
|
"National Research Council", "National Bureau of Standards"
|
@@ -178,14 +173,15 @@ module RelatonIetf
|
|
178
173
|
"End-to-End Services Task Force", "Network Technical Advisory Group", "Bolt Beranek",
|
179
174
|
"Newman Laboratories", "Gateway Algorithms and Data Structures Task Force",
|
180
175
|
"Network Information Center. Stanford Research Institute", "RFC Editor",
|
181
|
-
"Information Sciences Institute University of Southern California"
|
176
|
+
"Information Sciences Institute University of Southern California",
|
177
|
+
"RARE WG-MSG Task Force 88", "KOI8-U Working Group", "The Internet Society"
|
182
178
|
entity = RelatonBib::Organization.new(name: n)
|
183
179
|
when "Internet Assigned Numbers Authority (IANA)"
|
184
|
-
entity = RelatonBib::Organization.new(abbrev: "IANA", name: "Internet Assigned Numbers Authority")
|
180
|
+
entity = RelatonBib::Organization.new(abbrev: "IANA", name: "Internet Assigned Numbers Authority (IANA)")
|
185
181
|
when "ESnet Site Coordinating Comittee (ESCC)"
|
186
|
-
entity = RelatonBib::Organization.new(abbrev: "ESCC", name: "ESnet Site Coordinating Comittee")
|
182
|
+
entity = RelatonBib::Organization.new(abbrev: "ESCC", name: "ESnet Site Coordinating Comittee (ESCC)")
|
187
183
|
when "Energy Sciences Network (ESnet)"
|
188
|
-
entity = RelatonBib::Organization.new(abbrev: "ESnet", name: "Energy Sciences Network")
|
184
|
+
entity = RelatonBib::Organization.new(abbrev: "ESnet", name: "Energy Sciences Network (ESnet)")
|
189
185
|
when "International Telegraph and Telephone Consultative Committee of the International Telecommunication Union"
|
190
186
|
entity = RelatonBib::Organization.new(abbrev: "CCITT", name: n)
|
191
187
|
else
|
@@ -197,7 +193,7 @@ module RelatonIetf
|
|
197
193
|
)
|
198
194
|
entity = RelatonBib::Person.new(name: fname)
|
199
195
|
end
|
200
|
-
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib
|
196
|
+
RelatonBib::ContributionInfo.new(entity: entity, role: parse_role(contrib))
|
201
197
|
end
|
202
198
|
end
|
203
199
|
|
@@ -205,14 +201,12 @@ module RelatonIetf
|
|
205
201
|
# Parse contributors role
|
206
202
|
#
|
207
203
|
# @param [Nokogiri::XML::Node] contrib contributor
|
208
|
-
# @param [String, nil] desc contributor description
|
209
204
|
#
|
210
205
|
# @return [Array<Hash>] contributor's role
|
211
206
|
#
|
212
|
-
def parse_role(contrib
|
207
|
+
def parse_role(contrib)
|
213
208
|
type = contrib.at("./xmlns:title")&.text&.downcase || "author"
|
214
209
|
role = { type: type }
|
215
|
-
role[:description] = [desc] if desc
|
216
210
|
[role]
|
217
211
|
end
|
218
212
|
|
data/lib/relaton_ietf/version.rb
CHANGED
data/relaton_ietf.gemspec
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 1.13.
|
131
|
+
version: 1.13.10
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 1.13.
|
138
|
+
version: 1.13.10
|
139
139
|
description: "RelatonIetf: retrieve IETF Standards for bibliographic use \nusing the
|
140
140
|
BibliographicItem model.\n\nFormerly known as rfcbib.\n"
|
141
141
|
email:
|
@@ -181,7 +181,7 @@ homepage: https://github.com/metanorma/relaton-ietf
|
|
181
181
|
licenses:
|
182
182
|
- BSD-2-Clause
|
183
183
|
metadata: {}
|
184
|
-
post_install_message:
|
184
|
+
post_install_message:
|
185
185
|
rdoc_options: []
|
186
186
|
require_paths:
|
187
187
|
- lib
|
@@ -196,8 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
rubygems_version: 3.
|
200
|
-
signing_key:
|
199
|
+
rubygems_version: 3.1.6
|
200
|
+
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: 'RelatonIetf: retrieve IETF Standards for bibliographic use using the BibliographicItem
|
203
203
|
model'
|