Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Formula/crab_share.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class CrabShare < Formula
desc "Simple application to upload files to an S3 bucket and receive a shareable link"
homepage "https://github.com/lounge-rocks/crab_share"

url "https://github.com/lounge-rocks/crab_share/archive/refs/tags/0.3.0.tar.gz"
sha256 "fccdb99d1fed40ea1115dc20bf080f8eff8494ff50890860ada89042b00e2bbf"
url "https://github.com/lounge-rocks/crab_share/archive/refs/tags/0.3.1.tar.gz"
sha256 "359f74a6eddf80df1646ab8c6fba48db9606e4ba939f2b569d5aad413ea1d123"

head "https://github.com/lounge-rocks/crab_share.git", branch: "main"

Expand All @@ -29,5 +29,15 @@
# check if help text is printed
output = shell_output("#{bin}/crab_share --help")
assert_match "Usage:", output

# upload a test file - expect an error because no credentials are provided
(testpath/"test.txt").write("Hello World!")
output = shell_output("#{bin}/crab_share test.txt 2>&1", 1)
assert_match "Could not read ~/.aws/crab_share.json", output
assert_match "No such file or directory (os error 2)", output

# upload a test file that does not exist - expect an error
output = shell_output("#{bin}/crab_share file-does-not-exist.txt 2>&1", 1)
assert_match "Path file-does-not-exist.txt does not exist", output
end
end
Loading