Merge pull request #2240 from Kriechi/master
unified and improved Rails plugin -- consolidates Rails3 and Rails4 plugins into one.master
commit
7a27a1ce77
4 changed files with 79 additions and 78 deletions
@ -1,32 +1,4 @@ |
|||||||
# Rails 3 aliases, backwards-compatible with Rails 2. |
echo "It looks like you have been using the 'rails3' plugin," |
||||||
|
echo "which has been deprecated in favor of a newly consolidated 'rails' plugin." |
||||||
function _rails_command () { |
echo "You will want to modify your ~/.zshrc configuration to begin using it." |
||||||
if [ -e "script/server" ]; then |
echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240" |
||||||
ruby script/$@ |
|
||||||
else |
|
||||||
if [ -e "bin/rails" ]; then |
|
||||||
bin/rails $@ |
|
||||||
else |
|
||||||
rails $@ |
|
||||||
fi |
|
||||||
fi |
|
||||||
} |
|
||||||
|
|
||||||
alias rc='_rails_command console' |
|
||||||
alias rd='_rails_command destroy' |
|
||||||
alias rdb='_rails_command dbconsole' |
|
||||||
alias rdbm='rake db:migrate db:test:clone' |
|
||||||
alias rg='_rails_command generate' |
|
||||||
alias rgm='_rails_command generate migration' |
|
||||||
alias rp='_rails_command plugin' |
|
||||||
alias ru='_rails_command runner' |
|
||||||
alias rs='_rails_command server' |
|
||||||
alias rsd='_rails_command server --debugger' |
|
||||||
alias devlog='tail -f log/development.log' |
|
||||||
alias testlog='tail -f log/test.log' |
|
||||||
alias prodlog='tail -f log/production.log' |
|
||||||
alias rdm='rake db:migrate' |
|
||||||
alias rdr='rake db:rollback' |
|
||||||
alias -g RET='RAILS_ENV=test' |
|
||||||
alias -g REP='RAILS_ENV=production' |
|
||||||
alias -g RED='RAILS_ENV=development' |
|
||||||
|
|||||||
@ -1,32 +1,4 @@ |
|||||||
# Rails 4 aliases |
echo "It looks like you have been using the 'rails4' plugin," |
||||||
|
echo "which has been deprecated in favor of a newly consolidated 'rails' plugin." |
||||||
function _rails_command () { |
echo "You will want to modify your ~/.zshrc configuration to begin using it." |
||||||
if [ -e "script/server" ]; then |
echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240" |
||||||
ruby script/$@ |
|
||||||
elif [ -e "script/rails" ]; then |
|
||||||
ruby script/rails $@ |
|
||||||
else |
|
||||||
ruby bin/rails $@ |
|
||||||
fi |
|
||||||
} |
|
||||||
|
|
||||||
alias rc='_rails_command console' |
|
||||||
alias rd='_rails_command destroy' |
|
||||||
alias rdb='_rails_command dbconsole' |
|
||||||
alias rdbm='rake db:migrate db:test:clone' |
|
||||||
alias rg='_rails_command generate' |
|
||||||
alias rgm='_rails_command generate migration' |
|
||||||
alias rp='_rails_command plugin' |
|
||||||
alias ru='_rails_command runner' |
|
||||||
alias rs='_rails_command server' |
|
||||||
alias rsd='_rails_command server --debugger' |
|
||||||
alias devlog='tail -f log/development.log' |
|
||||||
alias testlog='tail -f log/test.log' |
|
||||||
alias prodlog='tail -f log/production.log' |
|
||||||
alias rdm='rake db:migrate' |
|
||||||
alias rdc='rake db:create' |
|
||||||
alias rdr='rake db:rollback' |
|
||||||
alias rds='rake db:seed' |
|
||||||
alias rlc='rake log:clear' |
|
||||||
alias rn='rake notes' |
|
||||||
alias rr='rake routes' |
|
||||||
|
|||||||
Loading…
Reference in new issue