sinatra_auth_github 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sinatra/auth/github.rb +4 -3
- metadata +7 -7
data/lib/sinatra/auth/github.rb
CHANGED
@@ -32,8 +32,9 @@ module Sinatra
|
|
32
32
|
warden.user
|
33
33
|
end
|
34
34
|
|
35
|
-
def
|
36
|
-
|
35
|
+
def github_request(path)
|
36
|
+
response = RestClient.get("https://github.com/api/v2/json/#{path}", {:accept => :json, :params => {:token => github_user.token}})
|
37
|
+
JSON.parse(response.body)
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
@@ -52,7 +53,7 @@ module Sinatra
|
|
52
53
|
|
53
54
|
app.get '/auth/github/callback' do
|
54
55
|
authenticate!
|
55
|
-
redirect
|
56
|
+
redirect url_for '/'
|
56
57
|
end
|
57
58
|
end
|
58
59
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra_auth_github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Donohoe
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-03 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -40,12 +40,12 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 21
|
44
44
|
segments:
|
45
45
|
- 0
|
46
46
|
- 0
|
47
|
-
-
|
48
|
-
version: 0.0.
|
47
|
+
- 5
|
48
|
+
version: 0.0.5
|
49
49
|
requirement: *id002
|
50
50
|
type: :runtime
|
51
51
|
name: warden-github
|