relaton-iso 1.14.1 → 1.14.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: da014f660a3ba5c983c0ce2ea5366b30fa66aef8aac170b399eafebe6fb9b354
4
- data.tar.gz: dabf9942fb20214707f4029dbf3f590c0a9d1c5043dda45d192bad2cfe274bc4
3
+ metadata.gz: b16b6af64ff1681bb4e985e3b5170a4d4b08b17c7f58fceff2b345f0df4b7979
4
+ data.tar.gz: 84da898090219191be786c258eca5a49613f652b12aeb99fbeef90cfed7845b4
5
5
  SHA512:
6
- metadata.gz: e43d0fe9c10d450c499b71f34a4036276d6729e86043a490423e267c74e8969c9545da9b953691f86d3de202af719f52db4d6d45538a5cea79395c1328cdec72
7
- data.tar.gz: d8429985f454f033d3c79f9c8c0bdf72d84036c4cbdc9c95be4053bf85ab3f66863690edef6dbcb7679b967712fd6d1ddf7a710898743befb8a452f169047145
6
+ metadata.gz: 57c02f05704f77701284bbde97c9172c18e0ae89d04ca47ab800037a3852939c93cb86327fa1d1b3a82c47eb134efad061d79f63b80c4189947514e518277708
7
+ data.tar.gz: 914bc1702c9c70bc3e7d4b8adfa52e70086a8a6f24726f909661e28659f7e6768b9d5378e68b50e3e5658272710d1ddd5e7a2c1aa6ac6d7be25f67af22af7cc3
@@ -42,6 +42,9 @@ module RelatonIso
42
42
  # @return [Pubid::Iso::Identifier]
43
43
  def pubid
44
44
  @pubid ||= Pubid::Iso::Identifier.parse_from_title(hit[:title])
45
+ rescue Pubid::Iso::Errors::WrongTypeError => e
46
+ warn "[relaton-iso] unable to find an identifier in \"#{hit[:title]}\"."
47
+ warn "[relaton-iso] #{e.message}"
45
48
  end
46
49
  end
47
50
  end
@@ -100,7 +100,18 @@ module RelatonIso
100
100
  query_pubid.part == pubid.part
101
101
  end
102
102
 
103
+ #
104
+ # Matches base of query_pubid and pubid.
105
+ #
106
+ # @param [Pubid::Iso::Identifier] query_pubid pubid to match
107
+ # @param [Pubid::Iso::Identifier] pubid pubid to match
108
+ # @param [Boolean] any_types_stages match with any types and stages
109
+ #
110
+ # @return [<Type>] <description>
111
+ #
103
112
  def matches_base?(query_pubid, pubid, any_types_stages: false) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics?PerceivedComplexity
113
+ return unless pubid
114
+
104
115
  query_pubid.publisher == pubid.publisher &&
105
116
  query_pubid.number == pubid.number &&
106
117
  query_pubid.copublisher == pubid.copublisher &&
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.14.1"
4
+ VERSION = "1.14.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.1
4
+ version: 1.14.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-12-05 00:00:00.000000000 Z
11
+ date: 2022-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug