2011-01-25 22:39:18 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2012-06-07 05:33:39 +00:00
|
|
|
class SnowLeopardOrNewer < Requirement
|
2013-01-20 02:45:59 +00:00
|
|
|
satisfy MacOS.version >= :snow_leopard
|
2012-04-01 20:03:21 +00:00
|
|
|
|
|
|
|
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/'
|
2013-03-24 00:29:27 +00:00
|
|
|
url 'http://phantomjs.googlecode.com/files/phantomjs-1.9.0-macosx.zip'
|
|
|
|
sha1 '784772eb8d01d26f86e474a410b0f820b6a65a6c'
|
2011-01-25 22:39:18 +00:00
|
|
|
|
2013-01-27 22:49:44 +00:00
|
|
|
depends_on SnowLeopardOrNewer
|
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'
|
2013-02-22 17:35:26 +00:00
|
|
|
(share+'phantomjs').install 'examples'
|
2012-04-01 20:03:21 +00:00
|
|
|
end
|
2011-01-25 22:39:18 +00:00
|
|
|
end
|