16 Commits

Author SHA1 Message Date
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Markus Reiter
7f39d333bc Move assert_success to SystemCommand::Result. 2019-10-04 23:39:25 +02:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
5c7fbaf259
Update RuboCop RSpec rules
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.
2019-01-21 13:39:11 +00:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Markus Reiter
32ad22395b Remove some #popen_reads. 2018-09-04 05:16:59 +02:00
Markus Reiter
8ae284e871 Use SystemCommand for curl. 2018-08-01 01:04:42 +02:00
ilovezfs
cd2b85c40f
Revert "Use SystemCommand for curl." 2018-07-29 21:45:04 -07:00
Markus Reiter
355df64d93 Use SystemCommand for curl. 2018-07-29 01:23:33 +02:00
Markus Reiter
28384ba518 Rename Hbc::SystemCommand to SystemCommand. 2018-07-22 21:11:47 +02:00
Markus Reiter
a9e109e31a Don’t expand executable path in SystemCommand. 2018-07-14 02:33:42 +02:00
Markus Reiter
37f3a603ce Use env utility instead of with_env. 2018-07-11 16:46:33 +02:00
Claudia
3dbb735f3c
Fix PKG installer environment
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`
2018-07-06 09:38:00 +02:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Markus Reiter
b9c9f0f687 Move Cask test helpers to test/support. 2017-03-05 19:13:06 +01:00