Browse Source

Refactor Ruby aliases

master
Sorin Ionescu 12 years ago
parent
commit
3ec4fff033
  1. 20
      modules/ruby/README.md
  2. 21
      modules/ruby/init.zsh

20
modules/ruby/README.md

@ -38,19 +38,23 @@ dependencies, with [Bundler][4]. @@ -38,19 +38,23 @@ dependencies, with [Bundler][4].
Aliases
-------
### General
- `rb` is short for `ruby`.
### Bundler
- `b` manages ruby dependencies (`bundle`).
- `be` executes a script in the context of the current bundle.
- `bi` installs the gems specified in the *Gemfile* in *vendor/bundle*.
- `bI` installs the following:
- `rbb` manages ruby dependencies (`bundle`).
- `rbbe` executes a script in the context of the current bundle.
- `rbbi` installs the gems specified in the *Gemfile* in *vendor/bundle*.
- `rbbI` installs the following:
- gems specified in the *Gemfile* in *vendor/bundle*.
- packages the gems into *vendor/cache*.
- appends bundler directories to *.gitignore*.
- `bl` lists all gems in the current bundle.
- `bo` opens an installed gem in the editor.
- `bp` packages gem files into *vendor/cache*.
- `bu` updates gems to their latest version.
- `rbbl` lists all gems in the current bundle.
- `rbbo` opens an installed gem in the editor.
- `rbbp` packages gem files into *vendor/cache*.
- `rbbu` updates gems to their latest version.
Authors
-------

21
modules/ruby/init.zsh

@ -40,17 +40,20 @@ fi @@ -40,17 +40,20 @@ fi
# Aliases
#
# General
alias rb='ruby'
# Bundler
if (( $+commands[bundle] )); then
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'
alias bI='bi \
&& b package \
alias rbb='bundle'
alias rbbe='rbb exec'
alias rbbi='rbb install --path vendor/bundle'
alias rbbl='rbb list'
alias rbbo='rbb open'
alias rbbp='rbb package'
alias rbbu='rbb update'
alias rbbI='rbbi \
&& rbb package \
&& print .bundle >>! .gitignore \
&& print vendor/bundle >>! .gitignore \
&& print vendor/cache >>! .gitignore'

Loading…
Cancel
Save