2011-08-22 21:05:38 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Jsonpp < Formula
|
2013-04-07 02:34:41 +00:00
|
|
|
homepage 'http://jmhodges.github.io/jsonpp/'
|
2013-07-03 09:07:43 +00:00
|
|
|
url 'https://github.com/jmhodges/jsonpp/releases/v1.2.0/715/jsonpp-1.2.0-osx-x86_64.zip'
|
|
|
|
version '1.2.0'
|
|
|
|
sha1 '422d5b2cefa92923d2fbef9afe1324d72134509e'
|
2011-08-22 21:05:38 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
bin.install 'jsonpp'
|
|
|
|
end
|
2014-02-11 01:01:58 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
IO.popen("#{bin}/jsonpp", "w+") do |pipe|
|
|
|
|
pipe.puts '{"foo":"bar","baz":"qux"}'
|
|
|
|
pipe.close_write
|
|
|
|
assert_equal <<-EOS.undent, pipe.read
|
|
|
|
{
|
|
|
|
"foo": "bar",
|
|
|
|
"baz": "qux"
|
|
|
|
}
|
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
2011-08-22 21:05:38 +00:00
|
|
|
end
|