sinatra_auth_github 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sinatra/auth/github.rb +8 -4
- data/sinatra_auth_github.gemspec +1 -1
- metadata +3 -3
data/lib/sinatra/auth/github.rb
CHANGED
@@ -5,7 +5,13 @@ require 'rest_client'
|
|
5
5
|
module Sinatra
|
6
6
|
module Auth
|
7
7
|
module Github
|
8
|
-
VERSION = "0.1.
|
8
|
+
VERSION = "0.1.1"
|
9
|
+
|
10
|
+
class AccessDenied < Sinatra::Base
|
11
|
+
get '/_images/securocat.png' do
|
12
|
+
send_file(File.join(File.dirname(__FILE__), "views", "securocat.png"))
|
13
|
+
end
|
14
|
+
end
|
9
15
|
|
10
16
|
class BadAuthentication < Sinatra::Base
|
11
17
|
helpers do
|
@@ -108,6 +114,7 @@ module Sinatra
|
|
108
114
|
end
|
109
115
|
|
110
116
|
def self.registered(app)
|
117
|
+
app.use AccessDenied
|
111
118
|
app.use Warden::Manager do |manager|
|
112
119
|
manager.default_strategies :github
|
113
120
|
|
@@ -127,9 +134,6 @@ module Sinatra
|
|
127
134
|
redirect _relative_url_for('/')
|
128
135
|
end
|
129
136
|
|
130
|
-
app.get '/_images/securocat.png' do
|
131
|
-
send_file(File.join(File.dirname(__FILE__), "views", "securocat.png"))
|
132
|
-
end
|
133
137
|
end
|
134
138
|
end
|
135
139
|
end
|
data/sinatra_auth_github.gemspec
CHANGED
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: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Corey Donohoe
|