CalNet Authenticated

In Heavy Development …

This is a “rails” gem, so much of the code will be for testing in a rails app, but will not be included in the actual gem.

ToDo

  • Include migrations with an rsync or a generator

  • preferably a generator, but they are diff in rails 3

    • rake task require mods to the Rakefile

    • append requirement to Rakefile ?

    • perhaps add initializer (don’t know how rails 3 does it)

  • import some tests

  • include any test helpers for users

  • Cleanup code. Isolate requirements

  • Too many quirks to keep controllers and views in gem so install them in app with generator.

Installation / Usage

config.gem 'ccls-calnet_authenticated',
  :source => 'http://rubygems.org'

class User
  calnet_authenticated
end

# Generates a db migration
script/generate calnet_authenticated User

As some methods, like current_user, are flexible and dependent upon the developer’s choice of user model, eager loading isn’t good enough. The developer will need to ensure that the model is always around. I chose to simply add …

require 'user' <- or whatever your user model is

to the bottom of my config/environment.rb outside of the initializer block.

Gemified with Jeweler

vi Rakefile
rake version:write

rake version:bump:patch
rake version:bump:minor
rake version:bump:major

rake gemspec

rake install
rake release

Copyright © 2010 [George ‘Jake’ Wendt], released under the MIT license