A devise generator with cancan and oauth support. Generates a complete authentication strategy with user management tools.
= Devisable
Start your rails project off right with Devisable.
It is a quick and easy generator that sets up devise,cancan and/or oauth on your site. It:
== Installation
Devisable supports rails 3 with ruby >= 1.9.2.
Add devisable to your gemfile
Run bundle
rails generate devisable --help
== Usage
It is always good practice to start a new branch in your repo before making major updates like when using devisable.
At least make sure you have committed all updates prior, in case you have to rollback.
Use --help to see a list of complete options
Runtime Options:
-c, [–config] # Configuration Options for devise. ie 1,2,3,7,11 (see Devise options below)
-t, [–twitteroauth] # Twitter Oauth key and secret seperated by , (comma). ie 123lk23jjsdfklsd,2l4kljknsdjlsdf
-o, [–facebookoauth] # Facebook Oauth key, secret and client_id seperated by , (comma). ie 123lk23jjsdfklsd,2l4kljknsdjlsdf,102092932
-g, [–gems] # Version of the gems you want to use seperated by Devise,Warden,Cancan. ie 1.1.5,0.1.1,1.5.1
-d, [–denied] # add this option if you want to add a customized permission denied message
-e, [–extra] # Extra fields added to the user model. ie first_name:string,last_name:string
-n, [–new] # If the project is brand new. Will remove the index.html and add the root route
-s, [–sudo] # Use sudo for the gem install commands (for non rvm/osx users)
-u, [–url] # Rool url for your app in development
-C, [–cucumber] # Include cucumber tests, currently does not support oauth
Devise Options (used with the -c command)
To just setup Basic authentication with devisable
rails generate devisable
This will setup with the devise options 1,4,5,7,8,10
Starting a project - Use the -n option
rails generate devisable -n
Twitter Oauth - Note you will need to setup your app in twitter before running this
rails generate devisable -c 2,3 -t
rails generate devisable -c 2,3 -t asdf489fhkbnajbsdf,2uh3uh383493hkjdf -u http://dev.yoururl.com
Facebook Oauth
rails generate devisable -c 2,3 -o
rails generate devisable -c 2,3 -o asdf489fhkbnajbsdf,2uh3uh383493hkjdf,10100101001 -u http://dev.yoururl.com
All three (normal authentication,twitter_oauth, facebook_oauth)
rails generate devisable -c 1,2,3,5,6,7,8 -t asdf489fhkbnajbsdf,2uh3uh383493hkjdf -o asdf489fhkbnajbsdf,2uh3uh383493hkjdf,10100101001 -u http://dev.yoururl.com
Add Cucumber tests - use the -C option
rails generate devisable -c 1,2,3,5,6,7,8 -t asdf489fhkbnajbsdf,2uh3uh383493hkjdf -o asdf489fhkbnajbsdf,2uh3uh383493hkjdf,10100101001 -n -C -u http://dev.yoururl.com
Add extra fields to the user model
rails generate devisable -e first_name:string,last_name:string
After running the generator you will most likely need to do a migration.
rake db:migrate
== Contributing to devisable
== TODOS
== Gems
devisable uses the following gems:
== Maintainers
== Copyright
Copyright © 2011 cloudspace. See LICENSE.txt for
further details.