Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

update to latest warden google lib and include an example app

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

0 comments on commit c188596

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