Skip to content
Browse files

update ruby switcher to working versions of rubies

  • Loading branch information...
2 parents 166ee4b + 8c91596 commit ae7f8b26639531bce02b3e98b0668dd0a4765349 @muness muness committed Mar 17, 2010
Showing with 81 additions and 93 deletions.
  1. +0 −22 bash/aliases.sh
  2. +18 −0 bash/exports.sh
  3. +0 −12 bash/gemdoc.sh
  4. +20 −0 bash/git_installer.sh
  5. +1 −1 bash/git_prompt.sh
  6. +1 −1 bash/rails.sh
  7. +1 −20 bash/ruby.sh
  8. +29 −36 bash/ruby_switcher.sh
  9. +11 −1 scripts/pair
View
22 bash/aliases.sh
@@ -5,7 +5,6 @@ alias rm='rm -i'
alias :='cd ..'
alias ::='cd ../..'
alias :::='cd ../../..'
-alias v='vmstat'
alias md=mkdir
# Need to do this so you use backspace in screen...I have no idea why
@@ -17,35 +16,14 @@ alias ltr='ls -ltr'
alias lth='l -t|head'
alias lh='ls -Shl | less'
alias tf='tail -f -n 100'
-alias t500='tail -n 500'
-alias t1000='tail -n 1000'
-alias t2000='tail -n 2000'
-
-# svn
-alias sup='svn up'
-alias sst='svn st'
-alias sstu='svn st -u'
-alias sci='svn ci -m'
-alias sdiff='svn diff | colordiff'
-alias smate='svn diff | mate && svn ci'
-alias sadd="sst | grep '?' | cut -c5- | xargs svn add"
# editing shortcuts
alias m='mate'
alias e='emacs'
alias erc='e /etc/bashrc'
alias newrc='. /etc/bashrc'
-alias rsync_nosvn="rsync --exclude=.svn -r "
alias rsync_novc="rsync --exclude=.svn --exclude=.git -r "
-alias sourceit='. ~/src/scripts/profile.d/00_startup.sh'
-
-# mate shortcuts
-alias m8prof='m ~/src/scripts/profile.d/'
-
-# ignore svn metadata - pipe this into xargs to do stuff
-alias no_svn="find . -path '*/.svn' -prune -o -type f -print"
-
# grep for a process
function psg {
FIRST=`echo $1 | sed -e 's/^\(.\).*/\1/'`
View
18 bash/exports.sh
@@ -0,0 +1,18 @@
+# Set default console Java to 1.6
+export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
+
+export CLICOLOR=1
+export LSCOLORS=gxfxcxdxbxegedabagacad
+
+# Enable color in grep
+export GREP_OPTIONS='--color=auto'
+export GREP_COLOR='3;33'
+
+# This resolves issues install the mysql, postgres, and other gems with native non universal binary extensions
+# You only want this if you are on Snow Leopard
+export ARCHFLAGS='-arch x86_64'
+
+# History: don't store duplicates
+export HISTCONTROL=erasedups
+# History: 10,000 entries
+export HISTSIZE=10000
View
12 bash/gemdoc.sh
@@ -1,12 +0,0 @@
-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
View
20 bash/git_installer.sh
@@ -0,0 +1,20 @@
+function install_git_from_source {
+ local version="$1"
+ local man_url="http://kernel.org/pub/software/scm/git/git-manpages-$version.tar.bz2"
+ local src_url="http://kernel.org/pub/software/scm/git/git-$version.tar.bz2"
+
+ mkdir -p ~/tmp && pushd ~/tmp &&
+ curl -O --silent $man_url &&
+ sudo tar xj -C/usr/local/share/man -f git-manpages-$version.tar.bz2 &&
+ rm -rf git-manpages-$version.tar.bz2 &&
+ curl -O --silent $src_url &&
+ tar xjf git-$version.tar.bz2 &&
+ cd git-$version && find . -name "git-completion.bash" -exec cp {} ~ \; &&
+ ./configure && make && sudo make install &&
+ cd ~/tmp && rm -rf git-$version git-$version.tar.bz2 &&
+ popd
+}
+
+function install_git_completion {
+ echo "source ~/.git-completion.bash" >> ~/.bash_profile
+}
View
2 bash/git_prompt.sh
@@ -44,7 +44,7 @@ function git_branch_and_user {
#
# git config --global user.initials 'jr'
function git_user_initials {
- git config --get user.initials
+ git config --get user.initials || echo "-solo-"
}
function prompt_func() {
View
2 bash/rails.sh
@@ -22,7 +22,7 @@ alias rdfl='rake db:fixtures:load'
alias rdr='rake db:rollback'
alias rroutes='rake routes'
alias mroutes='rroutes | mate'
-alias rmate='mate *.rb *.yml Rakefile README *.markdown app bin config doc examples db lib public script spec test stories features'
+alias rmate='mate *.rb *.yml *.watchr Rakefile README Gemfile *.markdown *.md app bin config doc examples db lib public script spec test stories features'
# capistrano
alias csd='cap staging deploy'
View
21 bash/ruby.sh
@@ -1,31 +1,12 @@
-# always load gems for ruby
-export RUBYOPT=rubygems
+alias relock='bundle install --relock'
# 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;}
View
65 bash/ruby_switcher.sh
@@ -8,50 +8,26 @@ function use_leopard_ruby {
}
function use_jruby {
- export MY_RUBY_HOME=~/.ruby_versions/jruby-1.3.1
+ export MY_RUBY_HOME=~/.ruby_versions/jruby-1.4.0
export GEM_HOME=~/.gem/jruby/1.8
export GEM_PATH=~/.gem/jruby/1.8
- alias ruby_ng="jruby --ng"
- alias ruby_ng_server="jruby --ng-server"
update_path
}
function install_jruby {
mkdir -p ~/.ruby_versions && pushd ~/.ruby_versions &&
- curl -O -L --silent http://dist.codehaus.org/jruby/1.3.1/jruby-bin-1.3.1.zip &&
- rm -rf jruby-1.3.1 &&
- jar xf jruby-bin-1.3.1.zip &&
- ln -sf ~/.ruby_versions/jruby-1.3.1/bin/jruby ~/.ruby_versions/jruby-1.3.1/bin/ruby &&
- ln -sf ~/.ruby_versions/jruby-1.3.1/bin/jgem ~/.ruby_versions/jruby-1.3.1/bin/gem &&
- ln -sf ~/.ruby_versions/jruby-1.3.1/bin/jirb ~/.ruby_versions/jruby-1.3.1/bin/irb &&
- chmod +x ~/.ruby_versions/jruby-1.3.1/bin/{jruby,jgem,jirb,jrubyc} &&
- cd ~/.ruby_versions/jruby-1.3.1/tool/nailgun && make &&
- rm -rf ~/.ruby_versions/jruby-bin-1.3.1.zip &&
+ curl -O -L --silent http://jruby.kenai.com/downloads/1.4.0/jruby-bin-1.4.0.zip &&
+ rm -rf jruby-1.4.0 &&
+ jar xf jruby-bin-1.4.0.zip &&
+ ln -sf ~/.ruby_versions/jruby-1.4.0/bin/jruby ~/.ruby_versions/jruby-1.4.0/bin/ruby &&
+ ln -sf ~/.ruby_versions/jruby-1.4.0/bin/jgem ~/.ruby_versions/jruby-1.4.0/bin/gem &&
+ ln -sf ~/.ruby_versions/jruby-1.4.0/bin/jirb ~/.ruby_versions/jruby-1.4.0/bin/irb &&
+ chmod +x ~/.ruby_versions/jruby-1.4.0/bin/{jruby,jgem,jirb,jrubyc} &&
+ rm -rf ~/.ruby_versions/jruby-bin-1.4.0.zip &&
use_jruby && install_jruby_openssl && install_rake &&
popd
}
-function use_jruby_120 {
- export MY_RUBY_HOME=~/.ruby_versions/jruby-1.2.0
- export GEM_HOME=~/.gem/jruby/1.8
- export GEM_PATH=~/.gem/jruby/1.8
- update_path
-}
-
-function install_jruby_120 {
- mkdir -p ~/.ruby_versions && pushd ~/.ruby_versions &&
- curl -O -L --silent http://dist.codehaus.org/jruby/1.2.0/jruby-bin-1.2.0.zip &&
- rm -rf jruby-1.2.0 &&
- jar xf jruby-bin-1.2.0.zip &&
- ln -sf ~/.ruby_versions/jruby-1.2.0/bin/jruby ~/.ruby_versions/jruby-1.2.0/bin/ruby &&
- ln -sf ~/.ruby_versions/jruby-1.2.0/bin/jgem ~/.ruby_versions/jruby-1.2.0/bin/gem &&
- ln -sf ~/.ruby_versions/jruby-1.2.0/bin/jirb ~/.ruby_versions/jruby-1.2.0/bin/irb &&
- chmod +x ~/.ruby_versions/jruby-1.2.0/bin/{jruby,jgem,jirb} &&
- rm -rf ~/.ruby_versions/jruby-bin-1.2.0.zip &&
- use_jruby_120 && install_jruby_openssl && install_rake &&
- popd
-}
-
function use_ree_186 {
export MY_RUBY_HOME=~/.ruby_versions/ruby-enterprise-1.8.6-20090610
export GEM_HOME=~/.gem/ruby-enterprise/1.8
@@ -75,6 +51,23 @@ function install_ree_186 {
popd
}
+function use_ree_187 {
+ export MY_RUBY_HOME=~/.ruby_versions/ruby-enterprise-1.8.7-2009.10
+ export GEM_HOME=~/.gem/ruby/1.8.7
+ export GEM_PATH=~/.gem/ruby/1.8.7
+ update_path
+}
+
+function install_ree_187 {
+ mkdir -p ~/tmp && mkdir -p ~/.ruby_versions && pushd ~/tmp
+ curl --silent -L -O http://rubyforge.org/frs/download.php/66162/ruby-enterprise-1.8.7-2009.10.tar.gz &&
+ tar xzf ruby-enterprise-1.8.7-2009.10.tar.gz && cd ruby-enterprise-1.8.7-2009.10 &&
+ ./installer -a $HOME/.ruby_versions/ruby-enterprise-1.8.7-2009.10 &&
+ cd ~/tmp && rm -rf ~/tmp/ruby-enterprise-1.8.7-2009.10 ruby-enterprise-1.8.7-2009.10.tar.gz &&
+ use_ree_187 && install_rubygems_from_source "1.3.6" && install_rake &&
+ popd
+}
+
function use_ruby_191 {
export MY_RUBY_HOME=~/.ruby_versions/ruby-1.9.1-p243
export GEM_HOME=~/.gem/ruby/1.9.1
@@ -102,14 +95,14 @@ function install_ruby_186 {
function use_ruby_187 {
export MY_RUBY_HOME=~/.ruby_versions/ruby-1.8.7-p174
- export GEM_HOME=~/.gem/ruby/1.8
- export GEM_PATH=~/.gem/ruby/1.8
+ export GEM_HOME=~/.gem/ruby/1.8.7
+ export GEM_PATH=~/.gem/ruby/1.8.7
update_path
}
function install_ruby_187 {
install_ruby_from_source "1.8" "7" "174" &&
- use_ruby_187 && install_rubygems_from_source "1.3.5" && install_rake && popd
+ use_ruby_187 && install_rubygems_from_source "1.3.6" && install_rake && popd
}
function install_ruby_from_source {
View
12 scripts/pair
@@ -15,17 +15,27 @@ PAIR_EMAIL = "pair@thinkrelevance.com"
AUTHORS = {
"ab" => "Aaron Bedra",
+ "ca" => "Corey Haines",
"ch" => "Chad Humphries",
+ "cr" => "Chris Redinger",
+ "dc" => "David Chelimsky",
+ "de" => "David Eisinger",
"dm" => "Don Mullen",
"gv" => "Glenn Vanderburg",
+ "jl" => "Joseph Leddy",
"jm" => "Jess Martin",
"jg" => "Justin Gehtland",
+ "jp" => "Jared Pace",
"jr" => "Jason Rudolph",
"lk" => "Larry Karnowski",
"ma" => "Muness Alrubaie",
"na" => "Nick Ang",
"rs" => "Rob Sanheim",
- "sh" => "Stuart Halloway"
+ "sf" => "Shay Frendt",
+ "sh" => "Stuart Halloway",
+ "vf" => "Jim Van Fleet",
+ "tj" => "Tyler Jennings",
+ "bm" => "Brian Marick"
}
## End of configuration

0 comments on commit ae7f8b2

Please sign in to comment.
Something went wrong with that request. Please try again.