oauth2-client 1.1.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +0 -0
  4. data/.travis.yml +1 -1
  5. data/Gemfile +1 -11
  6. data/README.md +3 -3
  7. data/certs/tiabas-public.pem +17 -18
  8. data/examples/github_client.rb +1 -1
  9. data/examples/google_client.rb +1 -1
  10. data/examples/yammer_client.rb +1 -1
  11. data/lib/oauth2-client.rb +7 -0
  12. data/lib/{oauth2 → oauth2-client}/client.rb +8 -8
  13. data/lib/{oauth2 → oauth2-client}/connection.rb +2 -2
  14. data/lib/{oauth2 → oauth2-client}/error.rb +1 -1
  15. data/lib/oauth2-client/grant.rb +7 -0
  16. data/lib/{oauth2 → oauth2-client}/grant/authorization_code.rb +1 -1
  17. data/lib/{oauth2 → oauth2-client}/grant/base.rb +2 -2
  18. data/lib/{oauth2 → oauth2-client}/grant/client_credentials.rb +1 -1
  19. data/lib/{oauth2 → oauth2-client}/grant/device.rb +1 -1
  20. data/lib/{oauth2 → oauth2-client}/grant/implicit.rb +1 -1
  21. data/lib/{oauth2 → oauth2-client}/grant/password.rb +1 -1
  22. data/lib/{oauth2 → oauth2-client}/grant/refresh_token.rb +1 -1
  23. data/lib/{oauth2 → oauth2-client}/helper.rb +1 -1
  24. data/lib/oauth2-client/version.rb +11 -0
  25. data/oauth2-client.gemspec +13 -11
  26. data/spec/examples/github_client_spec.rb +1 -1
  27. data/spec/examples/google_client_spec.rb +4 -4
  28. data/spec/examples/yammer_client_spec.rb +1 -1
  29. data/spec/{oauth2 → oauth2-client}/client_spec.rb +12 -12
  30. data/spec/{oauth2 → oauth2-client}/connection_spec.rb +11 -11
  31. data/spec/{oauth2 → oauth2-client}/grant/authorization_code_spec.rb +4 -4
  32. data/spec/{oauth2 → oauth2-client}/grant/base_spec.rb +4 -4
  33. data/spec/{oauth2 → oauth2-client}/grant/client_credentials_spec.rb +3 -3
  34. data/spec/{oauth2 → oauth2-client}/grant/device_spec.rb +3 -3
  35. data/spec/{oauth2 → oauth2-client}/grant/implicit_spec.rb +3 -3
  36. data/spec/{oauth2 → oauth2-client}/grant/password_spec.rb +3 -3
  37. data/spec/{oauth2 → oauth2-client}/grant/refresh_token_spec.rb +3 -3
  38. data/spec/spec_helper.rb +1 -1
  39. metadata +82 -108
  40. metadata.gz.sig +0 -0
  41. data/lib/oauth2.rb +0 -7
  42. data/lib/oauth2/grant.rb +0 -7
  43. data/lib/oauth2/version.rb +0 -11
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eccb140e6aa2ee10060a0006c1873990cb7bde7c
4
+ data.tar.gz: 06ff2b440bab7949e43cb731e75cbf115ab4b781
5
+ SHA512:
6
+ metadata.gz: 5c30e02382e94a59f38a7e864f21108acc158c7d6fb759d14645ff3d06ad86cef121a82f92dd8463512e2dc2f81e4f3c40b6826bf5f9d7cbabbf696bc2c41c49
7
+ data.tar.gz: 8ce8c242d27db01638044aac6685beadfe434065a00a0b0aae9888a50f47619c972c06f238ba381198147ac4b1f4a3c3251d1429d74f7d151f96ed6238ecbd92
@@ -0,0 +1 @@
1
+ &m���<��T̎`��ay 2ex'����F��cf�}�Ϡ7��H6ѕ�1�VA�ɓ����4f��!�s1R������G�nI�h�����du�2�3D44 `���r҆�P��v�������!�/����ƨ2�����,Z�e���hW����ĸ@x��I�;��G>x������(j�ţ���--��v��?[j1��(��ViL�&���c�爑����V�Mra~�{��HU���kb
data.tar.gz.sig CHANGED
Binary file
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "1.8.7"
4
3
  - "1.9.2"
5
4
  - "1.9.3"
5
+ - "2.0.0"
6
6
 
7
7
  branches:
8
8
  only:
data/Gemfile CHANGED
@@ -1,13 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rake'
4
-
5
- group :test do
6
- gem 'json', :platforms => :ruby_18
7
- gem 'rspec', '>= 2.11'
8
- gem 'simplecov', :require => false
9
- gem 'coveralls', :require => false
10
- gem 'webmock', '>= 1.10.1'
11
- end
12
-
13
- gemspec
3
+ gemspec
data/README.md CHANGED
@@ -43,7 +43,7 @@ gem install oauth2-client
43
43
  ```ruby
44
44
  require 'oauth2'
45
45
 
46
- @client = OAuth2::Client.new('https://example.com', 's6BhdRkqt3', '4hJZY88TCBB9q8IpkeualA2lZsUhOSclkkSKw3RXuE')
46
+ @client = OAuth2Client::Client.new('https://example.com', 's6BhdRkqt3', '4hJZY88TCBB9q8IpkeualA2lZsUhOSclkkSKw3RXuE')
47
47
 
48
48
  client.authorization_code.authorization_path(:redirect_uri => 'http://localhost/oauth2/cb')
49
49
  # => "/oauth/authorize?response_type=code&client_id={client_id}&redirect_uri=http%3A%2F%2Flocalhost%2Foauth2%2Fcb"
@@ -102,7 +102,7 @@ token = client.device_code.get_token(device_auth_code)
102
102
  ```
103
103
 
104
104
  # Using a custom Http wrapper
105
- By default, oauth2-client uses a `Net::HTTP` wrapper called `OAuth2::HttpConnection`. However, if you wish to use a different HTTP library, you only
105
+ By default, oauth2-client uses a `Net::HTTP` wrapper called `OAuth2Client::HttpConnection`. However, if you wish to use a different HTTP library, you only
106
106
  need to create a wrapper around your favorite library that will respond to the `send_request` method.
107
107
 
108
108
  ```ruby
@@ -141,7 +141,7 @@ end
141
141
 
142
142
  # now you can initialize the OAuth2 client with you custom client and expect that all requests
143
143
  # will be sent using this client
144
- oauth_client = OAuth2::Client.new('example.com', client_id, client_secret, {
144
+ oauth_client = OAuth2Client::Client.new('example.com', client_id, client_secret, {
145
145
  :connection_client => TyphoeusHttpConnection,
146
146
  :connection_options => {}
147
147
  })
@@ -1,21 +1,20 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0aWFi
2
+ MIIDMjCCAhqgAwIBAgIBADANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAh0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XbQUWMDsGnB6Kk1WUBb/w3kQ9Ah
19
+ JgIHF4cG
20
+ -----END CERTIFICATE-----
@@ -1,4 +1,4 @@
1
- class GithubClient < OAuth2::Client
1
+ class GithubClient < OAuth2Client::Client
2
2
 
3
3
  def initialize(*args)
4
4
  super
@@ -1,4 +1,4 @@
1
- class GoogleClient < OAuth2::Client
1
+ class GoogleClient < OAuth2Client::Client
2
2
 
3
3
  def initialize(*args)
4
4
  super
@@ -1,4 +1,4 @@
1
- class YammerClient < OAuth2::Client
1
+ class YammerClient < OAuth2Client::Client
2
2
 
3
3
  def initialize(*args)
4
4
  super
@@ -0,0 +1,7 @@
1
+ require 'oauth2-client/version'
2
+ require 'oauth2-client/error'
3
+ require 'oauth2-client/helper'
4
+ require 'oauth2-client/grant'
5
+ require 'oauth2-client/client'
6
+ require 'oauth2-client/connection'
7
+
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  class Client
3
3
 
4
4
  attr_reader :host, :connection_options
@@ -16,7 +16,7 @@ module OAuth2
16
16
  @client_id = client_id
17
17
  @client_secret = client_secret
18
18
  @connection_options = options.fetch(:connection_options, {})
19
- @connection_client = options.fetch(:connection_client, OAuth2::HttpConnection)
19
+ @connection_client = options.fetch(:connection_client, OAuth2Client::HttpConnection)
20
20
  DEFAULTS_PATHS.keys.each do |key|
21
21
  instance_variable_set(:"@#{key}", options.fetch(key, DEFAULTS_PATHS[key]))
22
22
  end
@@ -45,27 +45,27 @@ module OAuth2
45
45
  end
46
46
 
47
47
  def implicit
48
- OAuth2::Grant::Implicit.new(self)
48
+ OAuth2Client::Grant::Implicit.new(self)
49
49
  end
50
50
 
51
51
  def authorization_code
52
- OAuth2::Grant::AuthorizationCode.new(self)
52
+ OAuth2Client::Grant::AuthorizationCode.new(self)
53
53
  end
54
54
 
55
55
  def refresh_token
56
- OAuth2::Grant::RefreshToken.new(self)
56
+ OAuth2Client::Grant::RefreshToken.new(self)
57
57
  end
58
58
 
59
59
  def client_credentials
60
- OAuth2::Grant::ClientCredentials.new(self)
60
+ OAuth2Client::Grant::ClientCredentials.new(self)
61
61
  end
62
62
 
63
63
  def password
64
- OAuth2::Grant::Password.new(self)
64
+ OAuth2Client::Grant::Password.new(self)
65
65
  end
66
66
 
67
67
  def device_code
68
- OAuth2::Grant::DeviceCode.new(self)
68
+ OAuth2Client::Grant::DeviceCode.new(self)
69
69
  end
70
70
 
71
71
  def connection
@@ -7,7 +7,7 @@ end
7
7
  require 'zlib'
8
8
  require 'addressable/uri'
9
9
 
10
- module OAuth2
10
+ module OAuth2Client
11
11
  class HttpConnection
12
12
 
13
13
  class UnhandledHTTPMethodError < StandardError; end
@@ -33,7 +33,7 @@ module OAuth2
33
33
  {
34
34
  :headers => {
35
35
  'Accept' => 'application/json',
36
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}"
36
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}"
37
37
  },
38
38
  :ssl => {:verify => true},
39
39
  :max_redirects => 5
@@ -1,3 +1,3 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  class Error < StandardError; end
3
3
  end
@@ -0,0 +1,7 @@
1
+ require 'oauth2-client/grant/base'
2
+ require 'oauth2-client/grant/implicit'
3
+ require 'oauth2-client/grant/device'
4
+ require 'oauth2-client/grant/authorization_code'
5
+ require 'oauth2-client/grant/refresh_token'
6
+ require 'oauth2-client/grant/client_credentials'
7
+ require 'oauth2-client/grant/password'
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  # Authorization Code Grant
4
4
  # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.1
@@ -1,7 +1,7 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  class Base
4
- include OAuth2::UrlHelper
4
+ include OAuth2Client::UrlHelper
5
5
 
6
6
  class InvalidAuthorizationTypeError < StandardError; end
7
7
 
@@ -1,6 +1,6 @@
1
1
  require "base64"
2
2
 
3
- module OAuth2
3
+ module OAuth2Client
4
4
  module Grant
5
5
  # Client Credentials Grant
6
6
  #
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  # Device Grant
4
4
  # @see https://developers.google.com/accounts/docs/OAuth2ForDevices
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  # Implicit Grant
4
4
  # @see http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-4.2
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  class Password < Base
4
4
 
@@ -1,4 +1,4 @@
1
- module OAuth2
1
+ module OAuth2Client
2
2
  module Grant
3
3
  class RefreshToken < Base
4
4
 
@@ -1,7 +1,7 @@
1
1
  require 'openssl'
2
2
  require 'base64'
3
3
  require 'addressable/uri'
4
- module OAuth2
4
+ module OAuth2Client
5
5
  module UrlHelper
6
6
  # convenience method to build response URI
7
7
  def build_url(uri, opts={})
@@ -0,0 +1,11 @@
1
+ module OAuth2Client
2
+ class Version
3
+ MAJOR = 2 unless defined? OAuth2Client::Version::MAJOR
4
+ MINOR = 0 unless defined? OAuth2Client::Version::MINOR
5
+ PATCH = 0 unless defined? OAuth2Client::Version::PATCH
6
+
7
+ def self.to_s
8
+ [MAJOR, MINOR, PATCH].compact.join('.')
9
+ end
10
+ end
11
+ end
@@ -1,14 +1,13 @@
1
1
  lib = File.expand_path('../lib', __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'oauth2/version'
3
+ require 'oauth2-client/version'
4
+ require 'date'
4
5
 
5
6
  Gem::Specification.new do |spec|
6
- spec.add_dependency 'bcrypt-ruby', '~> 3.0.0'
7
- spec.add_dependency 'addressable', '~> 2.3.3'
8
- spec.add_development_dependency 'bundler', '~> 1.0'
7
+
9
8
 
10
9
  spec.authors = ["Kevin Mutyaba"]
11
- spec.date = %q{2013-03-03}
10
+ spec.date = Date.today.to_s
12
11
  spec.description = "Create quick and dirty OAuth2 clients"
13
12
  spec.email = %q{tiabasnk@gmail.com}
14
13
  spec.files = `git ls-files`.split("\n")
@@ -16,17 +15,20 @@ Gem::Specification.new do |spec|
16
15
  spec.licenses = ['MIT']
17
16
  spec.name = 'oauth2-client'
18
17
  spec.require_paths = ['lib']
19
- spec.required_rubygems_version = '>= 1.3.6'
18
+ spec.required_rubygems_version = '>= 1.3'
20
19
  spec.summary = "OAuth2 client wrapper in Ruby"
21
- spec.version = OAuth2::Version
20
+ spec.version = OAuth2Client::Version
22
21
 
23
22
  spec.cert_chain = ['certs/tiabas-public.pem']
24
23
  spec.signing_key = File.expand_path("~/.gem/certs/private_key.pem") if $0 =~ /gem\z/
25
24
 
26
- spec.add_dependency 'addressable', '~> 2.3.3'
25
+ spec.add_dependency 'addressable', '~> 2.3'
26
+ spec.add_dependency 'bcrypt-ruby', '~> 3.0'
27
27
 
28
+ spec.add_development_dependency 'bundler', '~> 1.0'
28
29
  spec.add_development_dependency 'rake'
29
30
  spec.add_development_dependency 'rspec'
30
- spec.add_development_dependency 'simplecov', '>= 0.7.1'
31
- spec.add_development_dependency 'webmock', '>= 1.9.0'
32
- end
31
+ spec.add_development_dependency 'simplecov', '~> 0.7'
32
+ spec.add_development_dependency 'webmock', '~> 1.9'
33
+ spec.add_development_dependency 'coveralls', '~>0.7'
34
+ end
@@ -42,7 +42,7 @@ describe GithubClient do
42
42
  },
43
43
  :headers => {
44
44
  'Accept' => "application/json",
45
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
45
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
46
46
  'Content-Type' => "application/x-www-form-urlencoded"
47
47
  }
48
48
  )
@@ -90,7 +90,7 @@ describe GoogleClient do
90
90
  },
91
91
  :headers => {
92
92
  'Accept' => "application/json",
93
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
93
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
94
94
  'Content-Type' => "application/x-www-form-urlencoded"
95
95
  }
96
96
  )
@@ -141,7 +141,7 @@ describe GoogleClient do
141
141
  },
142
142
  :headers => {
143
143
  'Accept' => 'application/json',
144
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
144
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
145
145
  'Content-Type' => 'application/x-www-form-urlencoded'
146
146
  }
147
147
  )
@@ -162,7 +162,7 @@ describe GoogleClient do
162
162
  },
163
163
  :headers => {
164
164
  'Accept' => 'application/json',
165
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
165
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
166
166
  'Content-Type' => 'application/x-www-form-urlencoded'
167
167
  }
168
168
  )
@@ -184,7 +184,7 @@ describe GoogleClient do
184
184
  },
185
185
  :headers => {
186
186
  'Accept' => 'application/json',
187
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
187
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
188
188
  'Content-Type' => 'application/x-www-form-urlencoded'
189
189
  }
190
190
  )
@@ -60,7 +60,7 @@ describe YammerClient do
60
60
  },
61
61
  :headers => {
62
62
  'Accept' => "application/json",
63
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
63
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
64
64
  'Content-Type' => "application/x-www-form-urlencoded"
65
65
  }
66
66
  )
@@ -1,13 +1,13 @@
1
1
  require File.expand_path('../../spec_helper', __FILE__)
2
2
  require 'ostruct'
3
3
 
4
- describe OAuth2::Client do
4
+ describe OAuth2Client::Client do
5
5
 
6
6
  before :all do
7
7
  @client_id= 's6BhdRkqt3'
8
8
  @client_secret = '4hJZY88TCBB9q8IpkeualA2lZsUhOSclkkSKw3RXuE'
9
9
  @host = 'example.com'
10
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
10
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
11
11
  end
12
12
 
13
13
  subject { @client }
@@ -34,7 +34,7 @@ describe OAuth2::Client do
34
34
 
35
35
  context "with custom options" do
36
36
  subject do
37
- OAuth2::Client.new(@host, @client_id, @client_secret, {
37
+ OAuth2Client::Client.new(@host, @client_id, @client_secret, {
38
38
  :token_path => '/o/v2/token',
39
39
  :authorize_path => '/o/v2/authorize',
40
40
  :device_path => '/o/v2/device/code'
@@ -97,51 +97,51 @@ describe OAuth2::Client do
97
97
 
98
98
  describe "#implicit" do
99
99
  it "returns implicit grant object" do
100
- expect(@client.implicit).to be_instance_of(OAuth2::Grant::Implicit)
100
+ expect(@client.implicit).to be_instance_of(OAuth2Client::Grant::Implicit)
101
101
  end
102
102
  end
103
103
 
104
104
  describe "#authorization_code" do
105
105
  it "returns authorization code grant" do
106
- expect(@client.authorization_code).to be_instance_of(OAuth2::Grant::AuthorizationCode)
106
+ expect(@client.authorization_code).to be_instance_of(OAuth2Client::Grant::AuthorizationCode)
107
107
  end
108
108
  end
109
109
 
110
110
  describe "#refresh_token" do
111
111
  it "returns refresh token grant" do
112
- expect(@client.refresh_token).to be_instance_of(OAuth2::Grant::RefreshToken)
112
+ expect(@client.refresh_token).to be_instance_of(OAuth2Client::Grant::RefreshToken)
113
113
  end
114
114
  end
115
115
 
116
116
  describe "#client_credentials" do
117
117
  it "returns client credentials grant" do
118
- expect(@client.client_credentials).to be_instance_of(OAuth2::Grant::ClientCredentials)
118
+ expect(@client.client_credentials).to be_instance_of(OAuth2Client::Grant::ClientCredentials)
119
119
  end
120
120
  end
121
121
 
122
122
  describe "#password" do
123
123
  it "returns password grant" do
124
- expect(@client.password).to be_instance_of(OAuth2::Grant::Password)
124
+ expect(@client.password).to be_instance_of(OAuth2Client::Grant::Password)
125
125
  end
126
126
  end
127
127
 
128
128
  describe "" do
129
129
  it "returns device code grant" do
130
- expect(@client.device_code).to be_instance_of(OAuth2::Grant::DeviceCode)
130
+ expect(@client.device_code).to be_instance_of(OAuth2Client::Grant::DeviceCode)
131
131
  end
132
132
  end
133
133
 
134
134
 
135
135
  describe "#implicit" do
136
136
  it "returns implicit grant object" do
137
- expect(subject.implicit).to be_instance_of(OAuth2::Grant::Implicit)
137
+ expect(subject.implicit).to be_instance_of(OAuth2Client::Grant::Implicit)
138
138
  end
139
139
  end
140
140
 
141
141
  describe "#connection" do
142
142
  context "with default connection options" do
143
143
  it "returns HttpConnection" do
144
- expect(subject.send(:connection)).to be_instance_of(OAuth2::HttpConnection)
144
+ expect(subject.send(:connection)).to be_instance_of(OAuth2Client::HttpConnection)
145
145
  end
146
146
  end
147
147
 
@@ -149,7 +149,7 @@ describe OAuth2::Client do
149
149
  it "returns custom connection" do
150
150
  custom_http = Struct.new('CustomHttpClient', :url, :connection_options)
151
151
  conn_options = { :connection_client => custom_http }
152
- oauth_client = OAuth2::Client.new('example.com', @client_id, @client_secret, conn_options)
152
+ oauth_client = OAuth2Client::Client.new('example.com', @client_id, @client_secret, conn_options)
153
153
  expect(oauth_client.send(:connection)).to be_instance_of custom_http
154
154
  end
155
155
  end
@@ -1,10 +1,10 @@
1
1
  require File.expand_path('../../spec_helper', __FILE__)
2
2
  require 'ostruct'
3
3
 
4
- describe OAuth2::HttpConnection do
4
+ describe OAuth2Client::HttpConnection do
5
5
 
6
6
  subject do
7
- @conn = OAuth2::HttpConnection.new('https://example.com')
7
+ @conn = OAuth2Client::HttpConnection.new('https://example.com')
8
8
  end
9
9
 
10
10
  context "with user specified options" do
@@ -17,12 +17,12 @@ describe OAuth2::HttpConnection do
17
17
  :ssl => {:verify => false},
18
18
  :max_redirects => 2
19
19
  }
20
- @conn = OAuth2::HttpConnection.new('https://example.com', @conn_opts)
20
+ @conn = OAuth2Client::HttpConnection.new('https://example.com', @conn_opts)
21
21
  end
22
22
 
23
23
  describe "connection options" do
24
24
  it "sets user options" do
25
- OAuth2::HttpConnection.default_options.keys.each do |key|
25
+ OAuth2Client::HttpConnection.default_options.keys.each do |key|
26
26
  expect(@conn.instance_variable_get(:"@#{key}")).to eq @conn_opts[key]
27
27
  end
28
28
  end
@@ -33,7 +33,7 @@ describe OAuth2::HttpConnection do
33
33
  it "returns user_agent and response format" do
34
34
  expect(subject.default_headers).to eq ({
35
35
  "Accept" => "application/json",
36
- "User-Agent" => "OAuth2 Ruby Gem #{OAuth2::Version}"
36
+ "User-Agent" => "OAuth2 Ruby Gem #{OAuth2Client::Version}"
37
37
  })
38
38
  end
39
39
  end
@@ -47,7 +47,7 @@ describe OAuth2::HttpConnection do
47
47
  describe "#scheme" do
48
48
  context "scheme is unsupported" do
49
49
  it "raises an error" do
50
- expect { subject.scheme = 'ftp'}.to raise_error(OAuth2::HttpConnection::UnsupportedSchemeError)
50
+ expect { subject.scheme = 'ftp'}.to raise_error(OAuth2Client::HttpConnection::UnsupportedSchemeError)
51
51
  end
52
52
  end
53
53
 
@@ -158,7 +158,7 @@ describe OAuth2::HttpConnection do
158
158
 
159
159
  context "when method is not supported" do
160
160
  it "raises an error" do
161
- expect {subject.send_request(:patch, '/')}.to raise_error(OAuth2::HttpConnection::UnhandledHTTPMethodError)
161
+ expect {subject.send_request(:patch, '/')}.to raise_error(OAuth2Client::HttpConnection::UnhandledHTTPMethodError)
162
162
  end
163
163
  end
164
164
 
@@ -170,7 +170,7 @@ describe OAuth2::HttpConnection do
170
170
  :query => params,
171
171
  :header => {
172
172
  'Accept' => 'application/json',
173
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
173
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
174
174
  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3'
175
175
  }
176
176
  )
@@ -184,7 +184,7 @@ describe OAuth2::HttpConnection do
184
184
  stub_delete('/users/1').with(
185
185
  :header => {
186
186
  'Accept' => 'application/json',
187
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
187
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
188
188
  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3'
189
189
  }
190
190
  )
@@ -200,7 +200,7 @@ describe OAuth2::HttpConnection do
200
200
  :body => params,
201
201
  :header => {
202
202
  'Accept' => 'application/json',
203
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
203
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
204
204
  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
205
205
  'Content-Type' => 'application/x-www-form-urlencoded'
206
206
  }
@@ -218,7 +218,7 @@ describe OAuth2::HttpConnection do
218
218
  :body => params,
219
219
  :header => {
220
220
  'Accept' => 'application/json',
221
- 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
221
+ 'User-Agent' => "OAuth2 Ruby Gem #{OAuth2Client::Version}",
222
222
  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
223
223
  'Content-Type' => 'application/x-www-form-urlencoded'
224
224
  }
@@ -1,17 +1,17 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::AuthorizationCode do
3
+ describe OAuth2Client::Grant::AuthorizationCode do
4
4
 
5
5
  before :all do
6
6
  @host = 'https://example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
10
- OAuth2::Grant::AuthorizationCode.stub(:make_request)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
+ OAuth2Client::Grant::AuthorizationCode.stub(:make_request)
11
11
  end
12
12
 
13
13
  subject do
14
- OAuth2::Grant::AuthorizationCode.new(@client)
14
+ OAuth2Client::Grant::AuthorizationCode.new(@client)
15
15
  end
16
16
 
17
17
  describe "#authorization_params" do
@@ -1,7 +1,7 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
- require 'oauth2/helper'
2
+ require 'oauth2-client/helper'
3
3
 
4
- describe OAuth2::Grant::Base do
4
+ describe OAuth2Client::Grant::Base do
5
5
 
6
6
  before :all do
7
7
  @client = OpenStruct.new(
@@ -16,7 +16,7 @@ describe OAuth2::Grant::Base do
16
16
  end
17
17
 
18
18
  subject do
19
- OAuth2::Grant::Base.new(@client)
19
+ OAuth2Client::Grant::Base.new(@client)
20
20
  end
21
21
 
22
22
  describe "#make_request" do
@@ -31,7 +31,7 @@ describe OAuth2::Grant::Base do
31
31
  context "option is headers" do
32
32
  it "authorization credentials in headers" do
33
33
  opts = {
34
- :headers => {'Authorization' => OAuth2::UrlHelper::http_basic_encode(@client.client_id, @client.client_secret)},
34
+ :headers => {'Authorization' => OAuth2Client::UrlHelper::http_basic_encode(@client.client_id, @client.client_secret)},
35
35
  :params => {:client_id => @client.client_id}
36
36
  }
37
37
  @client.connection.should_receive(:send_request).with(:get, '/oauth2', opts)
@@ -1,16 +1,16 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::ClientCredentials do
3
+ describe OAuth2Client::Grant::ClientCredentials do
4
4
 
5
5
  before :all do
6
6
  @host = 'example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
10
  end
11
11
 
12
12
  subject do
13
- OAuth2::Grant::ClientCredentials.new(@client)
13
+ OAuth2Client::Grant::ClientCredentials.new(@client)
14
14
  end
15
15
 
16
16
  describe "#grant_type" do
@@ -1,16 +1,16 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::DeviceCode do
3
+ describe OAuth2Client::Grant::DeviceCode do
4
4
 
5
5
  before :all do
6
6
  @host = 'example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
10
  end
11
11
 
12
12
  subject do
13
- OAuth2::Grant::DeviceCode.new(@client)
13
+ OAuth2Client::Grant::DeviceCode.new(@client)
14
14
  end
15
15
 
16
16
  describe "#grant_type" do
@@ -1,16 +1,16 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::Implicit do
3
+ describe OAuth2Client::Grant::Implicit do
4
4
 
5
5
  before :all do
6
6
  @host = 'example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
10
  end
11
11
 
12
12
  subject do
13
- OAuth2::Grant::Implicit.new(@client)
13
+ OAuth2Client::Grant::Implicit.new(@client)
14
14
  end
15
15
 
16
16
  describe "#response_type" do
@@ -1,16 +1,16 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::Password do
3
+ describe OAuth2Client::Grant::Password do
4
4
 
5
5
  before :all do
6
6
  @host = 'example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
10
  end
11
11
 
12
12
  subject do
13
- OAuth2::Grant::Password.new(@client)
13
+ OAuth2Client::Grant::Password.new(@client)
14
14
  end
15
15
 
16
16
  describe "#grant_type" do
@@ -1,15 +1,15 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
- describe OAuth2::Grant::RefreshToken do
3
+ describe OAuth2Client::Grant::RefreshToken do
4
4
 
5
5
  before :all do
6
6
  @host = 'example.com'
7
7
  @client_id = 's6BhdRkqt3'
8
8
  @client_secret = 'SplxlOBeZQQYbYS6WxSbIA'
9
- @client = OAuth2::Client.new(@host, @client_id, @client_secret)
9
+ @client = OAuth2Client::Client.new(@host, @client_id, @client_secret)
10
10
  end
11
11
  subject do
12
- OAuth2::Grant::RefreshToken.new(@client)
12
+ OAuth2Client::Grant::RefreshToken.new(@client)
13
13
  end
14
14
 
15
15
  describe "#grant_type" do
@@ -9,7 +9,7 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
9
9
  ]
10
10
  SimpleCov.start
11
11
 
12
- require 'oauth2'
12
+ require 'oauth2-client'
13
13
  require 'rspec'
14
14
  require 'rspec/autorun'
15
15
  require 'webmock/rspec'
metadata CHANGED
@@ -1,81 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kevin Mutyaba
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURjRENDQWxpZ0F3SUJB
14
- Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREEvTVJFd0R3WURWUVFEREFoMGFX
15
- RmkKWVhOdWF6RVZNQk1HQ2dtU0pvbVQ4aXhrQVJrV0JXZHRZV2xzTVJNd0VR
16
- WUtDWkltaVpQeUxHUUJHUllEWTI5dApNQjRYRFRFek1ETXdNekEyTWpBeE5W
17
- b1hEVEUwTURNd016QTJNakF4TlZvd1B6RVJNQThHQTFVRUF3d0lkR2xoCllt
18
- RnpibXN4RlRBVEJnb0praWFKay9Jc1pBRVpGZ1ZuYldGcGJERVRNQkVHQ2dt
19
- U0pvbVQ4aXhrQVJrV0EyTnYKYlRDQ0FTS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aM5MDcwCQYDVR0TBAIwADAdBgNVHQ4EFgQUt6oHkpfViE/jN5InJLzl
24
+ DUxUNR8wCwYDVR0PBAQDAgSwMA0GCSqGSIb3DQEBBQUAA4IBAQBunWeru+ZC1uVt
25
+ BZj6230whZIvdvGnvcWW6JGG6JZJljYwOHHnaG+u74qE16Voh3n7rT77obp/Wrmx
26
+ HUhp4nK+j1AHpdiZman0RxMZzS2fczev9gTyAs/cmaqgVb3YXXniwvZy4P7y07iT
27
+ MIbAh4p4NK72MJrOsepD3qhOgE23o8dyFB3+RTB0U7yv3ZW1sMNDxkliqCBqcrBF
28
+ bSEMaRUpbbsivejLXgRsxP5cXYy0Wd9GNSOtQ5932HDEoo0F9nXIMZGQSLqEXz3l
29
+ B+kZ9/4dAvmKkr2NPSoxBQtO7Rz0HDNLtjMxkXbQUWMDsGnB6Kk1WUBb/w3kQ9Ah
30
+ JgIHF4cG
31
+ -----END CERTIFICATE-----
32
+ date: 2014-02-03 00:00:00.000000000 Z
42
33
  dependencies:
43
34
  - !ruby/object:Gem::Dependency
44
- name: bcrypt-ruby
35
+ name: addressable
45
36
  requirement: !ruby/object:Gem::Requirement
46
- none: false
47
37
  requirements:
48
38
  - - ~>
49
39
  - !ruby/object:Gem::Version
50
- version: 3.0.0
40
+ version: '2.3'
51
41
  type: :runtime
52
42
  prerelease: false
53
43
  version_requirements: !ruby/object:Gem::Requirement
54
- none: false
55
44
  requirements:
56
45
  - - ~>
57
46
  - !ruby/object:Gem::Version
58
- version: 3.0.0
47
+ version: '2.3'
59
48
  - !ruby/object:Gem::Dependency
60
- name: addressable
49
+ name: bcrypt-ruby
61
50
  requirement: !ruby/object:Gem::Requirement
62
- none: false
63
51
  requirements:
64
52
  - - ~>
65
53
  - !ruby/object:Gem::Version
66
- version: 2.3.3
54
+ version: '3.0'
67
55
  type: :runtime
68
56
  prerelease: false
69
57
  version_requirements: !ruby/object:Gem::Requirement
70
- none: false
71
58
  requirements:
72
59
  - - ~>
73
60
  - !ruby/object:Gem::Version
74
- version: 2.3.3
61
+ version: '3.0'
75
62
  - !ruby/object:Gem::Dependency
76
63
  name: bundler
77
64
  requirement: !ruby/object:Gem::Requirement
78
- none: false
79
65
  requirements:
80
66
  - - ~>
81
67
  - !ruby/object:Gem::Version
@@ -83,91 +69,80 @@ dependencies:
83
69
  type: :development
84
70
  prerelease: false
85
71
  version_requirements: !ruby/object:Gem::Requirement
86
- none: false
87
72
  requirements:
88
73
  - - ~>
89
74
  - !ruby/object:Gem::Version
90
75
  version: '1.0'
91
76
  - !ruby/object:Gem::Dependency
92
- name: addressable
77
+ name: rake
93
78
  requirement: !ruby/object:Gem::Requirement
94
- none: false
95
79
  requirements:
96
- - - ~>
80
+ - - '>='
97
81
  - !ruby/object:Gem::Version
98
- version: 2.3.3
99
- type: :runtime
82
+ version: '0'
83
+ type: :development
100
84
  prerelease: false
101
85
  version_requirements: !ruby/object:Gem::Requirement
102
- none: false
103
86
  requirements:
104
- - - ~>
87
+ - - '>='
105
88
  - !ruby/object:Gem::Version
106
- version: 2.3.3
89
+ version: '0'
107
90
  - !ruby/object:Gem::Dependency
108
- name: rake
91
+ name: rspec
109
92
  requirement: !ruby/object:Gem::Requirement
110
- none: false
111
93
  requirements:
112
- - - ! '>='
94
+ - - '>='
113
95
  - !ruby/object:Gem::Version
114
96
  version: '0'
115
97
  type: :development
116
98
  prerelease: false
117
99
  version_requirements: !ruby/object:Gem::Requirement
118
- none: false
119
100
  requirements:
120
- - - ! '>='
101
+ - - '>='
121
102
  - !ruby/object:Gem::Version
122
103
  version: '0'
123
104
  - !ruby/object:Gem::Dependency
124
- name: rspec
105
+ name: simplecov
125
106
  requirement: !ruby/object:Gem::Requirement
126
- none: false
127
107
  requirements:
128
- - - ! '>='
108
+ - - ~>
129
109
  - !ruby/object:Gem::Version
130
- version: '0'
110
+ version: '0.7'
131
111
  type: :development
132
112
  prerelease: false
133
113
  version_requirements: !ruby/object:Gem::Requirement
134
- none: false
135
114
  requirements:
136
- - - ! '>='
115
+ - - ~>
137
116
  - !ruby/object:Gem::Version
138
- version: '0'
117
+ version: '0.7'
139
118
  - !ruby/object:Gem::Dependency
140
- name: simplecov
119
+ name: webmock
141
120
  requirement: !ruby/object:Gem::Requirement
142
- none: false
143
121
  requirements:
144
- - - ! '>='
122
+ - - ~>
145
123
  - !ruby/object:Gem::Version
146
- version: 0.7.1
124
+ version: '1.9'
147
125
  type: :development
148
126
  prerelease: false
149
127
  version_requirements: !ruby/object:Gem::Requirement
150
- none: false
151
128
  requirements:
152
- - - ! '>='
129
+ - - ~>
153
130
  - !ruby/object:Gem::Version
154
- version: 0.7.1
131
+ version: '1.9'
155
132
  - !ruby/object:Gem::Dependency
156
- name: webmock
133
+ name: coveralls
157
134
  requirement: !ruby/object:Gem::Requirement
158
- none: false
159
135
  requirements:
160
- - - ! '>='
136
+ - - ~>
161
137
  - !ruby/object:Gem::Version
162
- version: 1.9.0
138
+ version: '0.7'
163
139
  type: :development
164
140
  prerelease: false
165
141
  version_requirements: !ruby/object:Gem::Requirement
166
- none: false
167
142
  requirements:
168
- - - ! '>='
143
+ - - ~>
169
144
  - !ruby/object:Gem::Version
170
- version: 1.9.0
145
+ version: '0.7'
171
146
  description: Create quick and dirty OAuth2 clients
172
147
  email: tiabasnk@gmail.com
173
148
  executables: []
@@ -185,58 +160,57 @@ files:
185
160
  - examples/github_client.rb
186
161
  - examples/google_client.rb
187
162
  - examples/yammer_client.rb
188
- - lib/oauth2.rb
189
- - lib/oauth2/client.rb
190
- - lib/oauth2/connection.rb
191
- - lib/oauth2/error.rb
192
- - lib/oauth2/grant.rb
193
- - lib/oauth2/grant/authorization_code.rb
194
- - lib/oauth2/grant/base.rb
195
- - lib/oauth2/grant/client_credentials.rb
196
- - lib/oauth2/grant/device.rb
197
- - lib/oauth2/grant/implicit.rb
198
- - lib/oauth2/grant/password.rb
199
- - lib/oauth2/grant/refresh_token.rb
200
- - lib/oauth2/helper.rb
201
- - lib/oauth2/version.rb
163
+ - lib/oauth2-client.rb
164
+ - lib/oauth2-client/client.rb
165
+ - lib/oauth2-client/connection.rb
166
+ - lib/oauth2-client/error.rb
167
+ - lib/oauth2-client/grant.rb
168
+ - lib/oauth2-client/grant/authorization_code.rb
169
+ - lib/oauth2-client/grant/base.rb
170
+ - lib/oauth2-client/grant/client_credentials.rb
171
+ - lib/oauth2-client/grant/device.rb
172
+ - lib/oauth2-client/grant/implicit.rb
173
+ - lib/oauth2-client/grant/password.rb
174
+ - lib/oauth2-client/grant/refresh_token.rb
175
+ - lib/oauth2-client/helper.rb
176
+ - lib/oauth2-client/version.rb
202
177
  - oauth2-client.gemspec
203
178
  - spec/examples/github_client_spec.rb
204
179
  - spec/examples/google_client_spec.rb
205
180
  - spec/examples/yammer_client_spec.rb
206
- - spec/oauth2/client_spec.rb
207
- - spec/oauth2/connection_spec.rb
208
- - spec/oauth2/grant/authorization_code_spec.rb
209
- - spec/oauth2/grant/base_spec.rb
210
- - spec/oauth2/grant/client_credentials_spec.rb
211
- - spec/oauth2/grant/device_spec.rb
212
- - spec/oauth2/grant/implicit_spec.rb
213
- - spec/oauth2/grant/password_spec.rb
214
- - spec/oauth2/grant/refresh_token_spec.rb
181
+ - spec/oauth2-client/client_spec.rb
182
+ - spec/oauth2-client/connection_spec.rb
183
+ - spec/oauth2-client/grant/authorization_code_spec.rb
184
+ - spec/oauth2-client/grant/base_spec.rb
185
+ - spec/oauth2-client/grant/client_credentials_spec.rb
186
+ - spec/oauth2-client/grant/device_spec.rb
187
+ - spec/oauth2-client/grant/implicit_spec.rb
188
+ - spec/oauth2-client/grant/password_spec.rb
189
+ - spec/oauth2-client/grant/refresh_token_spec.rb
215
190
  - spec/spec_helper.rb
216
191
  homepage: http://tiabas.github.com/oauth2-client/
217
192
  licenses:
218
193
  - MIT
194
+ metadata: {}
219
195
  post_install_message:
220
196
  rdoc_options: []
221
197
  require_paths:
222
198
  - lib
223
199
  required_ruby_version: !ruby/object:Gem::Requirement
224
- none: false
225
200
  requirements:
226
- - - ! '>='
201
+ - - '>='
227
202
  - !ruby/object:Gem::Version
228
203
  version: '0'
229
204
  required_rubygems_version: !ruby/object:Gem::Requirement
230
- none: false
231
205
  requirements:
232
- - - ! '>='
206
+ - - '>='
233
207
  - !ruby/object:Gem::Version
234
- version: 1.3.6
208
+ version: '1.3'
235
209
  requirements: []
236
210
  rubyforge_project:
237
- rubygems_version: 1.8.25
211
+ rubygems_version: 2.1.10
238
212
  signing_key:
239
- specification_version: 3
213
+ specification_version: 4
240
214
  summary: OAuth2 client wrapper in Ruby
241
215
  test_files: []
242
216
  has_rdoc:
metadata.gz.sig CHANGED
Binary file
@@ -1,7 +0,0 @@
1
- require 'oauth2/version'
2
- require 'oauth2/error'
3
- require 'oauth2/helper'
4
- require 'oauth2/grant'
5
- require 'oauth2/client'
6
- require 'oauth2/connection'
7
-
@@ -1,7 +0,0 @@
1
- require 'oauth2/grant/base'
2
- require 'oauth2/grant/implicit'
3
- require 'oauth2/grant/device'
4
- require 'oauth2/grant/authorization_code'
5
- require 'oauth2/grant/refresh_token'
6
- require 'oauth2/grant/client_credentials'
7
- require 'oauth2/grant/password'
@@ -1,11 +0,0 @@
1
- module OAuth2
2
- class Version
3
- MAJOR = 1 unless defined? OAuth2::Version::MAJOR
4
- MINOR = 1 unless defined? OAuth2::Version::MINOR
5
- PATCH = 3 unless defined? OAuth2::Version::PATCH
6
-
7
- def self.to_s
8
- [MAJOR, MINOR, PATCH].compact.join('.')
9
- end
10
- end
11
- end