relaton-ietf 1.0.0 → 1.0.1
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 +4 -3
- 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: 59e56b55555406ba369ed0595269ebd1e4aa73879ee601c230a0d139fb2352cc
|
4
|
+
data.tar.gz: 5e6656e85479c156df800ac01d7c58f85337eaaef0b11ae9fb8124b7c8968aa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea826e6f3c4059306a334c1583c4124a98f42d84ce60181bb3d9938118df61ea0bd069cb86153d7b7bdbe889fcf91a6fe37269416c6fd4360da0f02b5537137
|
7
|
+
data.tar.gz: 66c5d9df2217ad09ad0f5568a8265bc80ee3dfdf7f5a044de5c3c414dd881dd346388aa742d76b9cd55c34acf2ce19dc5b73909056d31e8a27ef63b66bc6e9d0
|
@@ -268,7 +268,7 @@ module RelatonIetf
|
|
268
268
|
def affiliation(author)
|
269
269
|
organization = author.at("./organization")
|
270
270
|
org = RelatonBib::Organization.new(
|
271
|
-
name: organization.nil? || organization
|
271
|
+
name: organization.nil? || organization&.text&.empty? ? "IETF" : organization.text,
|
272
272
|
abbreviation: organization.nil? ? "IETF" : (organization[:abbrev] || "IETF"),
|
273
273
|
)
|
274
274
|
RelatonBib::Affiliation.new organization: org
|
@@ -281,6 +281,7 @@ module RelatonIetf
|
|
281
281
|
end
|
282
282
|
|
283
283
|
def month(mon)
|
284
|
+
return 1 if !mon || mon.empty?
|
284
285
|
return mon if /^\d+$/ =~ mon
|
285
286
|
|
286
287
|
Date::MONTHNAMES.index(mon)
|
@@ -294,8 +295,8 @@ module RelatonIetf
|
|
294
295
|
def dates(reference)
|
295
296
|
return unless (date = reference.at "./front/date")
|
296
297
|
|
297
|
-
d = [date[:year], month(date[:month])
|
298
|
-
(date[:day] ||
|
298
|
+
d = [date[:year], month(date[:month]),
|
299
|
+
(date[:day] || 1)].compact.join "-"
|
299
300
|
date = Time.parse(d).strftime "%Y-%m-%d"
|
300
301
|
[RelatonBib::BibliographicDate.new(type: "published", on: date)]
|
301
302
|
end
|
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.1
|
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-
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|