relaton-bib 1.13.11 → 1.13.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_bib/bibliographic_item.rb +2 -2
- data/lib/relaton_bib/contribution_info.rb +4 -7
- data/lib/relaton_bib/copyright_association.rb +5 -5
- data/lib/relaton_bib/forename.rb +0 -4
- data/lib/relaton_bib/organization.rb +1 -1
- data/lib/relaton_bib/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: f6ddb62c2750bc1f862980dfbe3c66e6e97db50b00550c794e1a9366265854e2
|
4
|
+
data.tar.gz: b170e48789567d8b97cb8f969a3afa6785e52ff5e0883a34f80ff09e52884cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a6125762169389c71b9c51ebc27e5a180d66281e5e634584167b3d210b129ae4771a4c624e12b4a90e4318da0278a4e6279e2926298a6026d549b69fe5b3497
|
7
|
+
data.tar.gz: 2fa41a845a293c0e8cc6ab5bd4720906b59290a700349c03a6af4d705610ddb9d4b115d8726d7de634f8421b569d8091a8e6c05530747f5f0fa79552cc56fe23
|
@@ -40,7 +40,7 @@ module RelatonBib
|
|
40
40
|
audiovisual film video broadcast software graphic_work music
|
41
41
|
patent inbook incollection inproceedings journal website
|
42
42
|
webresource dataset archival social_media alert message
|
43
|
-
conversation misc].freeze
|
43
|
+
conversation misc internal].freeze
|
44
44
|
|
45
45
|
# @return [Boolean, nil]
|
46
46
|
attr_accessor :all_parts
|
@@ -204,7 +204,7 @@ module RelatonBib
|
|
204
204
|
# @option link [String] :content
|
205
205
|
def initialize(**args)
|
206
206
|
if args[:type] && !TYPES.include?(args[:type])
|
207
|
-
warn %{[relaton-bib]
|
207
|
+
warn %{[relaton-bib] WARNING: type "#{args[:type]}" is invalid.}
|
208
208
|
end
|
209
209
|
|
210
210
|
@title = if args[:title].is_a?(TypedTitleStringCollection)
|
@@ -46,13 +46,10 @@ module RelatonBib
|
|
46
46
|
|
47
47
|
# @return [Hash, String]
|
48
48
|
def to_hash
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
elsif type
|
54
|
-
type
|
55
|
-
end
|
49
|
+
hash = {}
|
50
|
+
hash["description"] = description.map(&:to_hash) if description&.any?
|
51
|
+
hash["type"] = type if type
|
52
|
+
hash
|
56
53
|
end
|
57
54
|
|
58
55
|
# @param prefix [String]
|
@@ -6,10 +6,10 @@ module RelatonBib
|
|
6
6
|
# @return [Date]
|
7
7
|
attr_reader :from
|
8
8
|
|
9
|
-
# @return [Date,
|
9
|
+
# @return [Date, nil]
|
10
10
|
attr_reader :to
|
11
11
|
|
12
|
-
# @return [String,
|
12
|
+
# @return [String, nil]
|
13
13
|
attr_reader :scope
|
14
14
|
|
15
15
|
# @return [Array<RelatonBib::ContributionInfo>]
|
@@ -22,8 +22,8 @@ module RelatonBib
|
|
22
22
|
# @option owner [String] :abbreviation
|
23
23
|
# @option owner [String] :url
|
24
24
|
# @param from [String] date
|
25
|
-
# @param to [String,
|
26
|
-
# @param scope [String,
|
25
|
+
# @param to [String, nil] date
|
26
|
+
# @param scope [String, nil]
|
27
27
|
def initialize(owner:, from:, to: nil, scope: nil)
|
28
28
|
unless owner.any?
|
29
29
|
raise ArgumentError, "at least one owner should exist."
|
@@ -67,7 +67,7 @@ module RelatonBib
|
|
67
67
|
# @param count [Iteger] number of copyright elements
|
68
68
|
# @return [String]
|
69
69
|
def to_asciibib(prefix = "", count = 1) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
70
|
-
pref = prefix.empty? ? "copyright" : prefix
|
70
|
+
pref = prefix.empty? ? "copyright" : "#{prefix}.copyright"
|
71
71
|
out = count > 1 ? "#{pref}::\n" : ""
|
72
72
|
owner.each { |ow| out += ow.to_asciibib "#{pref}.owner", owner.size }
|
73
73
|
out += "#{pref}.from:: #{from.year}\n" if from
|
data/lib/relaton_bib/forename.rb
CHANGED
@@ -52,7 +52,7 @@ module RelatonBib
|
|
52
52
|
# @return [Array<RelatonBib::LocalizedString>]
|
53
53
|
attr_reader :name
|
54
54
|
|
55
|
-
# @return [RelatonBib::LocalizedString,
|
55
|
+
# @return [RelatonBib::LocalizedString, nil]
|
56
56
|
attr_reader :abbreviation
|
57
57
|
|
58
58
|
# @return [Array<RelatonBib::LocalizedString>]
|
data/lib/relaton_bib/version.rb
CHANGED
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.13.
|
4
|
+
version: 1.13.12
|
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-10-
|
11
|
+
date: 2022-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|