Created
August 14, 2017 14:14
-
-
Save joonyou/2bacd384d43eed59c14edd5c0870d250 to your computer and use it in GitHub Desktop.
New Rails App
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
kylo [2.4.1] [~] ➜ cat bin/newrailsapp.sh | |
#!/bin/bash | |
set -e | |
app=$1 | |
approot=$HOME/box/$1 | |
# create a new rails app with my usuals | |
cd $HOME/box | |
$HOME/.rbenv/shims/rails new $app --skip-spring -T | |
cd $app | |
# update gitignore file - just in case not my machine or vm | |
echo " | |
.DS_Store | |
/log/* | |
!/log/.keep | |
/tmp | |
*.swp | |
*.swo | |
deploy.rb | |
database.yml | |
secrets.yml | |
.capistrano/**/* | |
.rspec | |
" >> .gitignore | |
# update Gemfile with the essentials | |
echo " | |
group :test do | |
gem 'rspec-rails' | |
gem 'capybara' | |
gem 'faker' | |
gem 'machinist', git: 'https://github.com/rubyhead/machinist.git' | |
end" >> Gemfile | |
# install gems | |
bin/bundle install | |
rbenv rehash | |
# rspec init | |
bin/rails generate rspec:install | |
# machinist | |
bin/rails generate machinist:install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment