2012-01-16 16:27:12 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Jshon < Formula
|
|
|
|
homepage 'http://kmkeen.com/jshon/'
|
2013-01-28 04:59:08 +00:00
|
|
|
url 'http://kmkeen.com/jshon/jshon.tar.gz'
|
2012-01-16 16:27:12 +00:00
|
|
|
version '8'
|
2013-01-28 04:59:08 +00:00
|
|
|
sha1 'e8d710f621ed42ab126c921f87bc8906af16cd1d'
|
2012-01-16 16:27:12 +00:00
|
|
|
|
|
|
|
depends_on 'jansson'
|
|
|
|
|
|
|
|
def install
|
|
|
|
system 'make'
|
|
|
|
bin.install 'jshon'
|
|
|
|
man1.install 'jshon.1'
|
|
|
|
end
|
|
|
|
|
2013-03-26 15:45:52 +00:00
|
|
|
test do
|
|
|
|
require 'open3'
|
|
|
|
Open3.popen3("#{bin}/jshon", "-l") do |stdin, stdout, _|
|
|
|
|
stdin.write("[true,false,null]")
|
|
|
|
stdin.close
|
|
|
|
"3" == stdout.read.strip
|
|
|
|
end
|
2012-01-16 16:27:12 +00:00
|
|
|
end
|
|
|
|
end
|