OpenAuth2 0.0.4 → 0.0.6
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/Readme.markdown +28 -69
- data/examples/fb.rb +14 -3
- data/examples/google.rb +26 -22
- data/lib/open_auth2/client.rb +12 -10
- data/lib/open_auth2/config.rb +4 -6
- data/lib/open_auth2/provider/default.rb +9 -3
- data/lib/open_auth2/provider/facebook.rb +13 -11
- data/lib/open_auth2/provider/google.rb +6 -4
- data/lib/open_auth2/token.rb +9 -20
- data/lib/open_auth2/version.rb +1 -1
- data/open_auth2.gemspec +1 -1
- data/spec/client_spec.rb +1 -1
- data/spec/facebook/client_spec.rb +1 -1
- metadata +67 -22
data/Readme.markdown
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
# OpenAuth2 [][travis]
|
2
2
|
|
3
|
-
[travis]: http://travis-ci.org/
|
3
|
+
[travis]: http://travis-ci.org/sent-hil/OpenAuth2
|
4
4
|
|
5
5
|
OpenAuth2 is a thin OAuth2 wrapper written on top of Faraday in Ruby. The goal is a simple, well documented, easy to use interface for all your OAuth2 needs.
|
6
6
|
|
7
7
|
* This software is alpha, you're either very brave or very foolish to use this in production of rockets or anything else.
|
8
|
-
* This Readme is best viewed in [DocumentUp](http://documentup.com/senthilnambi/OpenAuth2).
|
9
8
|
|
10
9
|
## Config
|
11
10
|
|
@@ -42,11 +41,11 @@ client = OpenAuth2::Client.new do |c|
|
|
42
41
|
end
|
43
42
|
```
|
44
43
|
|
45
|
-
`Client#
|
44
|
+
`Client#connection` returns a `Faraday::Connection` object, which can be used to setup middleware.
|
46
45
|
|
47
46
|
```ruby
|
48
|
-
client.
|
49
|
-
|
47
|
+
client.connection do
|
48
|
+
response :logger
|
50
49
|
end
|
51
50
|
```
|
52
51
|
|
@@ -72,11 +71,11 @@ Access token is used to sign the request so the server can identify the client s
|
|
72
71
|
access_token = 'enter in your value'
|
73
72
|
refresh_token = 'enter in your value'
|
74
73
|
|
75
|
-
client.configure do
|
76
|
-
access_token = access_token
|
74
|
+
client.configure do |c|
|
75
|
+
c.access_token = access_token
|
77
76
|
|
78
77
|
# optional, for fb its same as above
|
79
|
-
refresh_token = refresh_token
|
78
|
+
c.refresh_token = refresh_token
|
80
79
|
end
|
81
80
|
```
|
82
81
|
|
@@ -84,11 +83,11 @@ end
|
|
84
83
|
|
85
84
|
If you don't have an access token, we'll need to ask the server for it.
|
86
85
|
|
87
|
-
`token#
|
86
|
+
`token#configure` is similar to `client#connection`.
|
88
87
|
|
89
88
|
```ruby
|
90
89
|
token = client.token
|
91
|
-
token.
|
90
|
+
token.configure do
|
92
91
|
response :logger
|
93
92
|
end
|
94
93
|
|
@@ -148,11 +147,11 @@ client.connection.run_request(:get, path, nil, nil)
|
|
148
147
|
|
149
148
|
Since various OAuth2 providers differ in their implementation, OpenAuth2 provides a simple plugin system to accomodate the differences, rather than 'one shoe fits all' approach. Facebook and Google plugins are builtin, but it is trivial to add new ones.
|
150
149
|
|
151
|
-
There are three requirements:
|
150
|
+
There are only three requirements:
|
152
151
|
|
153
152
|
1. Should be under right namespace (OpenAuth2::Provider)
|
154
|
-
1.
|
155
|
-
1.
|
153
|
+
1. Should contain #options method
|
154
|
+
1. Should contain #parse method
|
156
155
|
|
157
156
|
To use the plugin, call `Config#provider=` with name of the provider. OpenAuth2 upcases and camelizes the name and looks for the constant under OpenAuth2::Provider namespace.
|
158
157
|
|
@@ -161,22 +160,26 @@ To use the plugin, call `Config#provider=` with name of the provider. OpenAuth2
|
|
161
160
|
```ruby
|
162
161
|
module OpenAuth2
|
163
162
|
module Provider
|
164
|
-
|
163
|
+
class Default
|
165
164
|
|
166
|
-
# Provider::Base contains keys of various accepted
|
167
|
-
#
|
165
|
+
# Provider::Base contains keys of various accepted Options,
|
166
|
+
# while Provider::Default contains the default options and
|
168
167
|
# their values. You can however override them here.
|
169
168
|
#
|
170
|
-
|
171
|
-
|
172
|
-
:
|
173
|
-
:
|
174
|
-
|
169
|
+
def options
|
170
|
+
{
|
171
|
+
:response_type => 'code',
|
172
|
+
:access_token_grant_name => 'authorization_code',
|
173
|
+
:refresh_token_grant_name => 'refresh_token',
|
174
|
+
:refresh_token_name => :refresh_token,
|
175
|
+
:scope => [],
|
176
|
+
}
|
177
|
+
end
|
175
178
|
|
176
179
|
# Called after AccessToken#get and #refresh response are received
|
177
180
|
# from provider.
|
178
181
|
#
|
179
|
-
def
|
182
|
+
def parse(config, response_body)
|
180
183
|
# parse the response body
|
181
184
|
access_token = response_body.gsub('access_token=', '')
|
182
185
|
|
@@ -189,53 +192,9 @@ module OpenAuth2
|
|
189
192
|
end
|
190
193
|
```
|
191
194
|
|
192
|
-
##
|
193
|
-
|
194
|
-
```ruby
|
195
|
-
require 'open_auth2'
|
196
|
-
require 'json'
|
197
|
-
|
198
|
-
access_token = 'enter in your own value'
|
199
|
-
refresh_token = 'enter in your own value'
|
200
|
-
|
201
|
-
config = OpenAuth2::Config.new do |c|
|
202
|
-
c.provider = :google
|
203
|
-
c.access_token = access_token
|
204
|
-
c.refresh_token = refresh_token
|
205
|
-
c.scope = ['https://www.googleapis.com/auth/calendar']
|
206
|
-
c.redirect_uri = 'http://localhost:9393/google/callback'
|
207
|
-
c.path_prefix = '/calendar/v3'
|
208
|
-
end
|
195
|
+
## Examples
|
209
196
|
|
210
|
-
|
211
|
-
c.config = config
|
212
|
-
end
|
213
|
-
|
214
|
-
# get request
|
215
|
-
client.get(:path => '/users/me/calendarList')
|
216
|
-
|
217
|
-
post_url = '/calendar/v3/calendars/openauth2@gmail.com/events'
|
218
|
-
body = {
|
219
|
-
"summary" => "From OpenAuth2",
|
220
|
-
"start" => {"dateTime"=>"2012-01-20T10:00:00.000-07:00"},
|
221
|
-
"end" => {"dateTime"=>"2012-01-20T10:25:00.000-07:00"}
|
222
|
-
}
|
223
|
-
body = JSON.dump(body)
|
224
|
-
|
225
|
-
# post request
|
226
|
-
client.post(:path => post_url,
|
227
|
-
:body => body,
|
228
|
-
:content_type => content_type)
|
229
|
-
|
230
|
-
header = {"Content-Type" => "application/json"}
|
231
|
-
full_url = "#{post_url}?access_token=#{access_token}"
|
232
|
-
|
233
|
-
# post request via #run_request
|
234
|
-
client.run_request(:verb => :post,
|
235
|
-
:path => full_url,
|
236
|
-
:body => body,
|
237
|
-
:header => header)
|
238
|
-
```
|
197
|
+
See examples/ for more ... (its a surprise).
|
239
198
|
|
240
199
|
## Requirements
|
241
200
|
|
data/examples/fb.rb
CHANGED
@@ -1,9 +1,20 @@
|
|
1
1
|
require_relative '../lib/open_auth2'
|
2
2
|
|
3
|
+
ClientId = '216091171753850'
|
4
|
+
ClientSecret = '56f751bef00d6d21e858566b873ac8f8'
|
5
|
+
Code = ''
|
6
|
+
AccessToken = ''
|
7
|
+
|
3
8
|
@config = OpenAuth2::Config.new do |c|
|
4
|
-
c.provider
|
9
|
+
c.provider = :facebook
|
10
|
+
c.client_id = ClientId
|
11
|
+
c.client_secret = ClientSecret
|
12
|
+
c.code = Code
|
13
|
+
c.access_token = AccessToken
|
14
|
+
c.redirect_uri = 'http://localhost:9393/'
|
15
|
+
c.scope = ['manage_pages', 'read_insights']
|
5
16
|
end
|
6
17
|
|
7
18
|
@client = OpenAuth2::Client.new(@config)
|
8
|
-
|
9
|
-
@
|
19
|
+
@url = @client.build_code_url
|
20
|
+
@token = @client.token
|
data/examples/google.rb
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
require_relative '../lib/open_auth2'
|
2
2
|
require 'json'
|
3
3
|
|
4
|
-
ClientId =
|
5
|
-
ClientSecret =
|
4
|
+
ClientId = '948773240950.apps.googleusercontent.com'
|
5
|
+
ClientSecret = 'MTkeuqOhFTbfRbd27BcEROTl'
|
6
6
|
Code = nil
|
7
|
-
AccessToken =
|
8
|
-
RefreshToken =
|
9
|
-
PostEmail =
|
7
|
+
AccessToken = 'ya29.AHES6ZRL6dKYn5HvssNQvH15KXTc76jCd9KC6Wfsir74whQ'
|
8
|
+
RefreshToken = '1/2hTXHN9FULj7v_hVOIoyHn6BpOQS6uDOw-xllInXnTU'
|
9
|
+
PostEmail = 'senthil196@gmail.com'
|
10
10
|
|
11
11
|
@config = OpenAuth2::Config.new do |c|
|
12
12
|
c.provider = :google
|
13
13
|
c.code = Code
|
14
14
|
c.client_id = ClientId
|
15
15
|
c.client_secret = ClientSecret
|
16
|
+
c.access_token = AccessToken
|
17
|
+
c.refresh_token = RefreshToken
|
16
18
|
c.scope = ['https://www.googleapis.com/auth/calendar']
|
17
19
|
c.redirect_uri = 'http://localhost:9393/google/callback'
|
18
20
|
c.path_prefix = '/calendar/v3'
|
@@ -22,32 +24,34 @@ end
|
|
22
24
|
c.config = @config
|
23
25
|
end
|
24
26
|
|
25
|
-
|
27
|
+
#@token = @client.token
|
26
28
|
|
27
|
-
params = {:approval_prompt => 'force', :access_type => 'offline'}
|
28
|
-
|
29
|
+
#params = {:approval_prompt => 'force', :access_type => 'offline'}
|
30
|
+
#@url = @token.build_code_url(params)
|
29
31
|
|
30
32
|
# get request
|
31
33
|
@list = @client.get(:path => '/users/me/calendarList')
|
32
34
|
|
33
|
-
post_url = "/calendar/v3/calendars/#{PostEmail}/events"
|
34
|
-
body = {
|
35
|
+
@post_url = "/calendar/v3/calendars/#{PostEmail}/events"
|
36
|
+
@body = {
|
35
37
|
"summary" => "From OpenAuth2",
|
36
|
-
"start" => {"dateTime"=>"2012-
|
37
|
-
"end" => {"dateTime"=>"2012-
|
38
|
+
"start" => {"dateTime"=>"2012-10-03T10:00:00.000-07:00"},
|
39
|
+
"end" => {"dateTime"=>"2012-10-03T10:25:00.000-07:00"}
|
38
40
|
}
|
39
|
-
body = JSON.dump(body)
|
41
|
+
@body = JSON.dump(@body)
|
40
42
|
|
41
43
|
# post request
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
def make_request
|
45
|
+
@response = @client.post(:path => @post_url,
|
46
|
+
:body => @body,
|
47
|
+
:content_type => "application/json")
|
48
|
+
end
|
45
49
|
|
46
|
-
header = {"Content-Type" => "application/json"}
|
47
|
-
full_url = "#{post_url}?access_token=#{AccessToken}"
|
50
|
+
#header = {"Content-Type" => "application/json"}
|
51
|
+
#full_url = "#{post_url}?access_token=#{AccessToken}"
|
48
52
|
|
49
53
|
# post request via #run_request
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
+
#@client.run_request(:verb => :post,
|
55
|
+
#:path => full_url,
|
56
|
+
#:body => body,
|
57
|
+
#:header => header)
|
data/lib/open_auth2/client.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module OpenAuth2
|
2
2
|
|
3
|
-
#
|
3
|
+
# Makes GET/POST requests to OAuth server.
|
4
4
|
class Client
|
5
5
|
extend DelegateToConfig
|
6
6
|
include Connection
|
@@ -8,7 +8,7 @@ module OpenAuth2
|
|
8
8
|
# Use to set config.
|
9
9
|
#
|
10
10
|
# Accepts:
|
11
|
-
# config
|
11
|
+
# config - (optional) OpenAuth2::Config object.
|
12
12
|
#
|
13
13
|
# Examples:
|
14
14
|
# config = OpenAuth2::Config.new do |c|
|
@@ -45,7 +45,7 @@ module OpenAuth2
|
|
45
45
|
yield self if block_given?
|
46
46
|
end
|
47
47
|
|
48
|
-
#
|
48
|
+
# Use this to get & refresh access/refresh tokens.
|
49
49
|
#
|
50
50
|
# Returns: Token object.
|
51
51
|
#
|
@@ -61,8 +61,8 @@ module OpenAuth2
|
|
61
61
|
# client.build_code_url(:scope => 'publish_stream')
|
62
62
|
#
|
63
63
|
# Accepts:
|
64
|
-
# params
|
65
|
-
#
|
64
|
+
# params - (optional) Hash of additional config to be bundled into
|
65
|
+
# the url.
|
66
66
|
#
|
67
67
|
# Returns: String (url).
|
68
68
|
#
|
@@ -70,8 +70,8 @@ module OpenAuth2
|
|
70
70
|
token.build_code_url(params)
|
71
71
|
end
|
72
72
|
|
73
|
-
# Makes GET request to OAuth server
|
74
|
-
#
|
73
|
+
# Makes GET request to OAuth server. If access_token is available
|
74
|
+
# we pass that along to identify ourselves.
|
75
75
|
#
|
76
76
|
# Accepts:
|
77
77
|
# hash
|
@@ -97,7 +97,7 @@ module OpenAuth2
|
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
100
|
-
# Makes POST request to OAuth server
|
100
|
+
# Makes POST request to OAuth server.
|
101
101
|
#
|
102
102
|
# Accepts:
|
103
103
|
# hash
|
@@ -142,11 +142,13 @@ module OpenAuth2
|
|
142
142
|
# Examples:
|
143
143
|
# # public GET request
|
144
144
|
# path = "https://graph.facebook.com/cocacola"
|
145
|
-
# client.run_request(verb: :get, path: path, body: nil,
|
145
|
+
# client.run_request(verb: :get, path: path, body: nil,
|
146
|
+
# header: nil)
|
146
147
|
#
|
147
148
|
# # private GET request
|
148
149
|
# path = "/me/likes?access_token=..."
|
149
|
-
# client.run_request(verb: :get, path: path, body: nil,
|
150
|
+
# client.run_request(verb: :get, path: path, body: nil,
|
151
|
+
# header: nil)
|
150
152
|
#
|
151
153
|
# Returns: Faraday response object.
|
152
154
|
#
|
data/lib/open_auth2/config.rb
CHANGED
@@ -49,7 +49,7 @@ module OpenAuth2
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def parse(response_body)
|
52
|
-
@provider_const.parse(self, response_body)
|
52
|
+
@provider_const.new.parse(self, response_body)
|
53
53
|
end
|
54
54
|
|
55
55
|
private
|
@@ -69,10 +69,8 @@ module OpenAuth2
|
|
69
69
|
full_string = "OpenAuth2::Provider::#{provider_string}"
|
70
70
|
|
71
71
|
@provider_const = full_string.constantize
|
72
|
-
rescue NameError
|
73
|
-
|
74
|
-
raise UnknownProvider, "Known Providers: #{known_providers}"
|
75
|
-
end
|
72
|
+
rescue NameError
|
73
|
+
raise UnknownProvider, "Known Providers: #{known_providers}"
|
76
74
|
end
|
77
75
|
|
78
76
|
def known_providers
|
@@ -83,7 +81,7 @@ module OpenAuth2
|
|
83
81
|
end
|
84
82
|
|
85
83
|
def copy_provider_keys
|
86
|
-
@provider_const::
|
84
|
+
@provider_const::new.options.each do |key,value|
|
87
85
|
instance_variable_set("@#{key}", value)
|
88
86
|
end
|
89
87
|
end
|
@@ -5,14 +5,20 @@ module OpenAuth2
|
|
5
5
|
# #initialize. We can then choose another provider or overwrite
|
6
6
|
# them individually.
|
7
7
|
#
|
8
|
-
|
9
|
-
|
8
|
+
class Default
|
9
|
+
def options
|
10
|
+
{
|
10
11
|
:response_type => 'code',
|
11
12
|
:access_token_grant_name => 'authorization_code',
|
12
13
|
:refresh_token_grant_name => 'refresh_token',
|
13
14
|
:refresh_token_name => :refresh_token,
|
14
15
|
:scope => [],
|
15
|
-
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def parse(config, response_body)
|
20
|
+
response_body
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -1,17 +1,19 @@
|
|
1
1
|
module OpenAuth2
|
2
2
|
module Provider
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
3
|
+
class Facebook
|
4
|
+
def options
|
5
|
+
{
|
6
|
+
:authorize_url => 'https://graph.facebook.com',
|
7
|
+
:code_url => 'https://www.facebook.com',
|
8
|
+
:refresh_token_grant_name => 'fb_exchange_token',
|
9
|
+
:refresh_token_name => 'fb_exchange_token',
|
10
|
+
:authorize_path => '/dialog/oauth',
|
11
|
+
:token_path => 'oauth/access_token',
|
12
|
+
:endpoint => 'https://graph.facebook.com'
|
13
|
+
}
|
14
|
+
end
|
13
15
|
|
14
|
-
def
|
16
|
+
def parse(config, response_body)
|
15
17
|
access_token = response_body.gsub('access_token=', '')
|
16
18
|
config.access_token = access_token
|
17
19
|
config.refresh_token = access_token
|
@@ -1,16 +1,18 @@
|
|
1
1
|
module OpenAuth2
|
2
2
|
module Provider
|
3
|
-
|
4
|
-
|
3
|
+
class Google
|
4
|
+
def options
|
5
|
+
{
|
5
6
|
:authorize_url => 'https://accounts.google.com',
|
6
7
|
:code_url => 'https://accounts.google.com',
|
7
8
|
:authorize_path => '/o/oauth2/auth',
|
8
9
|
:redirect_uri => 'http://localhost:9393/google/callback',
|
9
10
|
:token_path => '/o/oauth2/token',
|
10
11
|
:endpoint => 'https://www.googleapis.com'
|
11
|
-
|
12
|
+
}
|
13
|
+
end
|
12
14
|
|
13
|
-
def
|
15
|
+
def parse(config, body)
|
14
16
|
json = JSON.parse(body)
|
15
17
|
|
16
18
|
config.access_token = json['access_token']
|
data/lib/open_auth2/token.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
module OpenAuth2
|
2
2
|
|
3
|
-
#
|
3
|
+
# Gets Access/Refresh tokens from OAuth server.
|
4
4
|
class Token
|
5
5
|
extend DelegateToConfig
|
6
6
|
include Connection
|
7
7
|
|
8
|
-
# Called internally from Client#token only.
|
9
8
|
def initialize(config)
|
10
9
|
@config = config
|
11
10
|
@faraday_url = authorize_url
|
@@ -22,7 +21,7 @@ module OpenAuth2
|
|
22
21
|
# token.build_code_url(:scope => 'publish_stream')
|
23
22
|
#
|
24
23
|
# Accepts:
|
25
|
-
# params
|
24
|
+
# params - (optional) Hash of additional config.
|
26
25
|
#
|
27
26
|
# Returns: String (url).
|
28
27
|
#
|
@@ -30,21 +29,15 @@ module OpenAuth2
|
|
30
29
|
url = URI::HTTPS.build(:host => host,
|
31
30
|
:path => authorize_path,
|
32
31
|
:query => encoded_body(params))
|
33
|
-
|
34
32
|
url.to_s
|
35
33
|
end
|
36
34
|
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
# We ask @config since the format of response differs between
|
41
|
-
# OAuth servers widely.
|
35
|
+
# Makes request to OAuth server for access token & parses it by
|
36
|
+
# delegating to the appropriate provider.
|
42
37
|
#
|
43
38
|
# Accepts:
|
44
|
-
# params
|
45
|
-
#
|
46
|
-
#
|
47
|
-
# Returns: ?.
|
39
|
+
# params - (optional) Hash of additional config to be sent with
|
40
|
+
# request.
|
48
41
|
#
|
49
42
|
def get(params={})
|
50
43
|
body = get_body_hash(params)
|
@@ -53,14 +46,11 @@ module OpenAuth2
|
|
53
46
|
parse(raw_request)
|
54
47
|
end
|
55
48
|
|
56
|
-
#
|
57
|
-
# ask @config to parse it.
|
49
|
+
# Makes request to OAuth server to refresh the access token.
|
58
50
|
#
|
59
51
|
# Accepts:
|
60
|
-
# params
|
61
|
-
#
|
62
|
-
#
|
63
|
-
# Returns: ?.
|
52
|
+
# params - (optional) Hash of additional config to be sent with
|
53
|
+
# request.
|
64
54
|
#
|
65
55
|
def refresh(params={})
|
66
56
|
body = refresh_body_hash(params)
|
@@ -82,7 +72,6 @@ module OpenAuth2
|
|
82
72
|
URI.parse(code_url).host
|
83
73
|
end
|
84
74
|
|
85
|
-
# Make travel safe.
|
86
75
|
def encoded_body(params)
|
87
76
|
URI.encode_www_form(url_body_hash(params))
|
88
77
|
end
|
data/lib/open_auth2/version.rb
CHANGED
data/open_auth2.gemspec
CHANGED
data/spec/client_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: OpenAuth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,21 +21,31 @@ dependencies:
|
|
21
21
|
version: '0.7'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.7'
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: activesupport
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
31
36
|
- !ruby/object:Gem::Version
|
32
|
-
version: '3.
|
37
|
+
version: '3.1'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '3.1'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: json
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ! '>='
|
@@ -43,10 +53,15 @@ dependencies:
|
|
43
53
|
version: '0'
|
44
54
|
type: :runtime
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rake
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
@@ -54,10 +69,15 @@ dependencies:
|
|
54
69
|
version: '0.9'
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0.9'
|
58
78
|
- !ruby/object:Gem::Dependency
|
59
79
|
name: rspec
|
60
|
-
requirement:
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
61
81
|
none: false
|
62
82
|
requirements:
|
63
83
|
- - ~>
|
@@ -65,21 +85,31 @@ dependencies:
|
|
65
85
|
version: '2.8'
|
66
86
|
type: :development
|
67
87
|
prerelease: false
|
68
|
-
version_requirements:
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ~>
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '2.8'
|
69
94
|
- !ruby/object:Gem::Dependency
|
70
95
|
name: vcr
|
71
|
-
requirement:
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
72
97
|
none: false
|
73
98
|
requirements:
|
74
|
-
- - =
|
99
|
+
- - '='
|
75
100
|
- !ruby/object:Gem::Version
|
76
101
|
version: 1.11.3
|
77
102
|
type: :development
|
78
103
|
prerelease: false
|
79
|
-
version_requirements:
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - '='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.11.3
|
80
110
|
- !ruby/object:Gem::Dependency
|
81
111
|
name: fakeweb
|
82
|
-
requirement:
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
83
113
|
none: false
|
84
114
|
requirements:
|
85
115
|
- - ~>
|
@@ -87,10 +117,15 @@ dependencies:
|
|
87
117
|
version: '1.3'
|
88
118
|
type: :development
|
89
119
|
prerelease: false
|
90
|
-
version_requirements:
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '1.3'
|
91
126
|
- !ruby/object:Gem::Dependency
|
92
127
|
name: timecop
|
93
|
-
requirement:
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
94
129
|
none: false
|
95
130
|
requirements:
|
96
131
|
- - ~>
|
@@ -98,7 +133,12 @@ dependencies:
|
|
98
133
|
version: '0.3'
|
99
134
|
type: :development
|
100
135
|
prerelease: false
|
101
|
-
version_requirements:
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ~>
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0.3'
|
102
142
|
description: OpenAuth2 is a thin OAuth2 wrapper written on top of Faraday in Ruby.
|
103
143
|
email:
|
104
144
|
- senthil196@gmail.com
|
@@ -156,15 +196,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
156
196
|
- - ! '>='
|
157
197
|
- !ruby/object:Gem::Version
|
158
198
|
version: '0'
|
199
|
+
segments:
|
200
|
+
- 0
|
201
|
+
hash: -2189498827599968042
|
159
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
203
|
none: false
|
161
204
|
requirements:
|
162
205
|
- - ! '>='
|
163
206
|
- !ruby/object:Gem::Version
|
164
207
|
version: '0'
|
208
|
+
segments:
|
209
|
+
- 0
|
210
|
+
hash: -2189498827599968042
|
165
211
|
requirements: []
|
166
212
|
rubyforge_project: OpenAuth2
|
167
|
-
rubygems_version: 1.8.
|
213
|
+
rubygems_version: 1.8.24
|
168
214
|
signing_key:
|
169
215
|
specification_version: 3
|
170
216
|
summary: OpenAuth2 is a thin OAuth2 wrapper written on top of Faraday in Ruby. The
|
@@ -188,4 +234,3 @@ test_files:
|
|
188
234
|
- spec/google/token_spec.rb
|
189
235
|
- spec/spec_helper.rb
|
190
236
|
- spec/token_spec.rb
|
191
|
-
has_rdoc:
|