homebrew-core/Formula/docker-squash.rb

71 lines
3.2 KiB
Ruby

class DockerSquash < Formula
include Language::Python::Virtualenv
desc "Docker image squashing tool"
homepage "https://github.com/goldmann/docker-squash"
url "https://files.pythonhosted.org/packages/8c/b4/429be44bdb8ad42bbca4ab4a813f771ef517b00a8d733feb6d62716c4209/docker-squash-1.0.8.tar.gz"
sha256 "f677bc9129d1156516454b0b334cdc2642f7b9a3328dca3a7477c43ac5ee23a9"
license "MIT"
revision 3
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "99a172715fd8867c336673dd127525bcf10074050d0d97173e26abdbe393d0c5"
sha256 cellar: :any_skip_relocation, big_sur: "5037e7ed624b62a548cb2d06398c78f4737c55c2203e59654886fef6c7d2ed3f"
sha256 cellar: :any_skip_relocation, catalina: "8eba8e475bd16f666d5dcae8c86c6903a6284714fd39827ef022846436482ddc"
sha256 cellar: :any_skip_relocation, mojave: "e8f93445d63859ffbe3a7b3607f736c8171cbb34f5277dc99f9e5b431726d1bf"
sha256 cellar: :any_skip_relocation, high_sierra: "b808d930d8ac2950359fd87047dec4c8a04b771f54c41c632916761cff647d8f"
end
depends_on "python@3.9"
resource "certifi" do
url "https://files.pythonhosted.org/packages/41/bf/9d214a5af07debc6acf7f3f257265618f1db242a3f8e49a9b516f24523a6/certifi-2019.11.28.tar.gz"
sha256 "25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
end
resource "chardet" do
url "https://files.pythonhosted.org/packages/fc/bb/a5768c230f9ddb03acc9ef3f0d4a3cf93462473795d18e9535498c8f929d/chardet-3.0.4.tar.gz"
sha256 "84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"
end
resource "docker" do
url "https://files.pythonhosted.org/packages/de/54/a822d7116ff2f726f3da2b3e6c87659657bdcb7a36e382860ed505ed5e45/docker-4.1.0.tar.gz"
sha256 "6e06c5e70ba4fad73e35f00c55a895a448398f3ada7faae072e2bb01348bafc1"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/ad/13/eb56951b6f7950cadb579ca166e448ba77f9d24efc03edd7e55fa57d04b7/idna-2.8.tar.gz"
sha256 "c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407"
end
resource "requests" do
url "https://files.pythonhosted.org/packages/01/62/ddcf76d1d19885e8579acb1b1df26a852b03472c0e46d2b959a714c90608/requests-2.22.0.tar.gz"
sha256 "11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4"
end
resource "six" do
url "https://files.pythonhosted.org/packages/94/3e/edcf6fef41d89187df7e38e868b2dd2182677922b600e880baad7749c865/six-1.13.0.tar.gz"
sha256 "30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/ad/fc/54d62fa4fc6e675678f9519e677dfc29b8964278d75333cf142892caf015/urllib3-1.25.7.tar.gz"
sha256 "f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745"
end
resource "websocket-client" do
url "https://files.pythonhosted.org/packages/8b/0f/52de51b9b450ed52694208ab952d5af6ebbcbce7f166a48784095d930d8c/websocket_client-0.57.0.tar.gz"
sha256 "d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010"
end
def install
virtualenv_install_with_resources
end
test do
ENV["DOCKER_HOST"] = "does-not-exist:1234"
output = shell_output("#{bin}/docker-squash not_an_image 2>&1", 1)
assert_match "Could not create Docker client", output
end
end