diff --git a/modules/ruby/README.md b/modules/ruby/README.md new file mode 100644 index 0000000..4eac576 --- /dev/null +++ b/modules/ruby/README.md @@ -0,0 +1,29 @@ +Ruby +=== + +Provides RVM integration and nice aliases for Ruby + +RVM +--- + +If you have RVM installed, this will automatically set it up without +any required configuration to your dot files. To install RVM, see +http://rvm.io + +Aliases +------- + +### Ruby + + - `rb` is short for `ruby`. + +### Bundler + + - `rbb` bundle install + - `rbbc` bundle clean + - `rbbe` bundle exec + - `rbbi` bundle install --path vendor/bundle + - `rbbl` bundle list + - `rbbo` bundle open + - `rbbp` bundle package + - `rbbu` bundle update diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh new file mode 100644 index 0000000..34c20ea --- /dev/null +++ b/modules/ruby/init.zsh @@ -0,0 +1,26 @@ +# Load RVM into the shell session. +if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then + # Unset AUTO_NAME_DIRS since auto adding variable-stored paths to ~ list + # conflicts with RVM. + unsetopt AUTO_NAME_DIRS + + # Source RVM. + source "$HOME/.rvm/scripts/rvm" +fi + +# +# Aliases +# + +# General +alias rb='ruby' + +# Bundler +alias rbb='bundle' +alias rbbc='bundle clean' +alias rbbe='bundle exec' +alias rbbi='bundle install --path vendor/bundle' +alias rbbl='bundle list' +alias rbbo='bundle open' +alias rbbp='bundle package' +alias rbbu='bundle update'