This Rails 4.1 app sets up the basic code for a skeleton app:
The code attempts to be secure - it passes all Brakeman tests, as of Apr 2014. Particularly, it:
config/database.yml
file from the repo, anddotenv-rails
gem to utilize a .env file in the production environment. You have to create this file - it's not stored in the repo for security reasons.The app also has some basic tests:
rails g rspec:install
has already been run for you.If you are trying to do this from scratch, note that the following rails
and rake
commands are essential to getting the app to its current state, after your bundle is installed (though you also have to change the code obviously).
This list is unfortunately not complete - it's pretty hard to keep the list of migrations up-to-date. :(
rails new baseline_rails_4_install
rails generate model Task title:string owner_id:integer
rails generate scaffold Location lat:float long:float name:string address:string
rails g migration AddAdminToUser admin:boolean
rails g migration AddAgeToUser age:integer
These generate files, so you don't have to re-run them, but they are here for the sake of the record. This list too is probably incomplete:
# Devise
rails generate devise User
rails generate devise:views
# CanCan
rails g cancan:ability
# For rspec tests folders
rails generate rspec:install
# For formtastic
rails generate formtastic:install
# There's probably stuff for geocoding and gmaps4rails... not sure if that's the case.