rocket_pants 1.5.2 → 1.5.3
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.
- data/lib/rocket_pants/client.rb +8 -1
- metadata +2 -2
data/lib/rocket_pants/client.rb
CHANGED
|
@@ -127,7 +127,14 @@ module RocketPants
|
|
|
127
127
|
raise RocketPants::Error, "The response from the server was not in a supported format."
|
|
128
128
|
elsif response.has_key?("error")
|
|
129
129
|
klass = RocketPants::Errors[response["error"]] || RocketPants::Error
|
|
130
|
-
|
|
130
|
+
|
|
131
|
+
error_messages = if response.has_key?("messages")
|
|
132
|
+
[response["messages"], response["error_description"]]
|
|
133
|
+
else
|
|
134
|
+
response["error_description"]
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
raise klass.new(*error_messages)
|
|
131
138
|
end
|
|
132
139
|
end
|
|
133
140
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rocket_pants
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.3
|
|
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: 2012-
|
|
12
|
+
date: 2012-07-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: actionpack
|