From e4849e97c2dd8fb334488a2d1e4909b612e6eee0 Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Wed, 12 Jun 2024 10:36:50 +1000 Subject: [PATCH] mailcatcher: fix missing assets Without this step the user interface does not function because the javascript and stylesheets are not compiled or included, so cannot be served to browsers. See https://github.com/sj26/mailcatcher/issues/560 --- Formula/m/mailcatcher.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Formula/m/mailcatcher.rb b/Formula/m/mailcatcher.rb index bf9efdd7affd..a9fc89c5459d 100644 --- a/Formula/m/mailcatcher.rb +++ b/Formula/m/mailcatcher.rb @@ -4,6 +4,7 @@ class Mailcatcher < Formula url "https://github.com/sj26/mailcatcher/archive/refs/tags/v0.10.0.tar.gz" sha256 "4cd027e22878342d6a002402306d42ada1f34045cc1d7f35b5a7fa37b944326e" license "MIT" + revision 1 bottle do sha256 cellar: :any, arm64_sonoma: "b1e3e8c79312f8a9cfc995ebf3323750c1673da1bcc46129a516124575dd4116" @@ -161,6 +162,7 @@ def install "--no-document", "--install-dir", libexec end + system "rake", "assets" system "gem", "build", "#{name}.gemspec" system "gem", "install", "--ignore-dependencies", "#{name}-#{version}.gem" bin.install libexec/"bin"/name, libexec/"bin/catchmail" @@ -239,6 +241,7 @@ def install system "expect", "-f", "mailcatcher.exp" assert_match "bob@example.org", shell_output("curl --silent http://localhost:#{http_port}/messages") assert_equal "Hello Alice.", shell_output("curl --silent http://localhost:#{http_port}/messages/1.plain").strip + assert_match "Content-Type: application/javascript", shell_output("curl --silent -i http://localhost:#{http_port}/assets/mailcatcher.js").strip system "curl", "--silent", "-X", "DELETE", "http://localhost:#{http_port}/" end end