2011-01-25 22:39:18 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-06-07 05:33:39 +00:00
|
|
|
class SnowLeopardOrNewer < Requirement
|
2012-04-01 20:03:21 +00:00
|
|
|
def satisfied?
|
|
|
|
MacOS.snow_leopard?
|
|
|
|
end
|
|
|
|
|
|
|
|
def message
|
|
|
|
"PhantomJS requires Mac OS X 10.6 (Snow Leopard) or newer."
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Phantomjs < Formula
|
2011-05-23 13:14:55 +00:00
|
|
|
homepage 'http://www.phantomjs.org/'
|
2012-07-24 16:35:41 +00:00
|
|
|
url 'http://phantomjs.googlecode.com/files/phantomjs-1.6.1-macosx-static.zip'
|
|
|
|
sha1 '69a616fa035a815f05e1892e3ff795ef740f568b'
|
2011-01-25 22:39:18 +00:00
|
|
|
|
2012-06-07 05:33:39 +00:00
|
|
|
depends_on SnowLeopardOrNewer.new
|
2011-01-25 22:39:18 +00:00
|
|
|
|
2012-04-03 06:36:47 +00:00
|
|
|
def install
|
2012-06-21 16:39:02 +00:00
|
|
|
bin.install 'bin/phantomjs'
|
2012-04-01 20:03:21 +00:00
|
|
|
end
|
2011-01-25 22:39:18 +00:00
|
|
|
end
|