2014-06-21 22:47:18 +00:00
|
|
|
class Httpie < Formula
|
2015-01-11 15:03:58 +00:00
|
|
|
homepage "https://github.com/jakubroztocil/httpie"
|
2015-02-24 07:05:58 +00:00
|
|
|
url "https://github.com/jakubroztocil/httpie/archive/0.9.2.tar.gz"
|
|
|
|
sha1 "39e9aab7f6f27973098c22c81fe5b9e7a5866a8b"
|
2015-03-14 21:14:40 +00:00
|
|
|
revision 1
|
2014-06-21 22:47:18 +00:00
|
|
|
|
|
|
|
head "https://github.com/jakubroztocil/httpie.git"
|
|
|
|
|
2014-06-24 13:29:14 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-03-14 22:16:45 +00:00
|
|
|
sha256 "b8fc458dec0f25a47998302c0bdb1c1914a415e023dbd7f3f0cb90dbbd9ca208" => :yosemite
|
|
|
|
sha256 "24d33a99c527f2e8353d1a913106ec9fa78dd422aabecfa7289a7d324dfb9076" => :mavericks
|
|
|
|
sha256 "b8489da61c51c9cdca81dbedbb39f2c36f7f50d532c0cea4520d3751ac47a06a" => :mountain_lion
|
2014-06-24 13:29:14 +00:00
|
|
|
end
|
|
|
|
|
2014-06-21 22:47:18 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
|
|
|
resource "pygments" do
|
2015-01-31 13:02:59 +00:00
|
|
|
url "https://pypi.python.org/packages/source/P/Pygments/Pygments-2.0.2.tar.gz"
|
|
|
|
sha1 "fe2c8178a039b6820a7a86b2132a2626df99c7f8"
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "requests" do
|
2015-03-14 21:14:40 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.6.0.tar.gz"
|
|
|
|
sha256 "1cdbed1f0e236f35ef54e919982c7a338e4fea3786310933d3a7887a04b74d75"
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-01-11 15:03:58 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
|
|
|
%w[pygments requests].each do |r|
|
|
|
|
resource(r).stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
|
|
|
|
|
|
|
bin.install Dir["#{libexec}/bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-01-11 15:03:58 +00:00
|
|
|
output = shell_output("#{bin}/http https://raw.githubusercontent.com/Homebrew/homebrew/master/Library/Formula/httpie.rb")
|
|
|
|
assert output.include?("PYTHONPATH")
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
end
|