homebrew-core/Formula/jc.rb

47 lines
2.0 KiB
Ruby

class Jc < Formula
include Language::Python::Virtualenv
desc "Serializes the output of command-line tools to structured JSON output"
homepage "https://github.com/kellyjonbrazil/jc"
url "https://files.pythonhosted.org/packages/7a/66/b3615391a0505ed535c304def859e9bef5b65997d52d9608954bca948ef8/jc-1.11.8.tar.gz"
sha256 "2cd97b995dc485ccf135ecd84cef56348b0345b61b40f4f1f8e5a7c3681fe0dd"
bottle do
cellar :any_skip_relocation
sha256 "60a60aeaf7f54b9e6423524435c7b453ac6c77690bb93c143043dd03cdb894a1" => :catalina
sha256 "7dd80c7e1e7d42224431f6f02f77408f44c3f3cfd3b139a4bc766b95b832dcb5" => :mojave
sha256 "cee1045e557a0383b06a786c2602505dfac9b9e91d728221770675397d57a61e" => :high_sierra
end
depends_on "python@3.8"
resource "ruamel.yaml" do
url "https://files.pythonhosted.org/packages/16/8b/54a26c1031595e5edd0e616028b922d78d8ffba8bc775f0a4faeada846cc/ruamel.yaml-0.16.10.tar.gz"
sha256 "099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954"
end
resource "ruamel.yaml.clib" do
url "https://files.pythonhosted.org/packages/92/28/612085de3fae9f82d62d80255d9f4cf05b1b341db1e180adcf28c1bf748d/ruamel.yaml.clib-0.2.0.tar.gz"
sha256 "b66832ea8077d9b3f6e311c4a53d06273db5dc2db6e8a908550f3c14d67e718c"
end
resource "xmltodict" do
url "https://files.pythonhosted.org/packages/58/40/0d783e14112e064127063fbf5d1fe1351723e5dfe9d6daad346a305f6c49/xmltodict-0.12.0.tar.gz"
sha256 "50d8c638ed7ecb88d90561beedbf720c9b4e851a9fa6c47ebd64e99d166d8a21"
end
resource "Pygments" do
url "https://files.pythonhosted.org/packages/6e/4d/4d2fe93a35dfba417311a4ff627489a947b01dc0cc377a3673c00cf7e4b2/Pygments-2.6.1.tar.gz"
sha256 "647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44"
end
def install
virtualenv_install_with_resources
end
test do
assert_equal "[{\"header1\": \"data1\", \"header2\": \"data2\"}]\n", \
pipe_output("#{bin}/jc --csv", "header1, header2\n data1, data2")
end
end