- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
Layout/InconsistentIndentation once the auto-fixer had got rid of the
"redundant begin"s.
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.
This change allows us to remove the `RSpec/IteratedExpectation` rule from `.rubocop_todo.yml` as we no longer iterate over each path to check existence.
Note: We this PR didn't change the subsequent test checking for the negative expectations as this isn't part of the rule (see: https://github.com/rubocop-hq/rubocop-rspec/issues/278).
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
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`