2011-03-10 05:11:03 +00:00
|
|
|
class Jsawk < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Like awk, but for JSON, using JavaScript objects and arrays"
|
2015-01-13 09:51:42 +00:00
|
|
|
homepage "https://github.com/micha/jsawk"
|
|
|
|
url "https://github.com/micha/jsawk/archive/1.4.tar.gz"
|
|
|
|
sha1 "4f2c962c8a5209764116457682985854400cbf24"
|
2013-03-28 19:06:45 +00:00
|
|
|
|
2015-01-13 09:51:42 +00:00
|
|
|
head "https://github.com/micha/jsawk.git"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2015-01-13 09:51:42 +00:00
|
|
|
depends_on "spidermonkey"
|
2009-11-24 17:10:35 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.install "jsawk"
|
|
|
|
end
|
2015-01-13 09:51:42 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
cmd = %(#{bin}/jsawk 'this.a = "foo"')
|
|
|
|
assert_equal %({"a":"foo"}\n), pipe_output(cmd, "{}")
|
|
|
|
end
|
2009-11-24 17:10:35 +00:00
|
|
|
end
|