relaton-bib 1.10.1 → 1.10.2

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: 882b6680091bd4bf9ba97871af6aab74dede4be12e1e6981d5e7a9a274e65659
4
- data.tar.gz: 5ecf64a911e0cad8ca924b3fe3626b54ef60295f89f58a8e59895c415390d502
3
+ metadata.gz: 4b28d437689d9d1a6d8e354677100412885d35532b08b8fd62d67b356594ce56
4
+ data.tar.gz: 8bd4cbc416dbbb143736a0c73a0679cfaa3e219de96c12f70018b2b626571fd8
5
5
  SHA512:
6
- metadata.gz: 31ebec09d58af3173fc687dcbf8cfddb34b859110d05a11bc32ed144aefe0b8b57da36395ee002aad57802c32c3804aac33098d2d7d322ee442941567add638b
7
- data.tar.gz: 828fbafc60fb7a16b876ece52b1631870ef8fdda63dce780f6a35e30907fab3f76684e02b2991db1e0ba159a61081a5e7198d6d470f1bee529ee72c61ccab921
6
+ metadata.gz: 9ebaf2a67d28cd7fc4b2a1c06ae29af2f28f5c422c4313aaa17c067857e7171ed0af1a4173ccc0a5d7df77a8f3e7a1b8eed5e70b13f149eec5ad67af5be911ab
7
+ data.tar.gz: a0bade6608af304ec6062405df7b4e3103fd4e7411aa659294c3863d4cd8de71b1dd81ae719ac2c6cdca0feee6d4836a2c3909a76939773fb7df497901fc0cf9
@@ -338,7 +338,7 @@ module RelatonBib
338
338
  # return 1 if !mon || mon.empty?
339
339
  return mon if /^\d+$/.match? mon
340
340
 
341
- Date::MONTHNAMES.index(mon).to_s.rjust 2, "0"
341
+ Date::MONTHNAMES.index { |m| m&.include? mon }.to_s.rjust 2, "0"
342
342
  end
343
343
 
344
344
  #
@@ -42,7 +42,7 @@ module RelatonBib
42
42
  # @param locality [Array<RelatonBib::Locality, RelatonBib::LocalityStack>]
43
43
  # @param source_locality [Array<RelatonBib::SourceLocality,
44
44
  # RelatonBib::SourceLocalityStack>]
45
- def initialize(type:, description: nil, bibitem:, locality: [],
45
+ def initialize(type:, bibitem:, description: nil, locality: [],
46
46
  source_locality: [])
47
47
  type = "obsoletes" if type == "Now withdrawn"
48
48
  unless self.class::TYPES.include? type
@@ -13,8 +13,8 @@ module RelatonBib
13
13
  # @return [Array<RelatonBib::LocalizedString>]
14
14
  attr_accessor :initial
15
15
 
16
- # @return [RelatonBib::LocalizedString]
17
- attr_accessor :surname
16
+ # @return [RelatonBib::LocalizedString, nil]
17
+ attr_accessor :surname, :completename
18
18
 
19
19
  # @return [Array<RelatonBib::LocalizedString>]
20
20
  attr_accessor :addition
@@ -22,15 +22,14 @@ module RelatonBib
22
22
  # @return [Array<RelatonBib::LocalizedString>]
23
23
  attr_accessor :prefix
24
24
 
25
- # @return [RelatonBib::LocalizedString]
26
- attr_reader :completename
27
-
28
- # @param surname [RelatonBib::LocalizedString]
25
+ # @param surname [RelatonBib::LocalizedString, nil] surname or completename
26
+ # should be present
29
27
  # @param forename [Array<RelatonBib::LocalizedString>]
30
28
  # @param initial [Array<RelatonBib::LocalizedString>]
31
29
  # @param addition [Array<RelatonBib::LocalizedString>]
32
30
  # @param prefix [Array<RelatonBib::LocalizedString>]
33
- # @param completename [RelatonBib::LocalizedString]
31
+ # @param completename [RelatonBib::LocalizedString, nil] completename or
32
+ # surname should be present
34
33
  def initialize(**args)
35
34
  unless args[:surname] || args[:completename]
36
35
  raise ArgumentError, "Should be given :surname or :completename"
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.10.1".freeze
2
+ VERSION = "1.10.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.1
4
+ version: 1.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-08 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug