legit 0.4.1

Closes #17872.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
This commit is contained in:
ilovezfs 2017-09-09 08:30:14 -07:00 committed by Andrew Janke
parent 6e10fd79f1
commit e0af6d0a9d

View file

@ -3,8 +3,8 @@ class Legit < Formula
desc "Command-line interface for Git, optimized for workflow simplicity"
homepage "https://www.git-legit.org/"
url "https://github.com/kennethreitz/legit/archive/v0.2.1.tar.gz"
sha256 "3b30e47262f3a727cc7aeb7e4842d82e9e2f9cc29145a361c097d7cc372a9a66"
url "https://files.pythonhosted.org/packages/01/92/d7f9a6ccba82e996eb2cb23f33ebb0adf1ca1692b098f338cc0014f18a3b/legit-0.4.1.tar.gz"
sha256 "642377c8a6577841d6218d52ce4f2487ea9e0495397a794ae6073d8695dbf833"
head "https://github.com/kennethreitz/legit.git", :branch => "develop"
bottle do
@ -16,6 +16,11 @@ class Legit < Formula
depends_on :python if MacOS.version <= :snow_leopard
resource "appdirs" do
url "https://files.pythonhosted.org/packages/bd/66/0a7f48a0f3fb1d3a4072bceb5bbd78b1a6de4d801fb7135578e7c7b1f563/appdirs-1.4.0.tar.gz"
sha256 "8fc245efb4387a4e3e0ac8ebcc704582df7d72ff6a42a53f5600bbb18fdaadc5"
end
resource "args" do
url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz"
sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814"
@ -26,14 +31,24 @@ class Legit < Formula
sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa"
end
resource "gitdb" do
url "https://files.pythonhosted.org/packages/e3/95/7e5d7261feb46c0539ac5e451be340ddd64d78c5118f2d893b052c76fe8c/gitdb-0.6.4.tar.gz"
sha256 "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
resource "gitdb2" do
url "https://files.pythonhosted.org/packages/5c/bb/ab74c6914e3b570ab2e960fda17a01aec93474426eecd3b34751ba1c3b38/gitdb2-2.0.0.tar.gz"
sha256 "b9f3209b401b8b4da5f94966c9c17650e66b7474ee5cd2dde5d983d1fba3ab66"
end
resource "GitPython" do
url "https://files.pythonhosted.org/packages/cb/a0/9b063d09bbc847b98df115571041287d7e38ff1b45ed1c91534d15057cf6/GitPython-2.0.8.tar.gz"
sha256 "7c03d1130f903aafba6ae5b89ccf8eb433a995cd3120cbb781370e53fc4eb222"
url "https://files.pythonhosted.org/packages/21/13/8d0981cee1c5b9dd7fa9f836ed7c304891686f300572c03a49e52c07c04c/GitPython-2.1.1.tar.gz"
sha256 "e96f8e953cf9fee0a7599fc587667591328760b6341a0081ef311a942fc96204"
end
resource "packaging" do
url "https://files.pythonhosted.org/packages/c6/70/bb32913de251017e266c5114d0a645f262fb10ebc9bf6de894966d124e35/packaging-16.8.tar.gz"
sha256 "5d50835fdf0a7edf0b55e311b7c887786504efea1177abd7e69329a8e5ea619e"
end
resource "pyparsing" do
url "https://files.pythonhosted.org/packages/38/bb/bf325351dd8ab6eb3c3b7c07c3978f38b2103e2ab48d59726916907cd6fb/pyparsing-2.1.10.tar.gz"
sha256 "811c3e7b0031021137fc83e051795025fcb98674d07eb8fe922ba4de53d39188"
end
resource "six" do
@ -41,9 +56,9 @@ class Legit < Formula
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
end
resource "smmap" do
url "https://files.pythonhosted.org/packages/bc/aa/b744b3761fff1b10579df996a2d2e87f124ae07b8336e37edc89cc502f86/smmap-0.9.0.tar.gz"
sha256 "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
resource "smmap2" do
url "https://files.pythonhosted.org/packages/83/ce/e5b3aee7ca420b0ab24d4fcc2aa577f7aa6ea7e9306fafceabee3e8e4703/smmap2-2.0.1.tar.gz"
sha256 "5c9fd3ac4a30b85d041a8bd3779e16aa704a161991e74b9a46692bc368e68752"
end
def install
@ -60,11 +75,17 @@ class Legit < Formula
email = notacat@hotmail.cat
EOS
system "git", "init"
touch "foo"
(testpath/"foo").write("woof")
system "git", "add", "foo"
system "git", "commit", "-m", "init"
system "git", "remote", "add", "origin", "https://github.com/git/git.git"
system "#{bin}/legit", "sprout", "test"
assert_match(/test/, shell_output("#{bin}/legit branches"))
system "git", "branch", "test"
inreplace "foo", "woof", "meow"
assert_match "test", shell_output("#{bin}/legit branches")
output = shell_output("#{bin}/legit switch test")
assert_equal "Switched to branch 'test'", output.strip.lines.last
assert_equal "woof", (testpath/"foo").read
system "git", "stash", "pop"
assert_equal "meow", (testpath/"foo").read
end
end