Previously, .simplecov called `SimpleCov.result` to store the coverage
result, and ignored the return value. `SimpleCov.result`'s return can be
slow to calculate, which wastes a lot of time when it's ignored.
This commit extracts the code needed to store the SimpleCov result from
`SimpleCov.result`, and calls it directly, without doing the busywork to
compute the return value every time.
In my testing, this more than halves the time taken to run all the
integration tests.
If we have a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX mismatch (now the
default) then we can block access to the whole of HOMEBREW_REPOSITORY
rather than just the HOMEBREW_LIBRARY and `.git`.
This reverts commit a124680b189f50ebeb550845e3c0efd34db66247.
Will need to be smarter than this, since people can't force Travis to
update. I'm losing count of the amount of times Travis has forced a change
of plans around Homebrew this year.
Closes https://github.com/Homebrew/brew/issues/1096.
`sha1` isn't a very accurate description of what this value can be
because it can be any git commit reference. For example, `brew test-bot`
uses `brew update-test --commit=HEAD`.
From the 8.1 Xcode Beta:
```
There is no Command Line Tools (OS X 10.11) for Xcode 8 package. Xcode 8 contains
SDKs that are incompatible with earlier toolchains. Developers who want to make
use of the Xcode 8 SDKs from the command line must choose the SDK with `xcode-select`.
Developers on OS X El Capitan who have installed versions of the Command Line Tools
(OS X 10.11) for Xcode 8 Beta should install Command Line Tools (OS X 10.11)
for Xcode 7.3.1.
```
Thanks Apple.
This hack has been in Homebrew Cask for more than two years
(since 51f93e6dc9c3da4ab2118459ea95e45c104386ec), and it originated even
earlier (6d2f7bc55af0b2aa915b2396d213e30a4446256c).
Cask tests apparently aren't even run on Travis anymore,
so this can be safely removed.