homebrew-core/Formula/credstash.rb
2017-09-23 19:10:16 +02:00

105 lines
4.8 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://files.pythonhosted.org/packages/85/75/14cdb36ad4e9356729db2235a0f6db88816ef49c506665199096d98d2a2b/credstash-1.13.3.tar.gz"
sha256 "f1f433133dbf117c71444a1c367da25f5496f5c1d0fe2e205a50e9a233814df4"
head "https://github.com/fugue/credstash.git"
bottle do
cellar :any
sha256 "a3c5f664976e2486857cec385b85a6fe22f4ef6b940238b095ca665a48254e77" => :high_sierra
sha256 "a730490ff82b2b1db7419b2ec31d78b0ac08ee99c75118dcbea4b77b159914ad" => :sierra
sha256 "665cba805afe41674b13e9d32a629ad97587cfdca8fbecc05ce9919732e887af" => :el_capitan
end
depends_on :python if MacOS.version <= :snow_leopard
depends_on "openssl"
resource "boto3" do
url "https://files.pythonhosted.org/packages/58/61/50d2e459049c5dbc963473a71fae928ac0e58ffe3fe7afd24c817ee210b9/boto3-1.4.4.tar.gz"
sha256 "518f724c4758e5a5bed114fbcbd1cf470a15306d416ff421a025b76f1d390939"
end
resource "cryptography" do
url "https://files.pythonhosted.org/packages/2a/0c/31bd69469e90035381f0197b48bf71032991d9f07a7e444c311b4a23a3df/cryptography-1.9.tar.gz"
sha256 "5518337022718029e367d982642f3e3523541e098ad671672a90b82474c84882"
end
resource "s3transfer" do
url "https://files.pythonhosted.org/packages/8b/13/517e8ec7c13f0bb002be33fbf53c4e3198c55bb03148827d72064426fe6e/s3transfer-0.1.10.tar.gz"
sha256 "ba1a9104939b7c0331dc4dd234d79afeed8b66edce77bbeeecd4f56de74a0fc1"
end
resource "jmespath" do
url "https://files.pythonhosted.org/packages/e5/21/795b7549397735e911b032f255cff5fb0de58f96da794274660bca4f58ef/jmespath-0.9.3.tar.gz"
sha256 "6a81d4c9aa62caf061cb517b4d9ad1dd300374cd4706997aff9cd6aedd61fc64"
end
resource "botocore" do
url "https://files.pythonhosted.org/packages/68/40/a87c3a397b733d7ba663dccec7aee9fba8a64d85f1876e355084bca8f87b/botocore-1.5.77.tar.gz"
sha256 "ce023a571158d5ad442e4bb036b7ec066df15bebccd4c13013088d308bf31741"
end
resource "cffi" do
url "https://files.pythonhosted.org/packages/5b/b9/790f8eafcdab455bcd3bd908161f802c9ce5adbf702a83aa7712fcc345b7/cffi-1.10.0.tar.gz"
sha256 "b3b02911eb1f6ada203b0763ba924234629b51586f72a21faacc638269f4ced5"
end
resource "ipaddress" do
url "https://files.pythonhosted.org/packages/4e/13/774faf38b445d0b3a844b65747175b2e0500164b7c28d78e34987a5bfe06/ipaddress-1.0.18.tar.gz"
sha256 "5d8534c8e185f2d8a1fda1ef73f2c8f4b23264e8e30063feeb9511d492a413e1"
end
resource "enum34" do
url "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"
sha256 "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1"
end
resource "six" do
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
end
resource "asn1crypto" do
url "https://files.pythonhosted.org/packages/67/14/5d66588868c4304f804ebaff9397255f6ec5559e46724c2496e0f26e68d6/asn1crypto-0.22.0.tar.gz"
sha256 "cbbadd640d3165ab24b06ef25d1dca09a3441611ac15f6a6b452474fdf0aed1a"
end
resource "idna" do
url "https://files.pythonhosted.org/packages/d8/82/28a51052215014efc07feac7330ed758702fc0581347098a81699b5281cb/idna-2.5.tar.gz"
sha256 "3cb5ce08046c4e3a560fc02f138d0ac63e00f8ce5901a56b32ec8b7994082aab"
end
resource "futures" do
url "https://files.pythonhosted.org/packages/cc/26/b61e3a4eb50653e8a7339d84eeaa46d1e93b92951978873c220ae64d0733/futures-3.1.1.tar.gz"
sha256 "51ecb45f0add83c806c68e4b06106f90db260585b25ef2abfcda0bd95c0132fd"
end
resource "docutils" do
url "https://files.pythonhosted.org/packages/05/fd/d62c2944d9df894b07eaa7430decc4c80977e644922a85fbdec337d6af82/docutils-0.14rc1.tar.gz"
sha256 "7ee93a6fbab0f46bdda4d94384de40a04bbbbb53dbd019ce0fbbbfed22f6589a"
end
resource "python-dateutil" do
url "https://files.pythonhosted.org/packages/51/fc/39a3fbde6864942e8bb24c93663734b74e281b984d1b8c4f95d64b0c21f6/python-dateutil-2.6.0.tar.gz"
sha256 "62a2f8df3d66f878373fd0072eacf4ee52194ba302e00082828e0d263b0418d2"
end
resource "pycparser" do
url "https://files.pythonhosted.org/packages/be/64/1bb257ffb17d01f4a38d7ce686809a736837ad4371bcc5c42ba7a715c3ac/pycparser-2.17.tar.gz"
sha256 "0aac31e917c24cb3357f5a4d5566f2cc91a19ca41862f6c3c22dc60a629673b6"
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 alias/credstash", output
end
end