Skip to content
Browse files

Merge pull request #3 from sr/master

Let exceptions bubble up, will release shortly
  • Loading branch information...
2 parents 5aefdfd + 125d38b commit be1463aa86413554d0fd3daaa9a0eecc3483492b @atmos committed Jul 11, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/sinatra/auth/github.rb
View
6 lib/sinatra/auth/github.rb
@@ -10,13 +10,19 @@ module Github
# Simple way to serve an image early in the stack and not get blocked by
# application level before filters
class AccessDenied < Sinatra::Base
+ enable :raise_errors
+ disable :show_exceptions
+
get '/_images/securocat.png' do
send_file(File.join(File.dirname(__FILE__), "views", "securocat.png"))
end
end
# The default failure application, this is overridable from the extension config
class BadAuthentication < Sinatra::Base
+ enable :raise_errors
+ disable :show_exceptions
+
helpers do
def unauthorized_template
@unauthenticated_template ||= File.read(File.join(File.dirname(__FILE__), "views", "401.html"))

0 comments on commit be1463a

Please sign in to comment.
Something went wrong with that request. Please try again.