dgerbs
9/12/2013 - 3:25 PM

.rails_aliases

function rails_pg() {
  rails new $1 -T --database=postgresql &&
  cd $1 &&

  echo $1 > .ruby-gemset &&
  echo 2.0 > .ruby-version &&
  echo /config/database.yml >> .gitignore &&
  cp config/database.yml config/database.example.yml &&

  add_rails_gems &&
  bundle &&
  rails g rspec:install &&

  git init &&
  git add . &&
  git commit -m 'Initial commit' &&

  subl .;
}


function add_rails_gems() {

echo "

group :test, :development do
  gem 'rspec-rails'
  gem 'capybara'
  gem 'factory_girl_rails'
  gem 'shoulda'
  gem 'valid_attribute'
  gem 'launchy'
end

" >> Gemfile;

}