-
-
Save omarismail/6550154 to your computer and use it in GitHub Desktop.
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
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment