Prefer bin/rails when available
This commit is contained in:
parent
289cbfe53a
commit
e992ac389d
2 changed files with 9 additions and 1 deletions
|
@ -8,7 +8,7 @@ alias awsi="aws sts get-caller-identity"
|
|||
alias awsp="aws-profile"
|
||||
alias b="bundle"
|
||||
alias be="bundle exec"
|
||||
alias bea="bundle exec rails"
|
||||
alias bea="run-rails"
|
||||
alias ber="bundle exec rake"
|
||||
alias bet="test-rails"
|
||||
alias c="clear"
|
||||
|
|
|
@ -90,6 +90,14 @@ function run {
|
|||
fi
|
||||
}
|
||||
|
||||
function run-rails {
|
||||
if [ -f bin/rails ]; then
|
||||
bin/rails $@
|
||||
else
|
||||
bundle exec rails
|
||||
fi
|
||||
}
|
||||
|
||||
function test-rails {
|
||||
if bundle exec rspec --help > /dev/null 2>&1; then
|
||||
if [ -d spec ]; then
|
||||
|
|
Loading…
Reference in a new issue