pubid-core 1.12.5 → 1.12.7

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: 820f263f5eb799412cef807145783bd70c29aeb8b75615380bf963d59e085a36
4
- data.tar.gz: be7646e893635ad8a8ceb11f13ef0aca7817678e823e5994d353df8b28f9a669
3
+ metadata.gz: 482446f44487266ec6eaba1d786cdd6598e544e23abc3e278351960a615738bd
4
+ data.tar.gz: a63ac5ceead17b50205ff1e3b98f1085643ee0001b7944e62fa7bbec66cae21d
5
5
  SHA512:
6
- metadata.gz: 369026a954871677ab43d9bdf05c0426a661a769ca264ecb4d83ac2c448b8036fe6baed64ec645361c34eb85bca91a3b26281f4956cbc7aedb190730539b67e0
7
- data.tar.gz: f4b6d86709acc7c06d893cad292d8e7cb63ead59abe9cb7a289216d29e408e154751ebb75acfc2a2207564984ef3416ab276bf071e63e86e8b03d666e4961d96
6
+ metadata.gz: 39c079582f8e1ec2f8dcfa006a0c2ef4b7c3e059badbfff247d19d084d2eba7ec2b03da0001a346df19e3c852fad8af6db8d06249cabc219a05fdb3f52b41971
7
+ data.tar.gz: 05ef2151e01923b22a4882d2139b6bc283390b02ed9fc626290df82ab5188501889cfadb3d294cdfdad6b61629f6c5138f64fb584ccd3107cb4de2ff54ac4ada
@@ -80,11 +80,17 @@ module Pubid::Core
80
80
  result[:type] = type[:short]
81
81
  end
82
82
 
83
- result
83
+ result.reject { |k, v| k != :number && v.nil? }
84
84
  end
85
85
 
86
86
  def ==(other)
87
- to_h == other.to_h
87
+ if other.is_a?(String)
88
+ to_s == other
89
+ elsif other.is_a?(Identifier::Base)
90
+ to_h == other.to_h
91
+ else
92
+ raise Errors::WrongTypeError, "cannot compare with #{other.class} type"
93
+ end
88
94
  end
89
95
 
90
96
  # Render identifier using default renderer
@@ -1,5 +1,5 @@
1
1
  module Pubid
2
2
  module Core
3
- VERSION = "1.12.5".freeze
3
+ VERSION = "1.12.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.5
4
+ version: 1.12.7
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-03-28 00:00:00.000000000 Z
11
+ date: 2024-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubygems_version: 3.3.26
104
+ rubygems_version: 3.3.27
105
105
  signing_key:
106
106
  specification_version: 4
107
107
  summary: Library to generate, parse and manipulate PubID.