OriPekelman / rails4-bootstrap-devise-cancan-omniauth

An example Rails 4.0 app with Devise, CanCan, OmniAuth and Twitter Bootstrap.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rails 4.0 App with Mongoid, Devise, CanCan, OmniAuth and Twitter Bootstrap (TDD ready)


You can use this project as a starting point for a Rails web application. It requires Rails 4 uses Mongoid as database, Devise/OmniAuth for user management and authentication, CanCan for user access control, and Twitter Bootstrap for CSS styling.

Rails 4.0 Bootstrap Demo App

How to use

  • Install new version of bundler: gem install --version '>= 1.3.0' bundler
  • Get edge(4.0) version of rails: git clone https://github.com/rails/rails.git and cd rails
  • Generate new rails app from template:
railties/bin/rails new ../myapp --edge --skip-bundle -m https://raw.github.com/alex-klepa/rails4-bootstrap-devise-cancan-omniauth/master/rails4-bootstrap.rb
  • cd ../myapp
  • Edit db/seed.rb to customimze admin user then run rake db:seed
  • Edit config/initializers/devise.rb to customize your omniauth providers:
config.omniauth :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: 'email,user_birthday,read_stream'
config.omniauth :twitter, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET']
  • Edit config/config.yml to customize your application settings, they will be avaliable via AppConfig object within your app, e.g. AppConfig.default_role

##Test-driven development

  • In 1st console start zeus: zeus start
  • In 2nd start rails server: zeus s
  • In 3rd start guard: bundle exec guard

Links

Devise

OmniAuth

CanCan

Twitter Bootstrap

About

An example Rails 4.0 app with Devise, CanCan, OmniAuth and Twitter Bootstrap.


Languages

Language:Ruby 98.0%Language:JavaScript 1.2%Language:CoffeeScript 0.8%