oauth2 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,7 +11,6 @@ begin
11
11
  gem.homepage = "http://github.com/intridea/oauth2"
12
12
  gem.authors = ["Michael Bleigh"]
13
13
  gem.add_dependency 'faraday', '~> 0.4.1'
14
- gem.add_dependency 'faraday-middleware'
15
14
  gem.add_dependency 'multi_json', '>= 0.0.4'
16
15
  gem.add_development_dependency "rspec", ">= 1.2.9"
17
16
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.11
1
+ 0.0.12
@@ -28,6 +28,7 @@ module OAuth2
28
28
  # <tt>:authorize_url</tt> :: Specify a full URL of the authorization endpoint.
29
29
  # <tt>:access_token_path</tt> :: Specify the path to the access token endpoint.
30
30
  # <tt>:access_token_url</tt> :: Specify the full URL of the access token endpoint.
31
+ # <tt>:parse_json</tt> :: If true, <tt>application/json</tt> responses will be automatically parsed.
31
32
  def initialize(client_id, client_secret, opts = {})
32
33
  adapter = opts.delete(:adapter)
33
34
  self.id = client_id
@@ -63,7 +64,7 @@ module OAuth2
63
64
  end
64
65
  case resp.status
65
66
  when 200...201
66
- if json? && resp.headers['Content-Type'] == 'application/json'
67
+ if json? && resp.headers['Content-Type'].include?('application/json')
67
68
  ResponseHash.new(resp)
68
69
  else
69
70
  ResponseString.new(resp)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{oauth2}
8
- s.version = "0.0.11"
8
+ s.version = "0.0.12"
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"]
@@ -59,18 +59,15 @@ Gem::Specification.new do |s|
59
59
 
60
60
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
61
  s.add_runtime_dependency(%q<faraday>, ["~> 0.4.1"])
62
- s.add_runtime_dependency(%q<faraday-middleware>, [">= 0"])
63
62
  s.add_runtime_dependency(%q<multi_json>, [">= 0.0.4"])
64
63
  s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
65
64
  else
66
65
  s.add_dependency(%q<faraday>, ["~> 0.4.1"])
67
- s.add_dependency(%q<faraday-middleware>, [">= 0"])
68
66
  s.add_dependency(%q<multi_json>, [">= 0.0.4"])
69
67
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
70
68
  end
71
69
  else
72
70
  s.add_dependency(%q<faraday>, ["~> 0.4.1"])
73
- s.add_dependency(%q<faraday-middleware>, [">= 0"])
74
71
  s.add_dependency(%q<multi_json>, [">= 0.0.4"])
75
72
  s.add_dependency(%q<rspec>, [">= 1.2.9"])
76
73
  end
@@ -8,7 +8,7 @@ describe OAuth2::Client do
8
8
  stub.get('/success') { |env| [200, {'Content-Type' => 'text/awesome'}, 'yay'] }
9
9
  stub.get('/unauthorized') { |env| [401, {}, ''] }
10
10
  stub.get('/error') { |env| [500, {}, ''] }
11
- stub.get('/json') { |env| [200, {'Content-Type' => 'application/json'}, '{"abc":"def"}']}
11
+ stub.get('/json') { |env| [200, {'Content-Type' => 'application/json; charset=utf8'}, '{"abc":"def"}']}
12
12
  end
13
13
  end
14
14
  cli
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: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 11
10
- version: 0.0.11
9
+ - 12
10
+ version: 0.0.12
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Bleigh
@@ -34,24 +34,10 @@ dependencies:
34
34
  version: 0.4.1
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: faraday-middleware
39
- prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
- version: "0"
49
- type: :runtime
50
- version_requirements: *id002
51
37
  - !ruby/object:Gem::Dependency
52
38
  name: multi_json
53
39
  prerelease: false
54
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
55
41
  none: false
56
42
  requirements:
57
43
  - - ">="
@@ -63,11 +49,11 @@ dependencies:
63
49
  - 4
64
50
  version: 0.0.4
65
51
  type: :runtime
66
- version_requirements: *id003
52
+ version_requirements: *id002
67
53
  - !ruby/object:Gem::Dependency
68
54
  name: rspec
69
55
  prerelease: false
70
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
71
57
  none: false
72
58
  requirements:
73
59
  - - ">="
@@ -79,7 +65,7 @@ dependencies:
79
65
  - 9
80
66
  version: 1.2.9
81
67
  type: :development
82
- version_requirements: *id004
68
+ version_requirements: *id003
83
69
  description: A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth gem.
84
70
  email: michael@intridea.com
85
71
  executables: []