homebrew-core/Formula/awsume.rb

36 lines
1.3 KiB
Ruby
Raw Normal View History

class Awsume < Formula
include Language::Python::Virtualenv
desc "Utility for easily assuming AWS IAM roles from the command-line"
homepage "https://www.trek10.com/blog/awsume-aws-assume-made-awesome"
url "https://github.com/trek10inc/awsume/archive/4.0.0.tar.gz"
sha256 "8cc7d466beef1c32b3397ed62cba22f7a309ab1650317cef6873cf019be7d25e"
2019-11-18 10:36:54 +00:00
revision 1
head "https://github.com/trek10inc/awsume.git"
2019-10-21 19:00:04 +00:00
bottle do
cellar :any_skip_relocation
2019-11-18 11:40:04 +00:00
sha256 "eaa4cc337c25e3f23432f12385f4635e4fe3d62ff42b7b6f7fbc4a15fcb555f1" => :catalina
sha256 "1b4fa7a372173433d6354595a8247eca0b9f4992737c597a648f7e4d016ab213" => :mojave
sha256 "436ee2e517851f7ad0c02356a75171106f560484f7d4e05b97a196cf01d2c568" => :high_sierra
2019-10-21 19:00:04 +00:00
end
2019-11-18 10:36:54 +00:00
depends_on "openssl@1.1"
depends_on "python"
uses_from_macos "sqlite"
def install
venv = virtualenv_create(libexec, "python3")
system libexec/"bin/pip", "install", "-v", "--no-binary", ":all:",
"--ignore-installed", buildpath
system libexec/"bin/pip", "uninstall", "-y", "awsume"
venv.pip_install_and_link buildpath
end
test do
assert_includes "4.0.0", shell_output("#{bin}/awsume -v")
file_path = File.expand_path("~/.awsume/config.yaml")
shell_output(File.exist?(file_path))
end
end