thefuck 3.0

* Add new dependency: decorator-4.0.2
 * Update dependency: psutil-3.2.1

Closes Homebrew/homebrew#43784.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
Pablo Santiago Blum de Aguiar 2015-09-10 13:29:11 -03:00 committed by Alex Dunn
parent a176582a26
commit 39128eccf6

View file

@ -1,8 +1,8 @@
class Thefuck < Formula
desc "Programatically correct mistyped console commands"
homepage "https://github.com/nvbn/thefuck"
url "https://pypi.python.org/packages/source/t/thefuck/thefuck-2.8.tar.gz"
sha256 "40ac6c27974fc749557fe37f00e29100c26f25f038f3e63034f721442ac0b489"
url "https://pypi.python.org/packages/source/t/thefuck/thefuck-3.0.tar.gz"
sha256 "7ff80b3ecaf063c6ea742117bcab111d3d6136887bfa06586ae0f303cbc85381"
head "https://github.com/nvbn/thefuck.git"
@ -16,8 +16,8 @@ class Thefuck < Formula
depends_on :python if MacOS.version <= :snow_leopard
resource "psutil" do
url "https://pypi.python.org/packages/source/p/psutil/psutil-3.1.1.tar.gz"
sha256 "d3290bd4a027fa0b3a2e2ee87728056fe49d4112640e2b8c2ea4dd94ba0cf057"
url "https://pypi.python.org/packages/source/p/psutil/psutil-3.2.1.tar.gz"
sha256 "7f6bea8bfe2e5cfffd0f411aa316e837daadced1893b44254bb9a38a654340f7"
end
resource "pathlib" do
@ -40,10 +40,15 @@ class Thefuck < Formula
sha256 "0994a58df27ea5dc523782a601357a2198b7493dcc99a30d51827a23585b5b1d"
end
resource "decorator" do
url "https://pypi.python.org/packages/source/d/decorator/decorator-4.0.2.tar.gz"
sha256 "1a089279d5de2471c47624d4463f2e5b3fc6a2cf65045c39bf714fc461a25206"
end
def install
xy = Language::Python.major_minor_version "python"
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python#{xy}/site-packages"
%w[setuptools pathlib psutil colorama six].each do |r|
%w[setuptools pathlib psutil colorama six decorator].each do |r|
resource(r).stage do
system "python", *Language::Python.setup_install_args(libexec/"vendor")
end
@ -66,13 +71,10 @@ class Thefuck < Formula
end
test do
assert_equal "The Fuck #{version}", shell_output("#{bin}/thefuck --version 2>&1").chomp
ENV["THEFUCK_REQUIRE_CONFIRMATION"] = "false"
assert_equal "thefuck #{version}", shell_output("#{bin}/thefuck --version 2>&1").chomp
assert_match /.+TF_ALIAS.+thefuck.+/, shell_output("#{bin}/thefuck --alias").chomp
IO.popen("#{bin}/thefuck git branchh 2>&1", "r+") do |pipe|
pipe.puts "\n"
pipe.close_write
assert_match /git branch.+/, pipe.gets.chomp
pipe.close
end
assert_match /git branch/, shell_output("#{bin}/thefuck git branchh").chomp
assert_match /echo ok/, shell_output("#{bin}/thefuck echho ok").chomp
end
end