Skip to content

Commit 2d02e08

Browse files
committed
Updated the homebrew formula to match the upstream homebrew formula.
1 parent ed11ad7 commit 2d02e08

File tree

1 file changed

+30
-31
lines changed

1 file changed

+30
-31
lines changed

homebrew/chruby.rb

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
require 'formula'
2-
31
class Chruby < Formula
4-
homepage 'https://github.com/postmodern/chruby#readme'
5-
url 'https://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz'
6-
sha256 '7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd'
7-
8-
head 'https://github.com/postmodern/chruby.git'
2+
desc "Ruby environment tool"
3+
homepage "https://github.com/postmodern/chruby#readme"
4+
url "https://github.com/postmodern/chruby/releases/download/v0.3.9/chruby-0.3.9.tar.gz"
5+
sha256 "7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd"
6+
license "MIT"
7+
head "https://github.com/postmodern/chruby.git", branch: "master"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_big_sur: "97ca44a014def181a1bd3cacb5ff86783c6fddb1d1262336e9765d14a7d5959a"
11+
sha256 cellar: :any_skip_relocation, big_sur: "16f188427ecc5432c18a004f567b73a8138fd2c2010d76821843e3804663fc02"
12+
sha256 cellar: :any_skip_relocation, catalina: "004f825f798a41ffb3c9576aa3b77e7b8cef227287725818f5d3f1a779b12de6"
13+
sha256 cellar: :any_skip_relocation, mojave: "4b3e7d6e76cd5d914b0bb4871a0a0f33c9b997a9c579ca4450191c87c3dc4f53"
14+
sha256 cellar: :any_skip_relocation, high_sierra: "d59074fe39429eb9979acd0e81e6b9a142aa73595971cee42ab91bbe850c6105"
15+
sha256 cellar: :any_skip_relocation, sierra: "17dc507695fed71749b5a58152d652bb7b92a4574f200b631a39f5f004e86cca"
16+
sha256 cellar: :any_skip_relocation, el_capitan: "ff70dff83817f093d39384a40d3dfb2aaccc1cbe475d58383d4ef157085f2c64"
17+
sha256 cellar: :any_skip_relocation, x86_64_linux: "bea6c750e5ce28f5a8ade003baef8a42bcbdf2b376e2d4ae8e12c7b3b112fef6"
18+
sha256 cellar: :any_skip_relocation, all: "977cf9319a21ddbbd26d3f0a43ed75825eb2a514bdce56b4045e5214732ec13b"
19+
end
920

1021
def install
11-
system 'make', 'install', "PREFIX=#{prefix}"
22+
system "make", "install", "PREFIX=#{prefix}"
1223
end
1324

14-
def caveats; <<-EOS.undent
15-
Add the following to the ~/.bashrc or ~/.zshrc file:
16-
17-
source "#{opt_share}/chruby/chruby.sh"
18-
19-
By default chruby will search for Rubies installed into /opt/rubies/ or
20-
~/.rubies/. For non-standard installation locations, simply set the RUBIES
21-
variable after loading chruby.sh:
22-
23-
RUBIES=(
24-
/opt/jruby-1.7.0
25-
$HOME/src/rubinius
26-
)
25+
def caveats
26+
<<~EOS
27+
Add the following to the ~/.bash_profile or ~/.zshrc file:
28+
source #{opt_pkgshare}/chruby.sh
2729
28-
If you are migrating from another Ruby manager, set `RUBIES` accordingly:
29-
30-
RVM: RUBIES+=(~/.rvm/rubies/*)
31-
rbenv: RUBIES+=(~/.rbenv/versions/*)
32-
rbfu: RUBIES+=(~/.rbfu/rubies/*)
33-
34-
To enable auto-switching of Rubies specified by .ruby-version files,
35-
add the following to ~/.bashrc or ~/.zshrc:
36-
37-
source "#{opt_share}/chruby/auto.sh"
30+
To enable auto-switching of Rubies specified by .ruby-version files,
31+
add the following to ~/.bash_profile or ~/.zshrc:
32+
source #{opt_pkgshare}/auto.sh
3833
EOS
3934
end
35+
36+
test do
37+
assert_equal "chruby version #{version}", shell_output("#{bin}/chruby-exec --version").strip
38+
end
4039
end

0 commit comments

Comments
 (0)