2014-06-21 22:47:18 +00:00
|
|
|
class Httpie < Formula
|
2015-08-01 09:35:45 +00:00
|
|
|
desc "User-friendly cURL replacement (command-line HTTP client)"
|
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"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "1f0b0b6563de25bad0ed190d62f1130573124201382824756d015b1422a234cc"
|
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
|
2015-09-20 20:30:40 +00:00
|
|
|
cellar :any_skip_relocation
|
|
|
|
sha256 "d707a541466d018c25214ac5c37db81be6f3c55f9a8a7ddfb4e9a40771e207e0" => :el_capitan
|
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"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "7320919084e6dac8f4540638a46447a3bd730fca172afc17d2c03eed22cf4f51"
|
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-09-21 07:40:50 +00:00
|
|
|
assert_match "PYTHONPATH",
|
|
|
|
shell_output("#{bin}/http https://raw.githubusercontent.com/Homebrew/homebrew/master/Library/Formula/httpie.rb")
|
2014-06-21 22:47:18 +00:00
|
|
|
end
|
|
|
|
end
|