Permalink
Browse files

update to latest warden google lib and include an example app

  • Loading branch information...
1 parent 43b8fe3 commit c1885968735eecc12f0a8894bb7fcc6890cd4ea8 @atmos committed Apr 9, 2010
Showing with 19 additions and 5 deletions.
  1. +3 −3 Gemfile
  2. +1 −1 Rakefile
  3. +14 −0 example/config.ru
  4. +1 −1 lib/sinatra/auth/gmail.rb
View
6 Gemfile
@@ -2,9 +2,9 @@ source :gemcutter
group :runtime do
gem 'haml', '~>2.2.0'
- gem 'sinatra', '~>0.9.4'
- gem 'rack', '~>1.0.1'
- gem 'warden-googleapps', '~>0.0.3'
+ gem 'sinatra', '~>1.0'
+ gem 'rack', '>=1.0.0'
+ gem 'warden-googleapps', '~>0.0.5'
end
group :development do
View
2 Rakefile
@@ -19,7 +19,7 @@ Spec::Rake::SpecTask.new do |t|
end
GEM = "sinatra_auth_gmail"
-GEM_VERSION = "0.1.0"
+GEM_VERSION = "0.1.1"
AUTHOR = "Corey Donohoe"
EMAIL = "atmos@atmos.org"
HOMEPAGE = "http://github.com/atmos/sinatra_auth_gmail"
View
14 example/config.ru
@@ -0,0 +1,14 @@
+require 'rubygems'
+require 'sinatra_auth_gmail'
+
+class MyFirstGmailApp < Sinatra::Base
+ use Rack::Session::Cookie
+ register Sinatra::Auth::Gmail
+
+ get '/' do
+ authorize!
+ haml "%h2= 'Hello There, #{gmail_user.full_name}!'"
+ end
+end
+
+run MyFirstGmailApp
View
2 lib/sinatra/auth/gmail.rb
@@ -1,7 +1,7 @@
module Sinatra
module Auth
module Gmail
- class BadAuthentication < Sinatra::Default
+ class BadAuthentication < Sinatra::Base
get '/unauthenticated' do
status 403
haml "%h3= 'Unable to authenticate, sorry bud.'"

0 comments on commit c188596

Please sign in to comment.