20 Commits

Author SHA1 Message Date
Mike McQuaid
365e554f67
Revert "rubocops: allow uses_from_macos openssl@3" 2021-09-09 09:16:59 +01:00
Jonathan Chang
d85559876e
tests: skip formulae exist check for openssl* 2021-09-07 11:33:27 -07:00
Rylan Polster
f450bfbf5e style: migrate some lists back to Homebrew/brew 2020-12-02 20:56:07 -05:00
Rylan Polster
2256e547d9 Remove unneeded "formulae exist" test 2020-11-30 18:18:50 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
cddc67b451
rubocops/uses_from_macos: update list.
Also, provide details on how to update this in future and split it into
two.

Fixes #7396
2020-04-20 10:36:42 +01:00
Mike McQuaid
56c02485e0
rubocops: test whitelists. 2020-04-12 14:17:05 +01:00
Claudia
7b320fc03b
Move shared Cask examples closer to its clients
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
2018-11-06 07:19:41 +01:00
Markus Reiter
b7cf925da8 Remove unused methods in Staged module. 2018-10-07 22:00:07 +02:00
Markus Reiter
2308f0c571 Skip quitting applications when not logged into GUI. 2018-10-02 16:27:45 +02:00
Markus Reiter
a84a1c63db Rename Hbc module to Cask. 2018-09-06 09:30:52 +02:00
Mike McQuaid
90b3a13909
cask: move cask/lib/hbc/* to cask/*.
Fix the load path, requires and some filenames accordingly.
2018-09-04 09:56:57 +01:00
Markus Reiter
28384ba518 Rename Hbc::SystemCommand to SystemCommand. 2018-07-22 21:11:47 +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
Mike McQuaid
5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00
Markus Reiter
6760d26319 Create Hbc::Config class. 2018-01-27 21:47:18 +01:00
Markus Reiter
2ad3a87045 Silence all specs by default. 2017-07-29 20:25:37 +02:00
Markus Reiter
5828eefd01 Remove to_s from some Pathnames. 2017-05-08 13:37:28 +02:00
Markus Reiter
cc4fb35ae4 Move Cask shared_examples to test/support. 2017-03-05 00:57:34 +01:00