hydra-remote_identifier 0.6.1 → 0.6.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 213a2639460e691a09f2ea4401809b65406ee6bb
|
4
|
+
data.tar.gz: 45d52d3946dcb23d326cae47d3c630098697d6a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e8354e9d0943e2d9859a03b9a85d0c5f767bbc8d78eb4a2f17997b007456db81b5aaaf1bb34244668b47234ed75fb1dccacdac2327724c1d44bb82c27d9b239
|
7
|
+
data.tar.gz: de3ec1b0c5ebe3f2aca5c052eadf4603eacf6f7e8aef931f296b2c70f41fdd76bf22667934db37c38f86c452aa1d1c2edf90a13229836a8fee5216d89d3b1126
|
@@ -50,7 +50,7 @@ module Hydra::RemoteIdentifier
|
|
50
50
|
matched_data = /\Asuccess:(.*)(?<doi>doi:[^\|]*)(.*)\Z/.match(response.body)
|
51
51
|
matched_data[:doi].strip
|
52
52
|
rescue RestClient::Exception => e
|
53
|
-
raise(RemoteServiceError.new(e, uri_for_create,
|
53
|
+
raise(RemoteServiceError.new(e, uri_for_create, data))
|
54
54
|
end
|
55
55
|
|
56
56
|
def data_for_create(payload)
|
@@ -25,6 +25,13 @@ module Hydra::RemoteIdentifier
|
|
25
25
|
it 'should post to remote service', VCR::SpecSupport(cassette_name: 'doi-create') do
|
26
26
|
expect(subject.call(payload)).to eq(expected_doi)
|
27
27
|
end
|
28
|
+
|
29
|
+
it 'should raise RemoteServiceError when request was invalid' do
|
30
|
+
RestClient.should_receive(:post).and_raise(RestClient::Exception.new)
|
31
|
+
expect {
|
32
|
+
subject.call(payload)
|
33
|
+
}.to raise_error(RemoteServiceError)
|
34
|
+
end
|
28
35
|
end
|
29
36
|
|
30
37
|
context '.remote_uri_for' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-remote_identifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|