Gem-Based Admins for Clearance

Do you like movies about gladiators or Clearance-based authentication? If you do, you and Captain Oveur will become fast friends. Captain Oveur adds user-management tools and admin authentication to make flights of web development smoother.

Tested with Rails 2.3.5 and Clearance 0.8.8

Install it as a gem (after installing clearance, cucumber and clearance_features):

gem install captain_oveur

script/generate captain_oveur

for the cucumber features:

script/generate captain_oveur_features


While the installable cucumber features are nice, internal testing with an embedded install of rails, like Clearance, would make revising CaptainOveur cleaner…

First User Should be an Admin

Role-based Authentication (in time for Clearance 1.0 release)

  • roles table - admin is built-in

  • user_roles

  • script/generate captain_oveur_role :content_manager <= add a role to the roles

  • authentication will use the roles (meta-programmed instance methods for user.rb and authentication.rb)

  • before_filter :co_admins


A lot of this gem looks exactly like clearance. Firstly, I am an unabashed fan of thoughtbot and clearance. Given the problem domain, I also think it was the best way to handle a lot of issues, but I am open to criticism and/or suggestions.

©2009-2010 Disruptive Ventures, Inc. See LICENSE for details.