homebrew-core/Formula/gerrit-tools.rb
2016-02-11 17:03:47 +01:00

24 lines
724 B
Ruby

class GerritTools < Formula
desc "Tools to ease Gerrit code review"
homepage "https://github.com/indirect/gerrit-tools"
url "https://github.com/indirect/gerrit-tools/archive/v1.0.0.tar.gz"
sha256 "c3a84af2ddb0f17b7a384e5dbc797329fb94d2499a75b6d8f4c8ed06a4a482dd"
head "https://github.com/indirect/gerrit-tools.git"
bottle :unneeded
def install
prefix.install "bin"
end
test do
system "git", "init"
system "git", "remote", "add", "origin", "https://example.com/foo.git"
hook = (testpath/".git/hooks/commit-msg")
touch hook
hook.chmod 0744
ENV["GERRIT"] = "example.com"
system "#{bin}/gerrit-setup"
assert_equal "github\norigin\n", shell_output("git remote")
end
end