2014-06-01 00:20:24 +00:00
|
|
|
class Fig < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Isolated development environments using Docker"
|
2015-02-28 10:50:00 +00:00
|
|
|
homepage "https://docs.docker.com/compose/"
|
2015-08-12 04:56:23 +00:00
|
|
|
url "https://github.com/docker/compose/archive/1.4.0.tar.gz"
|
|
|
|
sha256 "96875473fdb1cce1d63c4bc21c2bc9bf620820fb3bdf8c590618965733418115"
|
2014-07-18 21:58:46 +00:00
|
|
|
|
2015-02-28 00:52:21 +00:00
|
|
|
bottle do
|
2015-08-12 05:05:48 +00:00
|
|
|
sha256 "8ca0af6c6e0d12bc64cd1af93627f1e201f7666c0626a4fa2603fb3a799aef6a" => :yosemite
|
|
|
|
sha256 "85d0e45da45e8e7ab14bdeccd866825d7a6d857b424a2f652dcc6971284301f2" => :mavericks
|
|
|
|
sha256 "8bf9ab8a86f85433a1c9f2ebbd35b667feb52d3f6135bce98bc11e23516cd841" => :mountain_lion
|
2015-02-28 00:52:21 +00:00
|
|
|
end
|
|
|
|
|
2014-06-01 00:20:24 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
depends_on "libyaml"
|
2015-02-26 01:06:22 +00:00
|
|
|
|
2015-08-26 17:14:57 +00:00
|
|
|
# It's possible that the user wants to manually install Docker and Machine,
|
2015-02-26 01:06:22 +00:00
|
|
|
# for example, they want to compile Docker manually
|
|
|
|
depends_on "docker" => :recommended
|
2015-08-26 17:14:57 +00:00
|
|
|
depends_on "docker-machine" => :recommended
|
2015-02-26 01:06:22 +00:00
|
|
|
|
2015-01-11 14:48:27 +00:00
|
|
|
resource "docker-py" do
|
2015-08-12 04:56:23 +00:00
|
|
|
url "https://pypi.python.org/packages/source/d/docker-py/docker-py-1.3.1.tar.gz"
|
|
|
|
sha256 "743f3fc78f6159d14ac603def6470cf1b4edefc04de8b1ad8c349b380b503f50"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "pyyaml" do
|
2015-01-11 14:48:27 +00:00
|
|
|
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
2015-04-17 09:36:15 +00:00
|
|
|
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
2015-01-11 14:48:27 +00:00
|
|
|
resource "six" do
|
|
|
|
url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
|
2015-04-17 09:36:15 +00:00
|
|
|
sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5"
|
2015-01-11 14:48:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "dockerpty" do
|
2015-06-20 16:10:22 +00:00
|
|
|
url "https://pypi.python.org/packages/source/d/dockerpty/dockerpty-0.3.4.tar.gz"
|
|
|
|
sha256 "a51044cc49089a2408fdf6769a63eebe0b16d91f34716ecee681984446ce467d"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "texttable" do
|
2015-04-17 09:36:15 +00:00
|
|
|
url "https://pypi.python.org/packages/source/t/texttable/texttable-0.8.3.tar.gz"
|
|
|
|
sha256 "f333ac915e7c5daddc7d4877b096beafe74ea88b4b746f82a4b110f84e348701"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
2015-01-11 14:48:27 +00:00
|
|
|
resource "docopt" do
|
|
|
|
url "https://pypi.python.org/packages/source/d/docopt/docopt-0.6.2.tar.gz"
|
2015-04-17 09:36:15 +00:00
|
|
|
sha256 "49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491"
|
2015-01-11 14:48:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "requests" do
|
2015-06-20 16:10:22 +00:00
|
|
|
url "https://pypi.python.org/packages/source/r/requests/requests-2.6.1.tar.gz"
|
|
|
|
sha256 "490b111c824d64b84797a899a4c22618bbc45323ac24a0a0bb4b73a8758e943c"
|
2015-01-11 14:48:27 +00:00
|
|
|
end
|
|
|
|
|
2014-06-01 00:20:24 +00:00
|
|
|
resource "websocket-client" do
|
2015-07-15 13:27:48 +00:00
|
|
|
url "https://github.com/liris/websocket-client/archive/v0.32.0.tar.gz"
|
|
|
|
sha256 "255d07ffa677f571b5f51c11703f2f4bd5f331b58442677bcb4395dfa1809a5f"
|
2015-04-17 09:36:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource "backports.ssl_match_hostname" do
|
|
|
|
url "https://pypi.python.org/packages/source/b/backports.ssl_match_hostname/backports.ssl_match_hostname-3.4.0.2.tar.gz"
|
|
|
|
sha256 "07410e7fb09aab7bdaf5e618de66c3dac84e2e3d628352814dc4c37de321d6ae"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2015-01-11 14:48:27 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
2014-07-18 22:21:48 +00:00
|
|
|
resources.each do |r|
|
2015-01-11 14:48:27 +00:00
|
|
|
r.stage do
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
|
|
|
end
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
2015-01-11 14:48:27 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
|
|
|
system "python", *Language::Python.setup_install_args(libexec)
|
2014-06-01 00:20:24 +00:00
|
|
|
|
2015-03-04 19:44:02 +00:00
|
|
|
bash_completion.install "contrib/completion/bash/docker-compose"
|
2015-07-21 09:05:08 +00:00
|
|
|
zsh_completion.install "contrib/completion/zsh/_docker-compose"
|
2015-03-04 19:44:02 +00:00
|
|
|
|
2015-01-11 14:48:27 +00:00
|
|
|
bin.install Dir[libexec/"bin/*"]
|
|
|
|
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
2015-02-26 01:06:22 +00:00
|
|
|
ln_s bin/"docker-compose", bin/"fig"
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-06-21 22:35:44 +00:00
|
|
|
assert_match /#{version}/, shell_output(bin/"docker-compose --version")
|
2014-06-01 00:20:24 +00:00
|
|
|
end
|
|
|
|
end
|