Bashrc Tweaks for Ruby
After a long time of using the .bashrc file to store our commands here, we share some of our tricks to make the most out of a .bashrc file.
Alias methods for shorter commands
We put our most commonly used commands in the bashrc file under alias methods:
alias rs="bundle exec rspec spec"
alias rr="bundle exec rake routes"
alias rc="bundle exec cucumber --format=pretty"
alias rcw="bundle exec cucumber --profile=wip --format=pretty"
alias rakem="bundle exec rake db:migrate"
alias rakep="bundle exec rake db:test:prepare"
alias spork="bundle exec spork"
alias sporkc="bundle exec spork cucumber"
alias railss="bundle exec rails server"
alias be="bundle exec"
alias railsc="bundle exec rails console"
alias bi="bundle install --path vendor/bundle"
Git branch information per application (master/development..)
Add following line in .bashrc and you will have information on which branch git is all the time
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '