2019-03-14 14:23:37 +00:00
|
|
|
class Ffsend < Formula
|
|
|
|
desc "Fully featured Firefox Send client"
|
|
|
|
homepage "https://gitlab.com/timvisee/ffsend"
|
2019-10-04 03:57:33 +00:00
|
|
|
url "https://github.com/timvisee/ffsend/archive/v0.2.52.tar.gz"
|
|
|
|
sha256 "b5fd937604eeccd85d7b30d8510784d95497c2412da29c586430275db55043ef"
|
2019-03-14 14:23:37 +00:00
|
|
|
|
2019-03-21 00:00:20 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2019-10-04 04:26:48 +00:00
|
|
|
sha256 "2648c957876a524b24c21517412a527f4db5d49b83920bd478cbc102ae86c99c" => :catalina
|
|
|
|
sha256 "1de65c841a42d009553325db5b44da81f627d93305aef023306acd88a0589b09" => :mojave
|
|
|
|
sha256 "88573bde2de8745093c57d7fa13c0bd148210b2a607210bee0bf281a9527c625" => :high_sierra
|
2019-03-21 00:00:20 +00:00
|
|
|
end
|
|
|
|
|
2019-03-14 14:23:37 +00:00
|
|
|
depends_on "rust" => :build
|
2019-09-04 13:41:22 +00:00
|
|
|
depends_on "openssl@1.1"
|
2019-03-14 14:23:37 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Ensure that the `openssl` crate picks up the intended library.
|
|
|
|
# https://docs.rs/openssl/0.10.19/openssl/#manual
|
2019-09-04 13:41:22 +00:00
|
|
|
ENV["OPENSSL_DIR"] = Formula["openssl@1.1"].opt_prefix
|
2019-03-14 14:23:37 +00:00
|
|
|
|
|
|
|
system "cargo", "install", "--root", prefix, "--path", "."
|
2019-08-28 17:26:14 +00:00
|
|
|
|
|
|
|
bash_completion.install "contrib/completions/ffsend.bash"
|
|
|
|
fish_completion.install "contrib/completions/ffsend.fish"
|
|
|
|
zsh_completion.install "contrib/completions/_ffsend"
|
2019-03-14 14:23:37 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2019-07-01 02:19:11 +00:00
|
|
|
system "#{bin}/ffsend", "help"
|
2019-03-14 14:23:37 +00:00
|
|
|
|
|
|
|
(testpath/"file.txt").write("test")
|
|
|
|
url = shell_output("#{bin}/ffsend upload -Iq #{testpath}/file.txt").strip
|
|
|
|
output = shell_output("#{bin}/ffsend del -I #{url} 2>&1")
|
|
|
|
assert_match "File deleted", output
|
|
|
|
end
|
|
|
|
end
|