relaton-iso 1.14.1 → 1.14.2
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 +4 -4
- data/lib/relaton_iso/hit.rb +3 -0
- data/lib/relaton_iso/iso_bibliography.rb +11 -0
- data/lib/relaton_iso/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: b16b6af64ff1681bb4e985e3b5170a4d4b08b17c7f58fceff2b345f0df4b7979
|
|
4
|
+
data.tar.gz: 84da898090219191be786c258eca5a49613f652b12aeb99fbeef90cfed7845b4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57c02f05704f77701284bbde97c9172c18e0ae89d04ca47ab800037a3852939c93cb86327fa1d1b3a82c47eb134efad061d79f63b80c4189947514e518277708
|
|
7
|
+
data.tar.gz: 914bc1702c9c70bc3e7d4b8adfa52e70086a8a6f24726f909661e28659f7e6768b9d5378e68b50e3e5658272710d1ddd5e7a2c1aa6ac6d7be25f67af22af7cc3
|
data/lib/relaton_iso/hit.rb
CHANGED
|
@@ -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 &&
|
data/lib/relaton_iso/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2022-12-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: byebug
|