2019-10-14 17:23:07 +00:00
|
|
|
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"
|
2019-12-01 22:25:35 +00:00
|
|
|
url "https://github.com/trek10inc/awsume/archive/4.1.10.tar.gz"
|
|
|
|
sha256 "962b4f7ce25c4647fdc5c286a78cc8a1bf65d75e799116084b4b362a63ef7eb2"
|
2019-10-14 17:23:07 +00:00
|
|
|
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"
|
2019-10-14 17:23:07 +00:00
|
|
|
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")
|
2019-12-01 22:25:35 +00:00
|
|
|
|
2019-10-14 17:23:07 +00:00
|
|
|
file_path = File.expand_path("~/.awsume/config.yaml")
|
|
|
|
shell_output(File.exist?(file_path))
|
2019-12-01 22:25:35 +00:00
|
|
|
|
|
|
|
assert_match "PROFILE TYPE SOURCE MFA? REGION ACCOUNT", shell_output("#{bin}/awsume --list-profiles 2>&1")
|
2019-10-14 17:23:07 +00:00
|
|
|
end
|
|
|
|
end
|