- make `brew readall` only check Homebrew/brew syntax with no tap
passed.
- pass specified tap to `brew readall` test for speed
- only shell out once in `FormulaInfo` test for speed
Make the Homebrew/cask and Homebrew/homebrew-core style more closely
match the rest of Homebrew.
To accomplish this:
- Run `brew cask style` to ensure we don't break style there when
making changes or upgrading RuboCop in Homebrew/brew.
- Fix the HomepageMatchesUrl cop to better handle weird input.
- Remove the now unneeded `.rubocop_shared.yml`
- Fix the cask fixtures with `brew cask style --fix`.
- Share more style between Homebrew/brew, casks and formulae.
- Sorbet gives preference to class methods over methods defined in
included modules, hence Sorbet was unavailable to resolve the
definition of the gsub! method.
- The gsub! method in StringInreplaceExtension conflicts with the definition in String.
- This PR refactors the call to the gsub! method so that a custom object
is exposed instead of a string.
- This method, called from `brew extract` in the case of extraction from
third-party taps, was untested. This led to it breaking when we refactored
some of it to appease Sorbet (see PR 7933). If I make the same
(flawed) change here and run these tests, they fail.
- There's a fair bit going on here, but most of it is setup for
committing changes to more files, as we're testing operations on
multiple files in a Homebrew repo.
- I originally tried to write tests for `brew extract`, but that
required _a lot_ of refactoring because those tests (and their helper
methods) aren't designed for third-party taps - they rely on
`CoreTap`. So testing the underlying method is a better solution.
Starting with Xcode 12 Beta 2, builds that used to work on Apple Silicon
now break due to `Hardware#oldest_cpu` returning `:nehalem` [1].
This commit is the first in a series of improvements to
`Hardware#oldest_cpu`. It resolves the Xcode 12 Beta 2 issue for now.
[1]: https://github.com/Homebrew/brew/issues/7857#issuecomment-655536261