github_employee_auth 0.9.2 → 0.9.3

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/example/config.ru CHANGED
@@ -7,7 +7,7 @@ module Example
7
7
  class App < Sinatra::Base
8
8
  enable :sessions
9
9
 
10
- register GitHub::Employee::Auth
10
+ register GitHub::Employee::RepoAuth
11
11
 
12
12
  get '/' do
13
13
  github_employee_auth!
@@ -4,22 +4,30 @@ require 'sinatra/auth/github'
4
4
 
5
5
  module GitHub
6
6
  module Employee
7
- module Auth
8
- module Helpers
9
- include Sinatra::Auth::Github::Helpers
10
- def github_employee_auth!
11
- github_team_authenticate!(135235)
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
- def github_employee_request(path)
15
- github_request(path)
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
@@ -1,3 +1,3 @@
1
1
  module GithubEmployeeAuth
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  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: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 2
10
- version: 0.9.2
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-12 00:00:00 -07:00
18
+ date: 2012-06-13 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency