2016-02-05 02:05:19 +00:00
|
|
|
class B2Tools < Formula
|
2016-08-21 07:44:32 +00:00
|
|
|
include Language::Python::Virtualenv
|
|
|
|
|
2016-02-05 02:05:19 +00:00
|
|
|
desc "B2 Cloud Storage Command-Line Tools"
|
|
|
|
homepage "https://github.com/Backblaze/B2_Command_Line_Tool"
|
2016-10-23 10:26:49 +00:00
|
|
|
url "https://github.com/Backblaze/B2_Command_Line_Tool/archive/v0.6.8.tar.gz"
|
|
|
|
sha256 "ccfb22b0203a27ed170bd65f3dfd655c963b6838d0b3569efb78ea8ec8e79a9f"
|
2016-02-05 02:05:19 +00:00
|
|
|
|
2016-02-18 08:16:14 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-10-23 10:57:36 +00:00
|
|
|
sha256 "4cc12ce92c4395e0eaad7a5838d0e751ba032bc13b2798590208016b421cb34f" => :sierra
|
|
|
|
sha256 "32ecef3456e90b5aa3c178d32a959290190df17260d8a0babe36f31693307fe5" => :el_capitan
|
|
|
|
sha256 "2dcb48ec7e164ed72fed8f53f7437118c60320c74898981b1a6e2397bd6e1dc9" => :yosemite
|
2016-02-18 08:16:14 +00:00
|
|
|
end
|
|
|
|
|
2016-03-17 16:08:50 +00:00
|
|
|
depends_on :python if MacOS.version <= :snow_leopard
|
|
|
|
|
2016-10-23 10:26:49 +00:00
|
|
|
conflicts_with "boost-build", :because => "both install `b2` binaries"
|
|
|
|
|
|
|
|
resource "funcsigs" do
|
|
|
|
url "https://files.pythonhosted.org/packages/94/4a/db842e7a0545de1cdb0439bb80e6e42dfe82aaeaadd4072f2263a4fbed23/funcsigs-1.0.2.tar.gz"
|
|
|
|
sha256 "a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "fury" do
|
|
|
|
url "https://github.com/ppolewicz/logfury/archive/0.1.2.tar.gz"
|
|
|
|
sha256 "07464a8c1673a6012fee0e7b70b9b12941ede4210ed53e8dcda40433e2ef70fa"
|
|
|
|
end
|
|
|
|
|
2016-07-16 11:53:31 +00:00
|
|
|
resource "futures" do
|
|
|
|
url "https://files.pythonhosted.org/packages/55/db/97c1ca37edab586a1ae03d6892b6633d8eaa23b23ac40c7e5bbc55423c78/futures-3.0.5.tar.gz"
|
|
|
|
sha256 "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df"
|
|
|
|
end
|
|
|
|
|
|
|
|
resource "requests" do
|
2016-08-21 07:44:32 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/2e/ad/e627446492cc374c284e82381215dcd9a0a87c4f6e90e9789afefe6da0ad/requests-2.11.1.tar.gz"
|
|
|
|
sha256 "5acf980358283faba0b897c73959cecf8b841205bb4b2ad3ef545f46eae1a133"
|
2016-07-16 11:53:31 +00:00
|
|
|
end
|
|
|
|
|
2016-03-17 16:08:50 +00:00
|
|
|
resource "six" do
|
2016-07-16 11:53:31 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz"
|
2016-03-17 16:08:50 +00:00
|
|
|
sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
|
|
|
|
end
|
|
|
|
|
2016-07-16 11:53:31 +00:00
|
|
|
resource "tqdm" do
|
2016-08-21 07:44:32 +00:00
|
|
|
url "https://files.pythonhosted.org/packages/12/f6/2d7be1c049d3e1556a43825728b51600ccb54be5ee1f5b2b0cc27887112b/tqdm-4.8.4.tar.gz"
|
|
|
|
sha256 "bab05f8bb6efd2702ab6c532e5e6a758a66c0d2f443e09784b73e4066e6b3a37"
|
2016-07-16 11:53:31 +00:00
|
|
|
end
|
|
|
|
|
2016-08-21 07:44:32 +00:00
|
|
|
resource "nose" do
|
|
|
|
url "https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-1.3.7.tar.gz"
|
|
|
|
sha256 "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
|
2016-07-16 11:53:31 +00:00
|
|
|
end
|
|
|
|
|
2016-02-05 02:05:19 +00:00
|
|
|
def install
|
2016-08-21 07:44:32 +00:00
|
|
|
virtualenv_install_with_resources
|
2016-03-17 16:08:50 +00:00
|
|
|
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
2016-08-21 07:44:32 +00:00
|
|
|
system "python", "setup.py", "nosetests"
|
2016-03-17 16:08:50 +00:00
|
|
|
bash_completion.install "contrib/bash_completion/b2" => "b2-tools-completion.bash"
|
2016-02-05 02:05:19 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2016-07-16 11:53:31 +00:00
|
|
|
cmd = "#{bin}/b2 authorize_account BOGUSACCTID BOGUSAPPKEY 2>&1"
|
|
|
|
assert_match "bad_auth_token", shell_output(cmd, 1)
|
2016-02-05 02:05:19 +00:00
|
|
|
end
|
|
|
|
end
|