Last active
July 5, 2017 12:54
-
-
Save nicolas-brousse/b2257bf361fece8d4f096f231965c65d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Gemstash < Formula | |
desc "A RubyGems.org cache and private gem server." | |
homepage "https://github.com/bundler/gemstash/" | |
url "https://github.com/bundler/gemstash/archive/v1.0.4.tar.gz" | |
sha256 "d3479b692a3a14844b703e0be033e29e9fca99899cf0b887d77c8759dcfbebd5" | |
def install | |
ENV["GEM_HOME"] = libexec | |
system "gem", "build", "gemstash.gemspec" | |
system "gem", "install", "gemstash-#{version}.gem" | |
# Other executables don't work currently. | |
bin.install libexec/"bin/gemstash" | |
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}/gemstash</string> | |
<string>start</string> | |
<string>--no-daemonize</string> | |
</array> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>WorkingDirectory</key> | |
<string>#{HOMEBREW_PREFIX}</string> | |
</dict> | |
</plist> | |
EOS | |
end | |
test do | |
system "#{bin}/gemstash", "--version" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment