From 976783207a219d74acc556c20e496aa696da501d Mon Sep 17 00:00:00 2001 From: Paul Merrill Date: Fri, 16 Aug 2019 13:30:28 -0700 Subject: [PATCH] msgpack-tools 0.6 (new formula) Closes #43216. Signed-off-by: FX Coudert --- Formula/msgpack-tools.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Formula/msgpack-tools.rb diff --git a/Formula/msgpack-tools.rb b/Formula/msgpack-tools.rb new file mode 100644 index 0000000000..c943d7ba5a --- /dev/null +++ b/Formula/msgpack-tools.rb @@ -0,0 +1,19 @@ +class MsgpackTools < Formula + desc "Command-line tools for converting between MessagePack and JSON" + homepage "https://github.com/ludocode/msgpack-tools" + url "https://github.com/ludocode/msgpack-tools/releases/download/v0.6/msgpack-tools-0.6.tar.gz" + sha256 "98c8b789dced626b5b48261b047e2124d256e5b5d4fbbabdafe533c0bd712834" + + depends_on "cmake" => :build + + def install + system "cmake", ".", *std_cmake_args + system "make", "install", "PREFIX=#{prefix}/" + end + + test do + json_data = '{"hello":"world"}' + assert_equal json_data, + pipe_output("#{bin}/json2msgpack | #{bin}/msgpack2json", json_data, 0) + end +end