Define HOMEBREW_LIBRARY for tests
Beef up deps tests
Only mark install as attempted if it was actually attempted

Commit 30a08f5cc707 ("Don't attempt installation multiple times") was
correct in raising FormulaInstallationAlreadyAttemptedError early enough
to prevent the other exceptions in #check_install_sanity from being
raised, but it should not have moved the point at which formulae are
added to the attempted set. Doing so prevents the installer from being
instantiated multiple times on the same formula, even if installation
was never attempted.

Put it back where it belongs.
Add tex requirement

* Detect `latex' and `bibtex' commands.
* Recommend installing MacTeX when no LaTeX installation is found.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Remove <=> from Dependency interface

It is important that dep equality corresponds to the name attribute, but
we may want to use the Comparable interface to sort them by installation
order in the future. Code that needs to sort them alphabetically should
just use sort_by.
Split up dependency test coverage

The DependencyCollector tests are really integration tests, while the
rest are closer to real unit tests. Split them up so that the tests can
be run in isolation on a per-class basis.
Fix uses cmd

Fixes #17074.
Closes #17075.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Restore keg-only caveats

Fixes #16989.
info: sort conflicts consistently
options: sort options consistently
fix grammar
version: mark some methods as protected
Tests for BuildEnvironment
Tests for Requirement DSL
Doctor check for origin

Added checks on doctor.rb for:

* Missing git origin
* git origin not pointing at mxcl/homebrew

Tests use `git config --get remote.origin.url`.
Also added printout of origin to --config.rb.

Fixes #14399.
Closes #17117.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Make Formula#installed? more idiomatic
Update multi_json to 1.5.0

This contains updates to the OkJson library that allow objects to define
to_json for serialization, and this will be used in the upcoming options
and deps work.
doctor: loosen git origin regexp

If the repository is set up by `brew update`, the remote URL is
https://github.com/mxcl/homebrew.git, but if it is set up by the install
script, the .git suffix is omitted.
Fix JSON smoke test

 - Simplify encoding example because hashes are unordered.
 - Fix broken require
Allow hiding Homebrew emoji with an env var.

Closes #17085.
Closes #17086.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>