From 85f052cd33829f68f8e11280c8ebf3149dd682f8 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 12 Nov 2016 11:42:29 +0000 Subject: [PATCH] jsonlint 1.6.0 (new formula) Installable with `npm` but widely used so let's include it. Closes #6848. Signed-off-by: Mike McQuaid --- Formula/jsonlint.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Formula/jsonlint.rb diff --git a/Formula/jsonlint.rb b/Formula/jsonlint.rb new file mode 100644 index 0000000000..fb14ce91b4 --- /dev/null +++ b/Formula/jsonlint.rb @@ -0,0 +1,20 @@ +require "language/node" + +class Jsonlint < Formula + desc "JSON parser and validator with a CLI" + homepage "https://github.com/zaach/jsonlint" + url "https://github.com/zaach/jsonlint/archive/v1.6.0.tar.gz" + sha256 "a7f763575d3e3ecc9b2a24b18ccbad2b4b38154c073ac63ebc9517c4cb2de06f" + + depends_on "node" + + def install + system "npm", "install", *Language::Node.std_npm_install_args(libexec) + bin.install_symlink Dir["#{libexec}/bin/*"] + end + + test do + (testpath/"test.json").write('{"name": "test"}') + system "#{bin}/jsonlint", "test.json" + end +end