relaton-iso 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_iso/iso_bibliography.rb +4 -4
- 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: 726ca28930d18170b319b15d5409f51e7954951c8a527ec22643ebab2e484002
|
4
|
+
data.tar.gz: d063fdc6390a3ace1f03569bb97b85c9e56d7b1ee8d992e809a154ddaa847939
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf93495c08d8f32b1d08e8c87b6bc8cf7175be8f2ce153862e930e48635f6e238471bd84fda2aa0877351755e973d6bb96e5f01023d23602e6b125fa1dfd333e
|
7
|
+
data.tar.gz: f007ab7035dbaaf3ff603afba1ac944a3b2f22eff1da682078db5f3272248202f4df9668c237e9e2f97b69bd49ee64a281a7a8335cbfe2d1823b5df62ad9c7d4
|
@@ -12,7 +12,7 @@ module RelatonIso
|
|
12
12
|
# @param text [String]
|
13
13
|
# @return [RelatonIso::HitCollection]
|
14
14
|
def search(text)
|
15
|
-
HitCollection.new text
|
15
|
+
HitCollection.new text.gsub(/\u2013/, "-")
|
16
16
|
rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET,
|
17
17
|
EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
|
18
18
|
Net::ProtocolError, OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
|
@@ -26,15 +26,15 @@ module RelatonIso
|
|
26
26
|
# return actual reference with year
|
27
27
|
# @return [String] Relaton XML serialisation of reference
|
28
28
|
def get(ref, year = nil, opts = {})
|
29
|
-
opts[:ref] = ref
|
29
|
+
opts[:ref] = ref.gsub(/\u2013/, "-")
|
30
30
|
|
31
31
|
%r{
|
32
32
|
^(?<code1>[^\s]+\s[^/]+) # match code
|
33
33
|
/?
|
34
34
|
(?<corr>(Amd|DAmd|(CD|WD|AWI|NP)\sAmd|Cor|CD\sCor|FDAmd|PRF\sAmd)\s\d+ # correction name
|
35
35
|
:?(\d{4})?(/Cor\s\d+:\d{4})?) # match correction year
|
36
|
-
}x =~ ref
|
37
|
-
code = code1 || ref
|
36
|
+
}x =~ opts[:ref]
|
37
|
+
code = code1 || opts[:ref]
|
38
38
|
|
39
39
|
if year.nil?
|
40
40
|
/^(?<code1>[^\s]+(\s\w+)?\s[\d-]+)(:(?<year1>\d{4}))?(?<code2>\s\w+)?/ =~ code
|
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.0.
|
4
|
+
version: 1.0.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: 2020-
|
11
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|