Skip to content

Commit

Permalink
Removed padrino cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
wweidendorf committed Oct 8, 2013
1 parent 9994ede commit cc3e359
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions bashrc
Expand Up @@ -154,56 +154,43 @@ function run-with-bundler {
}

## Main program

for CMD in $BUNDLED_COMMANDS; do
alias $CMD="run-with-bundler $CMD"
done



# Rails/Padrino aliases
function sc {
if [ -f './bin/rails' ]; then
rails console $*
elif [ -f './script/rails' ]; then
rails console $*
elif [ -f './config/apps.rb' ]; then
padrino console $*
else
./script/console $*
fi
}
function sr {
if [ -f './script/rails' ]; then
rails runner $*
else
./script/runner $*
fi
}

function ss {
if [ -f './bin/rails' ]; then
rails server $*
elif [ -f './script/rails' ]; then
rails server $*
elif [ -f './script/server' ]; then
./script/server $*
elif [ -f './config/apps.rb' ]; then
padrino start $*
else
ruby -r webrick -e "trap('INT') { @server.stop }; (@server = WEBrick::HTTPServer.new(:DocumentRoot => Dir.pwd, :Port => 3000)).start"
fi
}

function sg {
if [ -f './bin/rails' ]; then
rails generate $*
elif [ -f './script/rails' ]; then
rails generate $*
elif [ -f './config/apps.rb' ]; then
padrino g $*
else
./script/generate $*
fi
}

alias tfd='tail -f log/development.log'
alias tfp='tail -f log/production.log'
alias atr='autotest -rails'
Expand Down

0 comments on commit cc3e359

Please sign in to comment.