Skip to content

Instantly share code, notes, and snippets.

@nandub
Forked from fabiomcosta/phantomjs.rb
Created March 30, 2012 22:41
Show Gist options
  • Save nandub/2256743 to your computer and use it in GitHub Desktop.
Save nandub/2256743 to your computer and use it in GitHub Desktop.
proposed phantomjs formula
require 'formula'
class NeedsSnowLeopardOrNewer < Requirement
def satisfied?
MacOS.snow_leopard?
end
def message
"phantomjs requires Mac OS X 10.6 (Snow Leopard) or newer."
end
end
class Phantomjs < Formula
url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip"
homepage 'http://www.phantomjs.org/'
sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64'
depends_on NeedsSnowLeopardOrNewer.new
def install
libexec.install "bin/phantomjs"
libexec.install "bin/Info.plist"
bin.install_symlink "#{libexec}/phantomjs" => "phantomjs"
bin.install_symlink "#{libexec}/Info.plist" => "Info.plist"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment