homebrew-core/Formula/slimerjs.rb
Kaito Udagawa 7c89870b28 slimerjs: fix to use GitHub tarballs (#7055)
* slimerjs: fix to use GitHub tarballs

* slimerjs: fix the outdated dependencies and caveats

* slimerjs: fix to compact the caveats and tests
2016-11-20 12:12:33 +00:00

29 lines
914 B
Ruby

class Slimerjs < Formula
desc "Scriptable browser for Web developers"
homepage "https://slimerjs.org/"
url "https://github.com/laurentj/slimerjs/archive/0.10.1.tar.gz"
sha256 "940c4459821610a399b967a48d109d45cfa546ec347c109bb88330e17f3a2979"
head "https://github.com/laurentj/slimerjs.git"
bottle :unneeded
def install
cd "src" do
system "zip", "-r", "omni.ja", "chrome/", "components/", "modules/",
"defaults/", "chrome.manifest", "-x@package_exclude.lst"
libexec.install %w[application.ini omni.ja slimerjs slimerjs.py]
end
bin.install_symlink libexec/"slimerjs"
end
def caveats; <<-EOS.undent
The configuration file was installed in:
#{libexec}/application.ini
EOS
end
test do
ENV["SLIMERJSLAUNCHER"] = "/nonexistent"
assert_match "Set it with the path to Firefox", shell_output("#{bin}/slimerjs test.js", 1)
end
end