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.
@@ -5,7 +5,13 @@ require 'rest_client'
5
5
  module Sinatra
6
6
  module Auth
7
7
  module Github
8
- VERSION = "0.1.0"
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
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "sinatra_auth_github"
6
- s.version = "0.1.0"
6
+ s.version = "0.1.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Corey Donohoe"]
9
9
  s.email = ["atmos@atmos.org"]
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Corey Donohoe