2009-12-11 16:13:57 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Hub < Formula
|
2013-07-13 01:22:29 +00:00
|
|
|
homepage 'http://hub.github.com/'
|
2014-03-01 00:18:35 +00:00
|
|
|
url 'https://github.com/github/hub/archive/v1.12.0.tar.gz'
|
|
|
|
sha1 '195b7c92b49286623baa4d01ab53b8a898b484a2'
|
2013-07-09 20:53:02 +00:00
|
|
|
head 'https://github.com/github/hub.git'
|
2012-11-22 18:58:28 +00:00
|
|
|
|
2013-12-22 01:18:21 +00:00
|
|
|
option 'without-completions', 'Disable bash/zsh completions'
|
|
|
|
|
2009-12-11 16:13:57 +00:00
|
|
|
def install
|
2014-02-21 05:41:07 +00:00
|
|
|
ENV['GIT_DIR'] = cached_download/'.git' if build.head?
|
2013-12-22 01:18:21 +00:00
|
|
|
|
2013-01-27 22:38:17 +00:00
|
|
|
rake "install", "prefix=#{prefix}"
|
2013-12-22 01:18:21 +00:00
|
|
|
|
|
|
|
if build.with? 'completions'
|
|
|
|
bash_completion.install 'etc/hub.bash_completion.sh'
|
|
|
|
zsh_completion.install 'etc/hub.zsh_completion' => '_hub'
|
|
|
|
end
|
2012-03-20 22:51:50 +00:00
|
|
|
end
|
|
|
|
|
2013-01-27 22:38:17 +00:00
|
|
|
test do
|
|
|
|
HOMEBREW_REPOSITORY.cd do
|
2013-12-22 01:18:21 +00:00
|
|
|
assert_equal 'bin/brew', `#{bin}/hub ls-files -- bin`.strip
|
2012-07-06 08:37:57 +00:00
|
|
|
end
|
|
|
|
end
|
2009-12-11 16:13:57 +00:00
|
|
|
end
|