deltacloud-client 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/deltacloud.rb +4 -2
- metadata +2 -2
data/lib/deltacloud.rb
CHANGED
@@ -366,10 +366,12 @@ module DeltaCloud
|
|
366
366
|
DeltaCloud::HTTPError.client_error(response.code)
|
367
367
|
else
|
368
368
|
opts = {
|
369
|
-
:driver => (xml/'backend').first[:driver],
|
370
|
-
:provider => (xml/'backend').first[:provider],
|
371
369
|
:params => (xml/'request/param').inject({}) { |r,p| r[:"#{p[:name]}"] = p.text; r }
|
372
370
|
}
|
371
|
+
if backend_node = xml.at_xpath('/error/backend')
|
372
|
+
opts[:driver] = backend_node[:driver]
|
373
|
+
opts[:provider] = backend_node[:provider]
|
374
|
+
end
|
373
375
|
backtrace = (xml/'backtrace').empty? ? nil : (xml/'backtrace').first.text.split("\n")[1..10].map { |l| l.strip }
|
374
376
|
DeltaCloud::HTTPError.server_error(xml.root[:status] || response.code,
|
375
377
|
(xml/'message').first.text, opts, backtrace)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deltacloud-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|