relaton-bib 1.19.0 → 1.19.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: '078eeaee528f7e51a51015dc49723903af554087be753a244d69ebb2d1c0ac83'
4
- data.tar.gz: 1ab74dea087ac8a1a4366ed24630ca4869774cc8b8f938e275a3684e0a61ec69
3
+ metadata.gz: 20fdd20c795644afb49d384f59a61147d4161e0f10de362996a6537976bf1e2e
4
+ data.tar.gz: 1d5f51e63402f944d4fad44e1884f8661af541a3cab52b37e46d2713acbf5d57
5
5
  SHA512:
6
- metadata.gz: 62b65c967d716d9680b6e1ec1a361a3f1f2a0d48f032e793585b3630f1146a49897b2d2563c40e165bc04ceb437aeb7da70f7581945fb3f08a23563c79438e58
7
- data.tar.gz: 34f6adc6c2998fe912879615f71079963331d83eb12cbb7d7bcff9c8ce4276da73b252aa8240cc105314a2f0aff786f401c99579a50a7df0255ac87673544059
6
+ metadata.gz: e069c6c9ee0b670b354f0409993de0ded12e11515bc771b5da1b178345669b48d3328ffd13d14e30ebf5dbe56380500e7f7c1912d75482b438c0348f6b402021
7
+ data.tar.gz: ba884104669e91900dfaca9ddbfa4ac6449b0bff33c6296f6bcb71947c3455c31e725eee3baeda12974a82e9861c3546ab45556a6c98aedc9f5f2812046ff8eb
@@ -30,6 +30,12 @@ module RelatonBib
30
30
  @formatted_address = args[:formatted_address] unless args[:city] && args[:country]
31
31
  end
32
32
 
33
+ def ==(other)
34
+ street == other.street && city == other.city && state == other.state &&
35
+ country == other.country && postcode == other.postcode &&
36
+ formatted_address == other.formatted_address
37
+ end
38
+
33
39
  # @param doc [Nokogiri::XML::Document]
34
40
  def to_xml(doc) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
35
41
  doc.address do
@@ -100,6 +106,10 @@ module RelatonBib
100
106
  @value = value
101
107
  end
102
108
 
109
+ def ==(other)
110
+ type == other.type && subtype == other.subtype && value == other.value
111
+ end
112
+
103
113
  # @param builder [Nokogiri::XML::Document]
104
114
  def to_xml(builder)
105
115
  node = builder.send type, value
@@ -144,6 +154,10 @@ module RelatonBib
144
154
  @description = description
145
155
  end
146
156
 
157
+ def ==(other)
158
+ name == other.name && organization == other.organization && description == other.description
159
+ end
160
+
147
161
  # @param opts [Hash]
148
162
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
149
163
  # @option opts [String] :lang language
@@ -224,6 +238,10 @@ module RelatonBib
224
238
  @contact = contact
225
239
  end
226
240
 
241
+ def ==(other)
242
+ uri == other.uri && contact == other.contact
243
+ end
244
+
227
245
  # Returns url.
228
246
  # @return [String]
229
247
  def url
@@ -16,6 +16,10 @@ module RelatonBib
16
16
  super content, language, script
17
17
  end
18
18
 
19
+ def ==(other)
20
+ super && initial == other.initial
21
+ end
22
+
19
23
  def to_s
20
24
  content.nil? ? initial : super
21
25
  end
@@ -25,6 +25,10 @@ module RelatonBib
25
25
  super(content, language, script)
26
26
  end
27
27
 
28
+ def ==(other)
29
+ super && format == other.format
30
+ end
31
+
28
32
  # @param builder [Nokogiri::XML::Builder]
29
33
  def to_xml(builder)
30
34
  builder.parent["format"] = format if format
@@ -37,6 +37,11 @@ module RelatonBib
37
37
  @completename = args[:completename]
38
38
  end
39
39
 
40
+ def ==(other)
41
+ surname == other.surname && abbreviation == other.abbreviation && completename == other.completename &&
42
+ forename == other.forename && initials == other.initials && addition == other.addition && prefix == other.prefix
43
+ end
44
+
40
45
  # @param opts [Hash]
41
46
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
42
47
  # @option opts [String] :lang language
@@ -29,6 +29,12 @@ module RelatonBib
29
29
  @longdesc = args[:longdesc]
30
30
  end
31
31
 
32
+ def ==(other)
33
+ other.is_a?(Image) && id == other.id && src == other.src && mimetype == other.mimetype &&
34
+ filename == other.filename && width == other.width && height == other.height &&
35
+ alt == other.alt && title == other.title && longdesc == other.longdesc
36
+ end
37
+
32
38
  #
33
39
  # Converts the image object to XML format.
34
40
  #
@@ -37,6 +37,12 @@ module RelatonBib
37
37
  end
38
38
  end
39
39
 
40
+ def ==(other)
41
+ return false unless other.is_a? LocalizedString
42
+
43
+ content == other.content && language == other.language && script == other.script
44
+ end
45
+
40
46
  #
41
47
  # String representation.
42
48
  #
@@ -25,6 +25,10 @@ module RelatonBib
25
25
  @value = value
26
26
  end
27
27
 
28
+ def ==(other)
29
+ type == other.type && value == other.value
30
+ end
31
+
28
32
  # @param builder [Nokogiri::XML::Builder]
29
33
  def to_xml(builder)
30
34
  builder.identifier(value, type: type)
@@ -90,6 +94,12 @@ module RelatonBib
90
94
  @logo = args[:logo]
91
95
  end
92
96
 
97
+ def ==(other)
98
+ name == other.name && abbreviation == other.abbreviation &&
99
+ subdivision == other.subdivision && identifier == other.identifier &&
100
+ logo == other.logo && super
101
+ end
102
+
93
103
  # @param opts [Hash]
94
104
  # @option opts [Nokogiri::XML::Builder] :builder XML builder
95
105
  # @option opts [String] :lang language
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.19.0".freeze
2
+ VERSION = "1.19.1".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.19.0
4
+ version: 1.19.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: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable