Permalink
Browse files

Requires SnowLeopard or newer version. got snippet from jstalk's form…

  • Loading branch information...
1 parent ab96fab commit 6beb01b1464be5efe7d919c58db73aa4b26f2bdf @fabiomcosta committed Mar 27, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 Library/Formula/phantomjs.rb
@@ -1,9 +1,21 @@
require 'formula'
+class NeedsSnowLeopardOrNewer < Requirement
+ def satisfied?
+ MacOS.snow_leopard?
@nandub
nandub Mar 27, 2012

Maybe you could change this line with MacOS.version >= 10.6

+ 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
bin.install "bin/phantomjs"

2 comments on commit 6beb01b

@nandub
nandub commented on 6beb01b Mar 27, 2012

You're right. The naming convention through me off. Sorry for the noise.

@fabiomcosta
Owner

Gotta tell you that it confused me too at start. I thought the same as you did.

Please sign in to comment.