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-02-05 23:53:43 +00:00
|
|
|
url 'https://github.com/github/hub/archive/v1.11.2.tar.gz'
|
|
|
|
sha1 '0fa36e9a87c8990aca11f7e0b0e65c3a946686c1'
|
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
|
2013-12-22 01:18:21 +00:00
|
|
|
ENV['GIT_DIR'] = downloader.cached_location/'.git' if build.head?
|
|
|
|
|
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
|