Created
June 1, 2011 19:45
-
-
Save overture8/1003130 to your computer and use it in GitHub Desktop.
Rumble Labs Rails Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create rvmrc file | |
create_file ".rvmrc", "rvm 1.9.2" | |
gem "simple_form" | |
gem "devise" | |
gem "rake", "0.9.1" | |
run 'bundle install' | |
rake "db:create", :env => 'development' | |
rake "db:create", :env => 'test' | |
generate 'simple_form:install' | |
# authentication setup | |
generate "devise:install" | |
generate "devise User" | |
generate "devise:views" | |
rake "db:migrate" | |
# clean up rails defaults | |
remove_file 'public/index.html' | |
remove_file 'rm public/images/rails.png' | |
run 'cp config/database.yml config/database.example' | |
run "echo 'config/database.yml' >> .gitignore" | |
# Before filter for devise auth | |
inject_into_file 'app/controllers/application_controller.rb', "\n before_filter :authenticate_user!", :after => "protect_from_forgery" | |
# Create default seed data | |
append_file 'db/seeds.rb' do | |
<<-eos | |
User.create!(:first_name => 'Phil', :last_name => 'McClure', :email => 'pmcclure@rumblelabs.com', :password => 'password') | |
eos | |
end | |
rake "db:seed" | |
# commit to git | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'create initial application'" | |
say <<-eos | |
============================================================================ | |
Your new Rails application is ready to rumble. | |
eos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment