A sinatra app that lets you authenticate users via gmail.
% gem install bundler
% bundle install
% bundle exec rake
gem "sinatra_auth_gmail"
# vim:ft=ruby
require 'rubygems'
require 'bundler'
Bundler.setup
Bundler.require
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
% bundle install
% bundle exec rackup
% open http://localhost:9292