relaton-ietf 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_ietf/scrapper.rb +14 -6
- data/lib/relaton_ietf/version.rb +1 -1
- data/relaton_ietf.gemspec +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: c7c3cbbf83e978418b1b8ce37ccd498651b029af23c8917fc7dc76e7249424d3
|
4
|
+
data.tar.gz: cadfca1c00571049297c95c5ab826f27d31408db332b9d8784f97debfc56dba4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cab4dd39ba1aa43f6791e1a89e4fa373effb43dc9826af80e6e7d2ae701c6d270ea31effa7a2679a53d1240a7537a0c8c1419a809e55e950ab8de8838b0cbb32
|
7
|
+
data.tar.gz: 176c22ed17078a84e4ee7548cefc172c6924fa2470900fc8386af3736a8b5f133b991baaf709f3427eb13c9cc29094f235ca16b56b8046e186221fa677ad9b82
|
@@ -192,7 +192,8 @@ module RelatonIetf
|
|
192
192
|
|
193
193
|
# @return [Array<Hash{Symbol=>RelatonBib::Person,Symbol=>Array<String>}>]
|
194
194
|
def persons(reference)
|
195
|
-
reference.xpath("./front/author").
|
195
|
+
reference.xpath("./front/author[@surname]|./front/author[@fullname]").
|
196
|
+
map do |author|
|
196
197
|
entity = RelatonBib::Person.new(
|
197
198
|
name: full_name(author, reference),
|
198
199
|
affiliation: [affiliation(author)],
|
@@ -216,17 +217,21 @@ module RelatonIetf
|
|
216
217
|
# @param ref [Nokogiri::XML::Document]
|
217
218
|
# @return [RelatonBib::FullName]
|
218
219
|
def full_name(author, ref)
|
220
|
+
lang = language ref
|
219
221
|
RelatonBib::FullName.new(
|
220
|
-
completename: localized_string(author[:fullname],
|
221
|
-
initial: [localized_string(author[:initials],
|
222
|
-
surname:
|
222
|
+
completename: localized_string(author[:fullname], lang),
|
223
|
+
initial: [localized_string(author[:initials], lang)].compact,
|
224
|
+
surname: localized_string(author[:surname], lang),
|
223
225
|
)
|
224
226
|
end
|
225
227
|
|
226
228
|
# @param content [String]
|
229
|
+
# @param lang [String]
|
227
230
|
# @return [RelatonBib::LocalizedString]
|
228
|
-
def localized_string(content,
|
229
|
-
|
231
|
+
def localized_string(content, lang)
|
232
|
+
return unless content
|
233
|
+
|
234
|
+
RelatonBib::LocalizedString.new(content, lang)
|
230
235
|
end
|
231
236
|
|
232
237
|
# @param postal [Nokogiri::XML::Document]
|
@@ -275,6 +280,9 @@ module RelatonIetf
|
|
275
280
|
RelatonBib::Affiliation.new organization: org
|
276
281
|
end
|
277
282
|
|
283
|
+
# @param name [String]
|
284
|
+
# @param abbr [String]
|
285
|
+
# @return [RelatonBib::Organization]
|
278
286
|
def new_org(name = "Internet Engineering Task Force", abbr = "IETF")
|
279
287
|
RelatonBib::Organization.new name: name, abbreviation: abbr
|
280
288
|
end
|
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.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.0.
|
159
|
+
version: 1.0.4
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.0.
|
166
|
+
version: 1.0.4
|
167
167
|
description: "RelatonIetf: retrieve IETF Standards for bibliographic use \nusing the
|
168
168
|
BibliographicItem model.\n\nFormerly known as rfcbib.\n"
|
169
169
|
email:
|