homebrew-core/Formula/jsonpp.rb

26 lines
560 B
Ruby
Raw Normal View History

require 'formula'
class Jsonpp < Formula
2013-04-07 02:34:41 +00:00
homepage 'http://jmhodges.github.io/jsonpp/'
url 'https://github.com/jmhodges/jsonpp/releases/v1.2.0/715/jsonpp-1.2.0-osx-x86_64.tar.gz'
version '1.2.0'
sha1 '422d5b2cefa92923d2fbef9afe1324d72134509e'
def install
bin.install 'jsonpp'
end
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
end