Skip to content

Commit

Permalink
update to latest warden google lib and include an example app
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Apr 9, 2010
1 parent 43b8fe3 commit c188596
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Expand Up @@ -2,9 +2,9 @@ source :gemcutter


group :runtime do group :runtime do
gem 'haml', '~>2.2.0' gem 'haml', '~>2.2.0'
gem 'sinatra', '~>0.9.4' gem 'sinatra', '~>1.0'
gem 'rack', '~>1.0.1' gem 'rack', '>=1.0.0'
gem 'warden-googleapps', '~>0.0.3' gem 'warden-googleapps', '~>0.0.5'
end end


group :development do group :development do
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -19,7 +19,7 @@ Spec::Rake::SpecTask.new do |t|
end end


GEM = "sinatra_auth_gmail" GEM = "sinatra_auth_gmail"
GEM_VERSION = "0.1.0" GEM_VERSION = "0.1.1"
AUTHOR = "Corey Donohoe" AUTHOR = "Corey Donohoe"
EMAIL = "atmos@atmos.org" EMAIL = "atmos@atmos.org"
HOMEPAGE = "http://github.com/atmos/sinatra_auth_gmail" HOMEPAGE = "http://github.com/atmos/sinatra_auth_gmail"
Expand Down
14 changes: 14 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion lib/sinatra/auth/gmail.rb
@@ -1,7 +1,7 @@
module Sinatra module Sinatra
module Auth module Auth
module Gmail module Gmail
class BadAuthentication < Sinatra::Default class BadAuthentication < Sinatra::Base
get '/unauthenticated' do get '/unauthenticated' do
status 403 status 403
haml "%h3= 'Unable to authenticate, sorry bud.'" haml "%h3= 'Unable to authenticate, sorry bud.'"
Expand Down

0 comments on commit c188596

Please sign in to comment.