From 7cd747368d38d4df1fcf41c16014677c9717ff12 Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Thu, 23 Jul 2026 21:34:00 +0200 Subject: [PATCH 1/2] crab_share 0.3.1 --- Formula/crab_share.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/crab_share.rb b/Formula/crab_share.rb index c6f5dbd..5f75e2d 100644 --- a/Formula/crab_share.rb +++ b/Formula/crab_share.rb @@ -2,8 +2,8 @@ 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" From c8423b80ccc4451632bd3a3f8c91b7d957e3d5cc Mon Sep 17 00:00:00 2001 From: MayNiklas Date: Thu, 23 Jul 2026 22:01:37 +0200 Subject: [PATCH 2/2] Add crab_share tests --- Formula/crab_share.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Formula/crab_share.rb b/Formula/crab_share.rb index 5f75e2d..5253682 100644 --- a/Formula/crab_share.rb +++ b/Formula/crab_share.rb @@ -29,5 +29,15 @@ def install # 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