relaton-ietf 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90fd47e0ac20635313f5f5efc2bad4dd324b926b9c97040eb101848f791ae3fe
4
- data.tar.gz: c8a3d00abf8be207d9c2b8f2cc7b2ad0d40d79b8ddfc41df6dd7d56d071a444e
3
+ metadata.gz: 59e56b55555406ba369ed0595269ebd1e4aa73879ee601c230a0d139fb2352cc
4
+ data.tar.gz: 5e6656e85479c156df800ac01d7c58f85337eaaef0b11ae9fb8124b7c8968aa9
5
5
  SHA512:
6
- metadata.gz: 53c9f971d9e2d86439ef6186641ebdf8bd1a9211b06965025e7de6b631bed72f989e3876c864f7dfbf514a72853bf10232ea9df6d1b28097057cbb3324f0291b
7
- data.tar.gz: 07a073802b7b5210efc1db3c5ea9032a666a26a49a158f06cca220ae1e6f5f4f9c30fa84dd447b430455cd58adcba9172d89433b9760a3754a4e7654d0100882
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.text.empty? ? "IETF" : organization.text,
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]) || "01",
298
- (date[:day] || "01")].compact.join "-"
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
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.0.1".freeze
3
3
  end
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.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-04-25 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase