Use GitHub API 3 in `brew search`
Add test for ghc version style

the ghc formula had an explicit version because we had trouble parsing
the version from the 64-bit URL. It is working now, so add a test to
ensure it isn't broken in the future.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
brew-pull: add support for pulling from taps
Fix protection against overriding Formula#brew

The test for this previously passed, but only because the constructor
for SoftwareSpecification was raising an exception. method_added needs
to be a class method because methods are being defined on the class, not
the object, and to test it properly we have to eval the class in the
test itself.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
tests: silence mirror test

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
info: output correct URL for tapped dupes

Tapped formulae that dupe those in core now display the correct URL when
invoked like `brew info homebrew/dupes/openssl`.

This also fixes the broken `brew info` test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Clean up fails_with test classes

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
doctor: skip Cellar checks if Cellar doesn't exist

Attempting to call certain methods on the Cellar before it exists,
such as realpath, would cause brew doctor to throw unnecessary "file
does not exist" errors. This was fixed once before, but new tests
have been added since without the appropriate checks.
cf. 0d28bc78d71590c8e8a5961d8d10e3d7d9b8822d

Fixes #5188 (again).
make_relative_symlink: give more specific advice
doctor: be specific about libiconv files detected

Closes #11417.
tests: fix no-op fails_with test

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
ARGV: use include? for --HEAD

ARGV.build_head? will return true if the typo '-HEAD' is passed because
it uses flag? to detect the option. However, we only filter the exact
spelling of '--HEAD' in ARGV.filter_for_dependencies, and thus the HEAD
property is undesirably passed to deps during installation.

Since we never advertised '-H' as a valid short option for '--HEAD',
just use include? instead of flag?.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
brew doctor: add check for outdated compilers

A common source of build problems on Xcode 4.3+ is outdated compilers,
usually when a user has installed over top of an old version and hasn't
installed the CLT. Since the compilers from the previous Xcode are still
around, brew doctor wouldn't complain.

This adds a hash containing a list of the canonical compiler versions
for supported versions of Xcode, and adds a check against that to determine
whether a given installation has any compilers which are out of date.

Closes #11518.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
brew-pull: Fix detecting issue #

Fixes a regression introduced in c27a575eb6b2dfc0d662aaab2cf9d754647fbadd
This is why I wish 1.8.x had named captures.
brew-leaves: fix for recent deps overhaul

Fixes #11567.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Implement <=> for Dependency

Fixes #11587.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
deps: fix --tree for new deps

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Don't warn about .o files in lib
Fix StandardCompilers check

* Return true if Xcode version is not in hash, not nil
* Use two-digit version numbers for 4.0, 4.2, 4.3
tests: remove special-casing @path in TestBall

Tests that expect Formula#path to resolve to a real path should use
TestBallWithRealPath; TestBall gets its original behavior back, fixing a
failing test in test_formula_install.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>