-
-
Save delameko/1438877 to your computer and use it in GitHub Desktop.
Script to automatically append 'bundle exec' to the start of a command if there is a Gemfile in the folder.
This file contains hidden or 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 rake { | |
if [ -e Gemfile ]; then | |
bundle exec rake $@ | |
else | |
`which rake` $@ | |
fi | |
} | |
function rspec { | |
if [ -e Gemfile ]; then | |
bundle exec rspec $@ | |
else | |
`which rspec` $@ | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment