github_employee_auth 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/example/config.ru +1 -1
- data/lib/github_employee_auth.rb +18 -10
- data/lib/github_employee_auth/version.rb +1 -1
- metadata +4 -4
data/example/config.ru
CHANGED
data/lib/github_employee_auth.rb
CHANGED
@@ -4,22 +4,30 @@ require 'sinatra/auth/github'
|
|
4
4
|
|
5
5
|
module GitHub
|
6
6
|
module Employee
|
7
|
-
module
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
end
|
7
|
+
module Helpers
|
8
|
+
include Sinatra::Auth::Github::Helpers
|
9
|
+
def github_employee_auth!
|
10
|
+
github_team_authenticate!(135235)
|
11
|
+
end
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
end
|
13
|
+
def github_employee_request(path)
|
14
|
+
github_request(path)
|
17
15
|
end
|
16
|
+
end
|
18
17
|
|
18
|
+
module Auth
|
19
19
|
def self.registered(app)
|
20
|
-
app.register(Sinatra::Auth::Github)
|
21
20
|
app.helpers(Helpers)
|
22
21
|
app.set(:github_options, {:scopes => "user"})
|
22
|
+
app.register(Sinatra::Auth::Github)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module RepoAuth
|
27
|
+
def self.registered(app)
|
28
|
+
app.helpers(Helpers)
|
29
|
+
app.set(:github_options, {:scopes => "user,repo"})
|
30
|
+
app.register(Sinatra::Auth::Github)
|
23
31
|
end
|
24
32
|
end
|
25
33
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_employee_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 61
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 3
|
10
|
+
version: 0.9.3
|
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: 2012-06-
|
18
|
+
date: 2012-06-13 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|