homebrew-core/Formula/chruby.rb
Shannon Skipper 0ef0bf47de chruby 0.3.8
### 0.3.8 / 2013-12-04

#### chruby.sh

* Remove trailing slashes from ruby directories when iterating over `RUBIES`.
  (@halostatue)
* Ensure all temporary variables are local or unset.

#### auto.sh

* Ensure that `chruby_auto` can read `.ruby-version` files that do not end with
  a new-line. (@hosiawak)

#### scripts/setup.sh

* Install ruby-install 0.3.3.

#### scripts/bug_report.sh

* Print `$HOME`, `$RUBY_AUTO_VERSION`.
* Print `trap -p`, `$preexec_functions` and `$precmd_functions`.
* Print env variables even when they are empty.

Closes Homebrew/homebrew#24941.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-12-04 19:56:15 -08:00

40 lines
1.1 KiB
Ruby

require 'formula'
class Chruby < Formula
homepage 'https://github.com/postmodern/chruby#readme'
url 'https://github.com/postmodern/chruby/archive/v0.3.8.tar.gz'
sha1 '320d13bacafeae72631093dba1cd5526147d03cc'
head 'https://github.com/postmodern/chruby.git'
def install
system 'make', 'install', "PREFIX=#{prefix}"
end
def caveats; <<-EOS.undent
Add the following to the ~/.bashrc or ~/.zshrc file:
source #{opt_prefix}/share/chruby/chruby.sh
By default chruby will search for Rubies installed into /opt/rubies/ or
~/.rubies/. For non-standard installation locations, simply set the RUBIES
variable after loading chruby.sh:
RUBIES=(
/opt/jruby-1.7.0
$HOME/src/rubinius
)
If you are migrating from another Ruby manager, set `RUBIES` accordingly:
RVM: RUBIES=(~/.rvm/rubies/*)
rbenv: RUBIES=(~/.rbenv/versions/*)
rbfu: RUBIES=(~/.rbfu/rubies/*)
To enable auto-switching of Rubies specified by .ruby-version files,
add the following to ~/.bashrc or ~/.zshrc:
source #{opt_prefix}/share/chruby/auto.sh
EOS
end
end