diff options
| author | Dominyk Tiller | 2015-04-15 18:40:28 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-19 10:45:13 +0100 |
| commit | 573df59951429de53e867faf2198c69a0368dc7d (patch) | |
| tree | 4c0aca4cf363aa192f7e64520cd1a10c21d578b1 /Library | |
| parent | 5e441d4ad852ae12a50ac300dcda4f5471715216 (diff) | |
| download | homebrew-573df59951429de53e867faf2198c69a0368dc7d.tar.bz2 | |
casperjs: vendor phantomjs182
Closes #38632
Closes #38681.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/casperjs.rb | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/Library/Formula/casperjs.rb b/Library/Formula/casperjs.rb index 6dd9baf01..ecc41e7fd 100644 --- a/Library/Formula/casperjs.rb +++ b/Library/Formula/casperjs.rb @@ -1,22 +1,39 @@ -require 'formula' - class Casperjs < Formula - homepage 'http://www.casperjs.org/' - url 'https://github.com/n1k0/casperjs/archive/1.0.4.tar.gz' - sha1 '4e1bdbf2ce93506b6c0d193c90a6f9bcd58c6254' + homepage "http://www.casperjs.org/" + url "https://github.com/n1k0/casperjs/archive/1.0.4.tar.gz" + sha256 "d71b9dd77ac202f3fbb958f8876f12b89aee2a1b09b2c2c55fd11aa928a1fb1f" devel do - url 'https://github.com/n1k0/casperjs/archive/1.1-beta3.tar.gz' - sha1 'd1c31f6a19c0b636f3e4dc17ffeb8224c8af8aef' - version '1.1-beta3' + url "https://github.com/n1k0/casperjs/archive/1.1-beta3.tar.gz" + sha256 "bc286424fb52df6cf16cb9b8ef6534ee830bb8ab0b87d2625910d8c1824152dc" + version "1.1-beta3" end - head 'https://github.com/n1k0/casperjs.git' + head "https://github.com/n1k0/casperjs.git" + + # For embedded Phantomjs + depends_on :macos => :snow_leopard - depends_on 'phantomjs' + # https://github.com/Homebrew/homebrew/pull/38632 + resource "phantomjs" do + url "https://phantomjs.googlecode.com/files/phantomjs-1.8.2-macosx.zip" + sha256 "7d19c1cce6c66bb3153d335522b4effe68ddd249f427776b82f2662fb5ed81cf" + end def install - libexec.install Dir['*'] - bin.install_symlink libexec+'bin/casperjs' + libexec.install Dir["*"] + (libexec/"phantomjs").install resource("phantomjs") + + (bin/"casperjs").write <<-EOS.undent + #!/bin/bash + export PATH=#{libexec}/phantomjs/bin:$PATH + exec "#{libexec}/bin/casperjs" "$@" + EOS + end + + test do + # Change this test when we're no longer embedding an old PhantomJS + # It exists for now purely to make sure we're using the embedded PhantomJS. + assert_match /version 1.8.2/, shell_output("#{bin}/casperjs") end end |
