homebrew-core/Formula/credstash.rb
2019-07-27 04:46:29 +08:00

90 lines
3.9 KiB
Ruby

class Credstash < Formula
include Language::Python::Virtualenv
desc "Little utility for managing credentials in the cloud"
homepage "https://github.com/fugue/credstash"
url "https://github.com/fugue/credstash/archive/v1.16.0.tar.gz"
sha256 "2df373675613b4d7b22a8c40ed782b6ced6797c66548a45608992dbf4f0c98a3"
head "https://github.com/fugue/credstash.git"
bottle do
cellar :any
sha256 "07c9653f1e97afcce9ff15c7a9650e13912b643e1ba340f6beecca30eed40f95" => :mojave
sha256 "a0b712fe6e7e5437f9a80793b793fb0854d04e0ccce8610b614a1d7dc0fb0b12" => :high_sierra
sha256 "eb9f597a28dc10790651f4e11fd1537adfc5e4b92a04a53198e7dbd8a804bb0f" => :sierra
end
depends_on "openssl"
depends_on "python"
resource "asn1crypto" do
url "https://files.pythonhosted.org/packages/fc/f1/8db7daa71f414ddabfa056c4ef792e1461ff655c2ae2928a2b675bfed6b4/asn1crypto-0.24.0.tar.gz"
sha256 "9d5c20441baf0cb60a4ac34cc447c6c189024b6b4c6cd7877034f4965c464e49"
end
resource "boto3" do
url "https://files.pythonhosted.org/packages/48/7a/d2ec8dcef4e2e0c830f9b30580c1d99fb4556d4c6abc259ade30304e8e4e/boto3-1.9.196.tar.gz"
sha256 "f80634723c7fb94daa4ef3a9706d6d9552a5da6c2329327cd86884c76cf6e95f"
end
resource "botocore" do
url "https://files.pythonhosted.org/packages/2a/22/3d22a1d53c28b9de14002bf1621ada74ad581f72c953ace5280986a4fdb3/botocore-1.12.196.tar.gz"
sha256 "ef4028943ccab0459086a07e1d6492601e39b440761a325686047981165bbd80"
end
resource "cffi" do
url "https://files.pythonhosted.org/packages/93/1a/ab8c62b5838722f29f3daffcc8d4bd61844aa9b5f437341cc890ceee483b/cffi-1.12.3.tar.gz"
sha256 "041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774"
end
resource "cryptography" do
url "https://files.pythonhosted.org/packages/c2/95/f43d02315f4ec074219c6e3124a87eba1d2d12196c2767fadfdc07a83884/cryptography-2.7.tar.gz"
sha256 "e6347742ac8f35ded4a46ff835c60e68c22a536a8ae5c4422966d06946b6d4c6"
end
resource "docutils" do
url "https://files.pythonhosted.org/packages/84/f4/5771e41fdf52aabebbadecc9381d11dea0fa34e4759b4071244fa094804c/docutils-0.14.tar.gz"
sha256 "51e64ef2ebfb29cae1faa133b3710143496eca21c530f3f71424d77687764274"
end
resource "jmespath" do
url "https://files.pythonhosted.org/packages/2c/30/f0162d3d83e398c7a3b70c91eef61d409dea205fb4dc2b47d335f429de32/jmespath-0.9.4.tar.gz"
sha256 "bde2aef6f44302dfb30320115b17d030798de8c4110e28d5cf6cf91a7a31074c"
end
resource "pycparser" do
url "https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz"
sha256 "a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"
end
resource "python-dateutil" do
url "https://files.pythonhosted.org/packages/ad/99/5b2e99737edeb28c71bcbec5b5dda19d0d9ef3ca3e92e3e925e7c0bb364c/python-dateutil-2.8.0.tar.gz"
sha256 "c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e"
end
resource "s3transfer" do
url "https://files.pythonhosted.org/packages/39/12/150cd55c606ebca6725683642a8e7068cd6af10f837ce5419a9f16b7fb55/s3transfer-0.2.1.tar.gz"
sha256 "6efc926738a3cd576c2a79725fed9afde92378aa5c6a957e3af010cb019fac9d"
end
resource "six" do
url "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz"
sha256 "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73"
end
resource "urllib3" do
url "https://files.pythonhosted.org/packages/4c/13/2386233f7ee40aa8444b47f7463338f3cbdf00c316627558784e3f542f07/urllib3-1.25.3.tar.gz"
sha256 "dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232"
end
def install
virtualenv_install_with_resources
end
test do
ENV["AWS_ACCESS_KEY_ID"] = "test"
ENV["AWS_SECRET_ACCESS_KEY"] = "test"
output = shell_output("#{bin}/credstash put test test 2>&1", 1)
assert_match "Could not generate key using KMS key", output
end
end