authlogic-connect-andrewacove 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ require 'rake/gempackagetask'
|
|
6
6
|
spec = Gem::Specification.new do |s|
|
7
7
|
s.name = "authlogic-connect-andrewacove"
|
8
8
|
s.authors = ['Lance Pollard', 'Andrew Cove']
|
9
|
-
s.version = '0.5.
|
9
|
+
s.version = '0.5.5'
|
10
10
|
s.summary = "Personal fork of Authlogic Connect: Oauth and OpenID made dead simple"
|
11
11
|
s.homepage = "http://github.com/andrewacove/authlogic-connect"
|
12
12
|
s.email = "andrewacove@gmail.com"
|
@@ -57,17 +57,14 @@ class OauthToken < AccessToken
|
|
57
57
|
@oauth_key
|
58
58
|
end
|
59
59
|
|
60
|
-
|
60
|
+
|
61
|
+
def consumer
|
61
62
|
if oauth_version == 1.0
|
62
|
-
|
63
|
+
OAuth::Consumer.new(credentials[:key], credentials[:secret], config.merge(credentials[:options] || {}))
|
63
64
|
else
|
64
|
-
|
65
|
+
OAuth2::Client.new(credentials[:key], credentials[:secret], config.merge(credentials[:options] || {}))
|
65
66
|
end
|
66
67
|
end
|
67
|
-
|
68
|
-
def consumer
|
69
|
-
@consumer || reset_consumer!
|
70
|
-
end
|
71
68
|
|
72
69
|
# if we're lucky we can find it by the token.
|
73
70
|
def find_by_key_or_token(key, token, options = {})
|
@@ -17,19 +17,14 @@ class OauthToken < AccessToken
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def get(path, options = {})
|
20
|
-
|
21
|
-
puts "DEBUG: credentials #{credentials.to_yaml}"
|
22
|
-
config_options = credentials[:options] unless credentials.nil?
|
23
|
-
puts "DEBUG: config_options #{config_options.to_yaml}"
|
20
|
+
config_options = self.class.send(:credentials)[:options]
|
24
21
|
api_version = config_options[:api_version] unless config_options.nil?
|
25
|
-
puts "DEBUG: api_version #{api_version.to_yaml}"
|
26
22
|
path.insert(0, "/#{api_version}") unless api_version.nil?
|
27
23
|
client.get(path, options)
|
28
24
|
end
|
29
25
|
|
30
26
|
def post(path, body='', headers ={})
|
31
|
-
|
32
|
-
config_options = credentials[:options] unless credentials.nil?
|
27
|
+
config_options = self.class.send(:credentials)[:options]
|
33
28
|
api_version = config_options[:api_version] unless config_options.nil?
|
34
29
|
path.insert(0, "/#{api_version}") unless api_version.nil?
|
35
30
|
client.post(path, body, headers)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlogic-connect-andrewacove
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 5
|
10
|
+
version: 0.5.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lance Pollard
|