Skip to content

Commit

Permalink
mailcatcher: fix missing assets
Browse files Browse the repository at this point in the history
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 sj26/mailcatcher#560
  • Loading branch information
sj26 committed Jun 12, 2024
1 parent da2b023 commit e4849e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Formula/m/mailcatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -239,6 +241,7 @@ def install
system "expect", "-f", "mailcatcher.exp"
assert_match "[email protected]", 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

0 comments on commit e4849e9

Please sign in to comment.