2015-02-07 17:58:09 +00:00
|
|
|
class Envv < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Shell-independent handling of environment variables"
|
2015-02-07 17:58:09 +00:00
|
|
|
homepage "https://github.com/jakewendt/envv#readme"
|
|
|
|
url "https://github.com/jakewendt/envv/archive/v1.7.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "1db05b46904e0cc4d777edf3ea14665f6157ade0567359e28663b5b00f6fa59a"
|
2015-02-07 17:58:09 +00:00
|
|
|
|
2015-02-08 04:23:06 +00:00
|
|
|
bottle do
|
2016-02-24 01:28:12 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "3b2fb0b35749280461b3982797ceea34bfa42d63cb5c6547986cf106669ee744" => :el_capitan
|
2015-11-19 15:45:31 +00:00
|
|
|
sha256 "90a718606ec61e5a0e494d3e41b7d87048de803567f4ba2c65231fe41880bd97" => :yosemite
|
|
|
|
sha256 "9ac7617d6475a67c60604fcd72d0ae1a5515df331944e8fb2c2a9223c16e3504" => :mavericks
|
|
|
|
sha256 "333dd38f6cc080740ca155abcb6e9aa40be46d83ccdced16435cb9c5faf8b518" => :mountain_lion
|
2015-02-08 04:23:06 +00:00
|
|
|
end
|
|
|
|
|
2015-02-07 17:58:09 +00:00
|
|
|
def install
|
|
|
|
system "make"
|
|
|
|
|
|
|
|
bin.install "envv"
|
|
|
|
man1.install "envv.1"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
ENV["mylist"] = "A:B:C"
|
|
|
|
assert_equal "mylist=A:C; export mylist", shell_output("#{bin}/envv del mylist B").strip
|
|
|
|
assert_equal "mylist=B:C; export mylist", shell_output("#{bin}/envv del mylist A").strip
|
|
|
|
assert_equal "mylist=A:B; export mylist", shell_output("#{bin}/envv del mylist C").strip
|
|
|
|
|
|
|
|
assert_equal "", shell_output("#{bin}/envv add mylist B").strip
|
|
|
|
assert_equal "mylist=B:A:C; export mylist", shell_output("#{bin}/envv add mylist B 1").strip
|
|
|
|
assert_equal "mylist=A:C:B; export mylist", shell_output("#{bin}/envv add mylist B 99").strip
|
|
|
|
|
|
|
|
assert_equal "mylist=A:B:C:D; export mylist", shell_output("#{bin}/envv add mylist D").strip
|
|
|
|
assert_equal "mylist=D:A:B:C; export mylist", shell_output("#{bin}/envv add mylist D 1").strip
|
|
|
|
assert_equal "mylist=A:B:D:C; export mylist", shell_output("#{bin}/envv add mylist D 3").strip
|
|
|
|
end
|
|
|
|
end
|