public
Description: A sinatra app and rack middleware piece for the hancock SSO server
Homepage:
Clone URL: git://github.com/atmos/hancock-client.git
atmos (author)
Wed Sep 16 01:49:55 -0700 2009
commit  e36ab6eceebf56317f8c3955f5972f227dfb3672
tree    a717d42ecd1e9472cfb03a8908afd5885cbf1af2
parent  48b6a314775a12787410b22bbdafd8d02fe79b50
name age message
file .gitignore Loading commit data...
file Gemfile
file LICENSE Wed Mar 04 09:47:31 -0800 2009 basic rack based client for hancock sso [atmos]
file README.md
file Rakefile
directory examples/
directory features/
directory lib/
directory spec/
README.md

hancock-client

A gem that integrates sinatra applications into the Hancock SSO environment. It also doubles as rack middleware that can be used in rails(>= 2.3.2) and sinatra applications.

Dependencies

% sudo gem install bundler

testing

Rake works for basic stuff, there's safariwatir for integration.

% gem bundle
% bin/rake

For the integration you need to be running a local application

% cd examples/dragon
% ../../bin/rackup config.ru -p  -p 4567

In another shell run the following from the root of the project

% bin/rake features

Application

The goal is to make it simple to write sso enabled apps.

require 'rubygems'
require 'hancock-client'

class HancockClientDemo < Sinatra::Default
  set :views,  File.dirname(__FILE__) + '/views'
  set :public, File.dirname(__FILE__) + '/public'
  use Hancock::Client::Middleware do |sso|
    sso.sso_url = 'http://hancock.atmos.org/sso'
    sso.exclude_paths = %w(/api/)
  end

  get '/' do
    haml(:home)
  end
end
run HancockClientDemo

Feedback