2019-01-21 17:40:41 +00:00
|
|
|
require "language/node"
|
|
|
|
|
|
|
|
class Ungit < Formula
|
|
|
|
desc "The easiest way to use git. On any platform. Anywhere"
|
|
|
|
homepage "https://github.com/FredrikNoren/ungit"
|
2019-02-15 02:25:02 +00:00
|
|
|
url "https://registry.npmjs.org/ungit/-/ungit-1.4.42.tgz"
|
|
|
|
sha256 "df7b3fb075c3352ba56174a6ce5f92371fa33218ca4e01375b2f95030c4d34bb"
|
2019-01-21 17:40:41 +00:00
|
|
|
|
2019-02-09 00:52:25 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-02-12 13:17:04 +00:00
|
|
|
sha256 "9e14591fb0397f4bc86bca9d39527bc35d33be7e3b1a5e3a086c62e81047b0e7" => :mojave
|
|
|
|
sha256 "ad54bf1d8c04b1ca6915fb4174a4e47ff5d344d177e03341f3c820f663a29778" => :high_sierra
|
|
|
|
sha256 "1ffaafb011f5aae300d267d0ecc039c249316894cb05cd627f3007f202f7cfdc" => :sierra
|
2019-02-09 00:52:25 +00:00
|
|
|
end
|
|
|
|
|
2019-01-21 17:40:41 +00:00
|
|
|
depends_on "node"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
begin
|
|
|
|
require "nokogiri"
|
|
|
|
|
|
|
|
pid = fork do
|
|
|
|
exec bin/"ungit", "--no-launchBrowser", "--autoShutdownTimeout", "5000" # give it an idle timeout to make it exit
|
|
|
|
end
|
|
|
|
sleep 3
|
|
|
|
assert_match "ungit", Nokogiri::HTML(shell_output("curl -s 127.0.0.1:8448/")).at_css("title").text
|
|
|
|
ensure
|
|
|
|
Process.kill("TERM", pid)
|
|
|
|
Process.wait(pid)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|