You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
13 years ago
|
#
|
||
|
# Configures Ruby gem installation and loads rvm/rbenv.
|
||
|
#
|
||
|
# Authors:
|
||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||
|
#
|
||
|
|
||
14 years ago
|
# Loads RVM into the shell session.
|
||
|
if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
|
||
|
# Auto adding variable-stored paths to ~ list conflicts with RVM.
|
||
13 years ago
|
unsetopt AUTO_NAME_DIRS
|
||
14 years ago
|
|
||
|
# Source RVM.
|
||
|
source "$HOME/.rvm/scripts/rvm"
|
||
13 years ago
|
# Loads manually installed rbenv into the shell session.
|
||
13 years ago
|
elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then
|
||
14 years ago
|
path=("$HOME/.rbenv/bin" $path)
|
||
13 years ago
|
eval "$(rbenv init - zsh)"
|
||
13 years ago
|
# Loads package manager installed rbenv into the shell session.
|
||
|
elif (( $+commands[rbenv] )); then
|
||
|
eval "$(rbenv init - zsh)"
|
||
13 years ago
|
else
|
||
|
# Install local gems according to Mac OS X conventions.
|
||
|
if [[ "$OSTYPE" == darwin* ]]; then
|
||
|
export GEM_HOME="$HOME/Library/Ruby/Gems/1.8"
|
||
|
path=("$GEM_HOME/bin" $path)
|
||
|
fi
|
||
14 years ago
|
fi
|
||
|
|
||
13 years ago
|
# Aliases
|
||
|
alias b='bundle'
|
||
|
alias be='b exec'
|
||
|
alias bi='b install --path vendor/bundle'
|
||
|
alias bl='b list'
|
||
|
alias bo='b open'
|
||
|
alias bp='b package'
|
||
|
alias bu='b update'
|
||
13 years ago
|
alias bI='bi \
|
||
|
&& b package \
|
||
|
&& print .bundle >>! .gitignore \
|
||
|
&& print vendor/bundle >>! .gitignore \
|
||
|
&& print vendor/cache >>! .gitignore'
|
||
|
|