2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-06-04 18:21:19 +00:00
|
|
|
|
2013-06-06 23:25:31 +00:00
|
|
|
class Ack < Formula
|
2013-04-20 11:44:05 +00:00
|
|
|
homepage 'http://beyondgrep.com/'
|
2013-12-13 10:06:58 +00:00
|
|
|
url 'http://beyondgrep.com/ack-2.12-single-file'
|
|
|
|
sha1 '667b5f2dd83143848a5bfa47f7ba848cbe556e93'
|
|
|
|
version '2.12'
|
2010-09-01 17:45:26 +00:00
|
|
|
|
|
|
|
def install
|
2014-03-18 21:45:00 +00:00
|
|
|
bin.install "ack-#{version}-single-file" => "ack"
|
2013-04-20 11:44:05 +00:00
|
|
|
system "pod2man", "#{bin}/ack", "ack.1"
|
|
|
|
man1.install "ack.1"
|
2012-04-29 06:30:26 +00:00
|
|
|
end
|
2013-01-27 22:36:42 +00:00
|
|
|
|
|
|
|
test do
|
2014-02-07 17:47:55 +00:00
|
|
|
IO.popen("#{bin}/ack --noenv --nocolor bar -", "w+") do |pipe|
|
|
|
|
pipe.write "foo\nfoo bar\nbaz"
|
|
|
|
pipe.close_write
|
|
|
|
assert_equal "foo bar\n", pipe.read
|
|
|
|
end
|
2013-01-27 22:36:42 +00:00
|
|
|
end
|
2009-09-22 19:10:17 +00:00
|
|
|
end
|