- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
Layout/InconsistentIndentation once the auto-fixer had got rid of the
"redundant begin"s.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
Create a new, seperate RuboCop file that uses our RSpec rule
configuration if a specified tap has a `spec` directory.
Also, while we're here, fix up the various rules so that we don't have
any outdated TODOs, disable some rules for good and fix `brew style`
for Homebrew/bundle.
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.
While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
In Cask specs, we have recently introduced a couple of specialized
`shared_examples` directories. Those new directories are organized
below their respective packages (for instance,
`cask/artifact/shared_examples` and `cask/cmd/shared_examples`).
This commit moves the rest of the shared examples accordingly.
See also:
https://github.com/Homebrew/brew/pull/5247
This commit solves an issue where the environment handed to
`/usr/sbin/installer` is not the same as the environment used by the
graphical PKG installer.
This is evident in some post-install scripts, e. g. the
`component-10.pkg/Scripts/postinstall` script in the `dymo-label`
cask. The code says:
```
USER_ID=`id -u ${USER}`
launchctl bootstrap gui/$USER_ID /Library/LaunchAgents/com.dymo.dls.webservice.plist
```
The graphical installer will export e. g. `USER=alice`, and
everything works as intended.
However, `brew cask install` does not override `sudo`’s default,
which is `USER=ROOT`. This violates the assumptions in the script.
This commit fixes the issue by configuring `sudo` to override the
following environment variables with the proper user name:
- `LOGNAME`
- `USER`
- `USERNAME`