2013-10-11 07:06:37 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Q < Formula
|
|
|
|
homepage 'https://github.com/harelba/q'
|
2014-02-21 16:12:49 +00:00
|
|
|
url 'https://github.com/harelba/q/archive/1.1.7.tar.gz'
|
|
|
|
sha1 '088a4f267167481ae0c0825ad410c897aeaab9e8'
|
2013-10-11 07:06:37 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.install 'q'
|
|
|
|
end
|
2014-02-21 18:22:33 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
IO.popen("#{bin}/q 'select sum(c1) from -'", "w+") do |pipe|
|
|
|
|
1.upto(100) { |i| pipe.puts i }
|
|
|
|
pipe.close_write
|
|
|
|
assert_equal "5050\n", pipe.read
|
|
|
|
end
|
|
|
|
end
|
2013-10-11 07:06:37 +00:00
|
|
|
end
|
|
|
|
|