Allow requirements to specify a default formula.

This allows default resolution of requirements without user intervention.

Closes Homebrew/homebrew#19627.
This commit is contained in:
Mike McQuaid 2013-05-10 13:35:38 +01:00
parent 8402ea29b8
commit 8c3b4fa77f
5 changed files with 5 additions and 0 deletions

View file

@ -2,6 +2,7 @@ require 'formula'
class ErlangInstalled < Requirement
fatal true
default_formula 'erlang'
satisfy { which 'erl' }

View file

@ -3,6 +3,7 @@ require 'formula'
class Emacs23Installed < Requirement
fatal true
env :userpaths
default_formula 'emacs'
satisfy do
`emacs --version 2>/dev/null` =~ /^GNU Emacs (\d{2})/

View file

@ -2,6 +2,7 @@ require 'formula'
class MySqlInstalled < Requirement
fatal true
default_formula 'mysql'
satisfy { which 'mysql_config' }

View file

@ -10,6 +10,7 @@ end
class MarkdownProvider < Requirement
fatal true
default_formula 'markdown'
satisfy { which 'markdown' }

View file

@ -2,6 +2,7 @@ require 'formula'
class GnupgInstalled < Requirement
fatal true
default_formula 'gnupg2'
satisfy { which('gpg') || which('gpg2') }