Translations of this page?:

Clearance

Clearance is a Ruby gem that handles Rails authentication. It is intended for Rails developers who write tests.

It is written by thoughtbot, the authors of Shoulda (testing framework), Factory Girl (test data for Ruby test suites), and Paperclip (file uploads).

Installation

$ sudo gem install thoughtbot-clearance -s http://gems.github.com

Documentation

Documentation is actively maintained in Clearance's README.textile, which can be viewed online at Clearance's Github page.

End-User Features

Clearance includes by default the features that thoughtbot's clients regularly requested.

  • Register
  • Email confirmation
  • Encrypted password
  • Password recovery

Rails Developer Features

Clearance is opinionated about Rails best practices and how you will structure your Rails app. For example, it assumes that you will have a User model, and that you will be using attr_accessible in that User model.

  • Includes comprehensive Cucumber tests.
  • Authentication logic is encapsulated as a Rails Engine, keeping your application code clean.
  • signed_in? & current_user helper methods

Application controller example:

class ApplicationController < ActionController::Base
  include Clearance::Authentication
end

User model example:

class User < ActiveRecord::Base
  include Clearance::User
end

Feature requests & bug reports

Clearance's Github Issues queue is actively maintained by thoughtbot developers and other Clearance users.

Mailing List

There is a mailing list for questions about Clearance.

 
howtos/authentication-authorization/clearance.txt · Last modified: 2009/06/08 17:24 by croaky
 
Recent changes RSS feed Creative Commons License