forked from iain/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ruby.sh
33 lines (27 loc) · 1.05 KB
/
.ruby.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# always load gems for ruby
export RUBYOPT=rubygems
# rubygems shortcuts (http://stephencelis.com/archive/2008/6/bashfully-yours-gem-shortcuts)
alias gems='cd $(gem env gemdir)/gems'
export GEMDIR=`gem env gemdir`
gemdoc() {
open $GEMDIR/doc/`$(which ls) $GEMDIR/doc | grep $1 | sort | tail -1`/rdoc/index.html
}
_gemdocomplete() {
COMPREPLY=($(compgen -W '$(`which ls` $GEMDIR/doc)' -- ${COMP_WORDS[COMP_CWORD]}))
return 0
}
complete -o default -o nospace -F _gemdocomplete gemdoc
gemlite() {
gem install $1 --no-rdoc --no-ri
}
# unit_record and autotest
alias autou='autotest'
alias autof='AUTOTEST=functional autotest'
# run autotest locked to ZenTest 3.9.2
alias autou392='autotest _3.9.2_'
alias autof392='AUTOTEST=functional autotest _3.9.2_'
# shorten mongrel cluster commands
# example: cluster_start myapp
cluster_restart () { mongrel_rails cluster::restart -C /etc/mongrel_cluster/$1.yml;}
cluster_start () { mongrel_rails cluster::start -C /etc/mongrel_cluster/$1.yml;}
cluster_stop () { mongrel_rails cluster::stop -C /etc/mongrel_cluster/$1.yml;}