oauth2 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/oauth2/client.rb +6 -2
  3. data/oauth2.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
data/lib/oauth2/client.rb CHANGED
@@ -64,8 +64,12 @@ module OAuth2
64
64
  end
65
65
  case resp.status
66
66
  when 200...201
67
- if json? && resp.headers['Content-Type'].include?('application/json')
68
- ResponseHash.new(resp)
67
+ if json?
68
+ begin
69
+ ResponseHash.new(resp)
70
+ rescue StandardError => e
71
+ ResponseString.new(resp)
72
+ end
69
73
  else
70
74
  ResponseString.new(resp)
71
75
  end
data/oauth2.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{oauth2}
8
- s.version = "0.0.12"
8
+ s.version = "0.0.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Bleigh"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Bleigh