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: 6ac8dc0f0b85926cf288ac03f12db9d73214dd6c
4
- data.tar.gz: 3c4ae6364a1f553290673f61bbb2eb22eaafd514
3
+ metadata.gz: 213a2639460e691a09f2ea4401809b65406ee6bb
4
+ data.tar.gz: 45d52d3946dcb23d326cae47d3c630098697d6a9
5
5
  SHA512:
6
- metadata.gz: 252283bc9042efb903196966abb512d0dca158bb879f31f7774fd0849687af7a9e0e1157d57b9d7809ad3f799c01891cecba1aa6ad1c5bf3ecb3e2abd594b51e
7
- data.tar.gz: c283ff802068b8eb57cc5a52d5a13d4dcc32997f8682c3b56eb5d1452c727dd161191dbacb169cb904e85d87438847d97e6687121ca9f562684fec3550190eda
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, payload))
53
+ raise(RemoteServiceError.new(e, uri_for_create, data))
54
54
  end
55
55
 
56
56
  def data_for_create(payload)
@@ -1,5 +1,5 @@
1
1
  module Hydra
2
2
  module RemoteIdentifier
3
- VERSION = "0.6.1"
3
+ VERSION = "0.6.2"
4
4
  end
5
5
  end
@@ -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.1
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-10-31 00:00:00.000000000 Z
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport