Skip to content

Commit

Permalink
Requires SnowLeopard or newer version. got snippet from jstalk's form…
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiomcosta committed Mar 27, 2012
1 parent ab96fab commit 6beb01b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Library/Formula/phantomjs.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,9 +1,21 @@
require 'formula' require 'formula'


class NeedsSnowLeopardOrNewer < Requirement
def satisfied?
MacOS.snow_leopard?

This comment has been minimized.

Copy link
@nandub

nandub Mar 27, 2012

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

This comment has been minimized.

Copy link
@fabiomcosta

fabiomcosta Mar 27, 2012

Author Owner
end

def message
"phantomjs requires Mac OS X 10.6 (Snow Leopard) or newer."
end
end

class Phantomjs < Formula class Phantomjs < Formula
url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip" url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip"
homepage 'http://www.phantomjs.org/' homepage 'http://www.phantomjs.org/'
sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64' sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64'

depends_on NeedsSnowLeopardOrNewer.new


def install def install
bin.install "bin/phantomjs" bin.install "bin/phantomjs"
Expand Down

2 comments on commit 6beb01b

@nandub
Copy link

@nandub nandub commented on 6beb01b Mar 27, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@fabiomcosta
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.