Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update to latest warden google lib and include an example app

  • Loading branch information...
commit c1885968735eecc12f0a8894bb7fcc6890cd4ea8 1 parent 43b8fe3
Corey Donohoe authored
6 Gemfile
View
@@ -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
2  Rakefile
View
@@ -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"
14 example/config.ru
View
@@ -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  lib/sinatra/auth/gmail.rb
View
@@ -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.'"
Please sign in to comment.
Something went wrong with that request. Please try again.