2012-02-13 18:26:44 +00:00
|
|
|
class Autoenv < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Per-project, per-directory shell environments"
|
2015-08-03 12:55:31 +00:00
|
|
|
homepage "https://github.com/kennethreitz/autoenv"
|
2016-10-18 13:57:06 +00:00
|
|
|
url "https://github.com/kennethreitz/autoenv/archive/v0.2.1.tar.gz"
|
|
|
|
sha256 "d10ee4d916a11a664453e60864294fec221c353f8ad798aa0aa6a2d2c5d5b318"
|
2015-08-03 12:55:31 +00:00
|
|
|
head "https://github.com/kennethreitz/autoenv.git"
|
2012-02-13 18:26:44 +00:00
|
|
|
|
2015-10-23 08:28:38 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2012-02-13 18:26:44 +00:00
|
|
|
def install
|
|
|
|
prefix.install "activate.sh"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2013-06-02 18:23:39 +00:00
|
|
|
To finish the installation, source activate.sh in your shell:
|
|
|
|
source #{opt_prefix}/activate.sh
|
2012-02-13 18:26:44 +00:00
|
|
|
EOS
|
|
|
|
end
|
2017-04-07 03:54:48 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test/.env").write "echo it works\n"
|
|
|
|
testcmd = "yes | bash -c '. #{prefix}/activate.sh; autoenv_cd test'"
|
|
|
|
assert_match "it works", shell_output(testcmd)
|
|
|
|
end
|
2012-02-13 18:26:44 +00:00
|
|
|
end
|