relaton-ietf 1.0.2 → 1.0.3
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/scrapper.rb +14 -9
- 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: bfc51d85c3388e1f2d4f1b4bd530ee4c36b10f60906b742eec812f313d9ec1cf
|
4
|
+
data.tar.gz: 961323b40d233d6dd662f2f9fb98590bb39f649067d7efaf6de642a2ec3ae204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c96ccb8c67e97d5023823b6b45d6ecc2323ffc599de7f3306948d1f92e1e4840c7c9d4dbf6161248d5cf5f0c23adcefa13afb7e7065e2077e4df6573bacb09e5
|
7
|
+
data.tar.gz: 34759601e2ac3d273815cf87f54674daff30f9b1136b091e4b7af326f0a569b11370af17f9ead8f128c22b51ff070f9f9904b77fca5f16ec917c1d32a5566a32
|
@@ -204,12 +204,12 @@ module RelatonIetf
|
|
204
204
|
|
205
205
|
# @return [Array<Hash{Symbol=>RelatonBib::Organization,Symbol=>Array<String>}>]
|
206
206
|
def organizations(reference)
|
207
|
-
|
208
|
-
|
207
|
+
publisher = { entity: new_org, role: [type: "publisher"] }
|
208
|
+
reference.xpath("./seriesinfo").reduce([publisher]) do |mem, si|
|
209
|
+
next mem unless si[:stream]
|
209
210
|
|
210
|
-
|
211
|
-
|
212
|
-
end.compact
|
211
|
+
mem << { entity: new_org(si[:stream]), role: [type: "author"] }
|
212
|
+
end
|
213
213
|
end
|
214
214
|
|
215
215
|
# @param author [Nokogiri::XML::Document]
|
@@ -267,13 +267,18 @@ module RelatonIetf
|
|
267
267
|
# @return [RelatonBib::Affiliation]
|
268
268
|
def affiliation(author)
|
269
269
|
organization = author.at("./organization")
|
270
|
-
org =
|
271
|
-
|
272
|
-
|
273
|
-
|
270
|
+
org = if organization.nil? || organization&.text&.empty?
|
271
|
+
new_org
|
272
|
+
else
|
273
|
+
new_org organization.text, organization[:abbrev]
|
274
|
+
end
|
274
275
|
RelatonBib::Affiliation.new organization: org
|
275
276
|
end
|
276
277
|
|
278
|
+
def new_org(name = "Internet Engineering Task Force", abbr = "IETF")
|
279
|
+
RelatonBib::Organization.new name: name, abbreviation: abbr
|
280
|
+
end
|
281
|
+
|
277
282
|
# @param author [Nokogiri::XML::Document]
|
278
283
|
# @return [Hash]
|
279
284
|
def contributor_role(author)
|
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.0.
|
4
|
+
version: 1.0.3
|
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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|