jwagener-oauth-active-resource 0.1.6 → 0.1.7
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/VERSION.yml +1 -1
- data/lib/oauth_active_resource.rb +1 -1
- data/lib/oauth_active_resource/connection.rb +15 -3
- metadata +2 -2
data/VERSION.yml
CHANGED
@@ -11,9 +11,21 @@ module OAuthActiveResource
|
|
11
11
|
request(:get, path, build_request_headers(headers, :get))
|
12
12
|
end
|
13
13
|
|
14
|
-
# make handle_response public
|
15
|
-
def handle_response(
|
16
|
-
super(
|
14
|
+
# make handle_response public and add error message from body if possible
|
15
|
+
def handle_response(response)
|
16
|
+
return super(response)
|
17
|
+
rescue ActiveResource::ClientError => exc
|
18
|
+
begin
|
19
|
+
# ugly code to insert the error_message into response
|
20
|
+
error_message = "#{format.decode response.body}"
|
21
|
+
if not error_message.nil? or error_message == ""
|
22
|
+
exc.response.instance_eval do ||
|
23
|
+
@message = error_message
|
24
|
+
end
|
25
|
+
end
|
26
|
+
ensure
|
27
|
+
raise exc
|
28
|
+
end
|
17
29
|
end
|
18
30
|
|
19
31
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jwagener-oauth-active-resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Wagener
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-28 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|