rack-oauth2 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/rack/oauth2/client.rb +3 -0
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -68,6 +68,9 @@ module Rack
68
68
  def handle_response
69
69
  response = yield
70
70
  JSON.parse(response.body).with_indifferent_access
71
+ rescue JSON::ParserError
72
+ # NOTE: Facebook support (They don't use JSON as token response)
73
+ Rack::Utils.parse_nested_query(response.body).with_indifferent_access
71
74
  rescue RestClient::Exception => e
72
75
  error = JSON.parse(e.http_body).with_indifferent_access
73
76
  raise Error.new(e.http_code, error)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - nov matake
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-01 00:00:00 +09:00
18
+ date: 2011-04-15 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency