2014-05-04 19:12:41 +00:00
|
|
|
require "formula"
|
2013-10-11 07:06:37 +00:00
|
|
|
|
|
|
|
class Q < Formula
|
2014-05-04 19:12:41 +00:00
|
|
|
homepage "https://github.com/harelba/q"
|
2014-12-13 15:39:16 +00:00
|
|
|
url "https://github.com/harelba/q/archive/1.5.0.tar.gz"
|
|
|
|
sha1 "772c1bc7a49d725042ffc130e3c9328fc9da67dc"
|
2013-10-11 07:06:37 +00:00
|
|
|
|
|
|
|
def install
|
2014-05-04 19:12:41 +00:00
|
|
|
bin.install "bin/q"
|
2013-10-11 07:06:37 +00:00
|
|
|
end
|
2014-02-21 18:22:33 +00:00
|
|
|
|
|
|
|
test do
|
2014-05-04 19:12:41 +00:00
|
|
|
output = shell_output("seq 1 100 | #{bin}/q 'select sum(c1) from -'")
|
|
|
|
assert_equal "5050\n", output
|
2014-02-21 18:22:33 +00:00
|
|
|
end
|
2013-10-11 07:06:37 +00:00
|
|
|
end
|
|
|
|
|