Last active
August 22, 2018 22:30
-
-
Save nicolas-brousse/9f054d5b865a07f61024cfb6c36b54f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mailcatcher < Formula | |
desc "Catches mail and serves it through a dream." | |
homepage "https://github.com/sj26/mailcatcher" | |
url "https://github.com/sj26/mailcatcher/archive/v0.6.5.zip" | |
sha256 "393303738ec6c7e0254b22b3f6b8f7988363791890516f820e90372afef4d65c" | |
version "0.6.5" | |
def install | |
ENV["GEM_HOME"] = libexec | |
system "gem", "build", "mailcatcher.gemspec" | |
system "gem", "install", "mailcatcher-#{version}.gem" | |
# Other executables don't work currently. | |
bin.install libexec/"bin/mailcatcher" | |
bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"]) | |
end | |
def plist; <<-EOS.undent | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>#{plist_name}</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>#{opt_bin}/mailcatcher</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>#{HOMEBREW_PREFIX}</string> | |
</dict> | |
</plist> | |
EOS | |
end | |
test do | |
system "#{bin}/mailcatcher", "--version" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment