relaton-bib 1.20.5 → 1.20.6
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bc5e6c64aa25f0c7245308561141432ff9d68d856f065c53db7661f38fd2e90
|
4
|
+
data.tar.gz: 514edda2458f4a4478b84b86bd897c24b2f7fe79e9e05ce31a37874921f14d32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9e626d6446310ca6e2e7fb1f97f0454d725feb68ec798a2caa7785be1442892ae88832b048f76892724c92fe915a4c7f6e07b573cd0424c92dd77ad78dc302d
|
7
|
+
data.tar.gz: 9d13c7ae5c4037d5e30f5abe61fc3c2598512b4310cd6b6dcb07afc5346934c8b039e13b65cf1d17e2f7da137308b741aee28352457e2113a878d1a35f884d1e
|
@@ -233,7 +233,7 @@ module RelatonBib
|
|
233
233
|
a.is_a?(Hash) ? FormattedString.new(**a) : a
|
234
234
|
end
|
235
235
|
|
236
|
-
@copyright = args
|
236
|
+
@copyright = (args[:copyright] || []).map do |c|
|
237
237
|
c.is_a?(Hash) ? CopyrightAssociation.new(**c) : c
|
238
238
|
end
|
239
239
|
|
@@ -248,31 +248,31 @@ module RelatonBib
|
|
248
248
|
Edition.new(content: args[:edition].to_s)
|
249
249
|
when Edition then args[:edition]
|
250
250
|
end
|
251
|
-
@version = args
|
252
|
-
@biblionote = args
|
253
|
-
@language = args
|
254
|
-
@script = args
|
251
|
+
@version = args[:version] || []
|
252
|
+
@biblionote = args[:biblionote] || BiblioNoteCollection.new([])
|
253
|
+
@language = args[:language] || []
|
254
|
+
@script = args[:script] || []
|
255
255
|
@status = args[:docstatus]
|
256
256
|
@relation = DocRelationCollection.new(args[:relation] || [])
|
257
|
-
@link = args
|
257
|
+
@link = (args[:link] || []).map do |s|
|
258
258
|
case s
|
259
259
|
when Hash then TypedUri.new(**s)
|
260
260
|
when String then TypedUri.new(content: s)
|
261
261
|
else s
|
262
262
|
end
|
263
263
|
end
|
264
|
-
@series = args
|
264
|
+
@series = args[:series] || []
|
265
265
|
@medium = args[:medium]
|
266
|
-
@place = args
|
266
|
+
@place = (args[:place] || []).map do |pl|
|
267
267
|
pl.is_a?(String) ? Place.new(name: pl) : pl
|
268
268
|
end
|
269
269
|
@extent = args[:extent] || []
|
270
270
|
@size = args[:size]
|
271
|
-
@accesslocation = args
|
272
|
-
@classification = args
|
271
|
+
@accesslocation = args[:accesslocation] || []
|
272
|
+
@classification = args[:classification] || []
|
273
273
|
@validity = args[:validity]
|
274
274
|
# we should pass the fetched arg from scrappers
|
275
|
-
@fetched = args
|
275
|
+
@fetched = args[:fetched]
|
276
276
|
@keyword = (args[:keyword] || []).map do |kw|
|
277
277
|
case kw
|
278
278
|
when Hash then LocalizedString.new(kw[:content], kw[:language], kw[:script])
|
@@ -280,11 +280,11 @@ module RelatonBib
|
|
280
280
|
else kw
|
281
281
|
end
|
282
282
|
end
|
283
|
-
@license = args
|
283
|
+
@license = args[:license] || []
|
284
284
|
@doctype = args[:doctype]
|
285
285
|
@subdoctype = args[:subdoctype]
|
286
286
|
@editorialgroup = args[:editorialgroup]
|
287
|
-
@ics = args
|
287
|
+
@ics = args[:ics] || []
|
288
288
|
@structuredidentifier = args[:structuredidentifier]
|
289
289
|
end
|
290
290
|
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
@@ -23,23 +23,25 @@ module RelatonBib
|
|
23
23
|
# @param prefix [Array<RelatonBib::LocalizedString>] array of prefixes
|
24
24
|
# @param completename [RelatonBib::LocalizedString, nil] completename or surname should be present
|
25
25
|
#
|
26
|
-
def initialize(**args) # rubocop:disable Metrics/AbcSize
|
26
|
+
def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
|
27
27
|
unless args[:surname] || args[:completename]
|
28
28
|
raise ArgumentError, "Should be given :surname or :completename"
|
29
29
|
end
|
30
30
|
|
31
31
|
@surname = args[:surname]
|
32
32
|
@abbreviation = args[:abbreviation]
|
33
|
-
@forename = args
|
33
|
+
@forename = args[:forename] || []
|
34
34
|
@initials = args[:initials].is_a?(String) ? LocalizedString.new(args[:initials]) : args[:initials]
|
35
|
-
@addition = args
|
36
|
-
@prefix = args
|
35
|
+
@addition = args[:addition] || []
|
36
|
+
@prefix = args[:prefix] || []
|
37
37
|
@completename = args[:completename]
|
38
38
|
end
|
39
39
|
|
40
|
-
def ==(other)
|
41
|
-
surname == other.surname && abbreviation == other.abbreviation &&
|
42
|
-
|
40
|
+
def ==(other) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity
|
41
|
+
surname == other.surname && abbreviation == other.abbreviation &&
|
42
|
+
completename == other.completename && forename == other.forename &&
|
43
|
+
initials == other.initials && addition == other.addition &&
|
44
|
+
prefix == other.prefix
|
43
45
|
end
|
44
46
|
|
45
47
|
# @param opts [Hash]
|
@@ -75,10 +75,10 @@ module RelatonBib
|
|
75
75
|
# @param identifier [Array<RelatonBib::OrgIdentifier>]
|
76
76
|
# @param contact [Array<RelatonBib::Address, RelatonBib::Contact>]
|
77
77
|
# @param logo [RelatonBib::Image, nil]
|
78
|
-
def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
78
|
+
def initialize(**args) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/PerceivedComplexity
|
79
79
|
raise ArgumentError, "missing keyword: name" unless args[:name]
|
80
80
|
|
81
|
-
super(url: args[:url], contact: args
|
81
|
+
super(url: args[:url], contact: args[:contact] || [])
|
82
82
|
|
83
83
|
@name = if args[:name].is_a?(Array)
|
84
84
|
args[:name].map { |n| localized_string(n) }
|
@@ -90,7 +90,7 @@ module RelatonBib
|
|
90
90
|
@subdivision = (args[:subdivision] || []).map do |sd|
|
91
91
|
localized_string sd
|
92
92
|
end
|
93
|
-
@identifier = args
|
93
|
+
@identifier = args[:identifier] || []
|
94
94
|
@logo = args[:logo]
|
95
95
|
end
|
96
96
|
|
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.20.
|
4
|
+
version: 1.20.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '0'
|
194
194
|
requirements: []
|
195
|
-
rubygems_version: 3.
|
195
|
+
rubygems_version: 3.5.22
|
196
196
|
signing_key:
|
197
197
|
specification_version: 4
|
198
198
|
summary: 'RelatonBib: Ruby XMLDOC impementation.'
|