230 Commits

Author SHA1 Message Date
Markus Reiter
89dd608766 Deprecate gpg stanza. 2018-09-03 20:47:52 +02:00
Mike McQuaid
bcb1ec5499
Improve Homebrew/brew line length.
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.
2018-09-02 16:15:09 +01:00
Markus Reiter
fbcaa8c85a Resolve URL to get real file extension. 2018-08-31 16:51:23 +02:00
L. E. Segovia
f7cafb50ad
Enable quarantining of Homebrew-Cask's downloads 2018-08-31 13:16:11 +00:00
Markus Reiter
55cde526a8 Deprecate brew cask cleanup. 2018-08-13 20:09:34 +02:00
Markus Reiter
0b80aea75d Use https:// URLs. 2018-08-06 23:39:12 +02:00
Markus Reiter
290910d3c0 Remove cask download strategies. 2018-08-06 20:52:45 +02:00
Markus Reiter
ad150e7595
Merge pull request #4611 from retokromer/patch-1
use `https://` rather than `http://`
2018-08-06 20:30:35 +02:00
Markus Reiter
d5de9d585b Use normal download strategies for casks. 2018-08-06 18:25:19 +02:00
Reto Kromer
456571b15d fix more insecure protocols 2018-08-06 16:50:42 +02:00
Markus Reiter
8ae284e871 Use SystemCommand for curl. 2018-08-01 01:04:42 +02:00
Markus Reiter
88783eae31 Refactor Hbc::URL and rename to URL. 2018-07-30 21:07:42 +02:00
Markus Reiter
54aa412015 Use LazyObject for Hbc::URL. 2018-07-30 21:07:42 +02:00
ilovezfs
cd2b85c40f
Revert "Use SystemCommand for curl." 2018-07-29 21:45:04 -07:00
Markus Reiter
3c3b05d457
Merge pull request #4564 from reitermarkus/not-a-cask-file-error
Raise error when file does not contain a cask.
2018-07-29 12:31:49 +02:00
Markus Reiter
785ec4ef57 Add tests for `CaskUnreadableError. 2018-07-29 12:03:42 +02:00
Markus Reiter
355df64d93 Use SystemCommand for curl. 2018-07-29 01:23:33 +02:00
Markus Reiter
eccd20e276 Merge Hbc::Container classes into UnpackStrategy. 2018-07-24 16:44:27 +02:00
Markus Reiter
e5e8033145 Add system_command helpers. 2018-07-22 23:24:18 +02:00
Markus Reiter
28384ba518 Rename Hbc::SystemCommand to SystemCommand. 2018-07-22 21:11:47 +02:00
Claudia
8666d8fa18
Increase spec timeout to 30 seconds
I’ve noticed the deadlock test in `cask/system_command_spec.rb` appears to fail spuriously, e. g. in #4529.

Details:

https://travis-ci.org/Homebrew/brew/jobs/406827725#L297-L318

With the spec taking 2 seconds on average on my 2017 MBP, I feel it’s
entirely plausible for the aging test-bot hardware to get knocked by
the 15-second timeout.

Given that the spec will pass early anyway if it passes, I feel it’s
reasonable to bump the timeout to 30 seconds.
2018-07-22 16:27:16 +02:00
Markus Reiter
2452b27866 Refactor ErrorDuringExecution. 2018-07-19 16:41:27 +02:00
Markus Reiter
e5865e7e7f Assimilate Containers with UnpackStrategy. 2018-07-16 23:50:45 +02:00
commitay
43bfbe2060
Merge pull request #4343 from commitay/cask-info-updates
cask info: display `auto_updates`
2018-07-16 09:32:17 +10:00
Mike McQuaid
bd5131d710
Merge pull request #4392 from MikeMcQuaid/more-deprecation-disabled
Disable more deprecations.
2018-07-15 14:48:00 +01:00
commitay
6d1f99fa5f cask info: display auto_updates 2018-07-15 11:13:04 +10:00
Markus Reiter
b7e849799f
Merge pull request #4469 from reitermarkus/systemcommand-path
Don’t expand `executable` path in `SystemCommand`.
2018-07-14 22:45:43 +02:00
Mike McQuaid
5c6ef3d920 Disable more deprecations.
- Turn more old `odeprecated` into `odisabled`
- Remove more old `odisabled`
- Remove code for older Ruby versions
2018-07-14 16:00:50 +01:00
Vítor Galvão
3742cf892c
Merge pull request #4457 from commitay/latest-autoupdate
cask audit: check for `latest` with `auto_updates`
2018-07-14 14:29:19 +01:00
Markus Reiter
a9e109e31a Don’t expand executable path in SystemCommand. 2018-07-14 02:33:42 +02:00
Markus Reiter
232fb9721e Hbc::init does not exist anymore. 2018-07-13 23:03:18 +02:00
Mike McQuaid
62f8c96bdb test/cask/cli_spec: temporary skip some tests.
These seem to be related to a leaking RSpec double between tests and
I've verified `brew cask install` still behaves as expected so
let's skip them temporarily.
2018-07-13 09:14:40 +01:00
commitay
ba929cd9e1 cask audit: check for latest with auto_updates 2018-07-12 19:22:47 +10:00
Mike McQuaid
459e2bfa48
Merge pull request #4455 from reitermarkus/heredocs
Use more descriptive heredoc names.
2018-07-12 09:30:35 +01:00
Markus Reiter
7762ce32aa Use more descriptive heredoc names. 2018-07-11 18:15:30 +02:00
Markus Reiter
20ec595cb2 Fix Installer not supporting plain executables. 2018-07-11 16:56:37 +02:00
Markus Reiter
05cb6cda08 Add Installer spec. 2018-07-11 16:46:33 +02:00
Markus Reiter
37f3a603ce Use env utility instead of with_env. 2018-07-11 16:46:33 +02:00
Markus Reiter
1f5311888e Add failing spec for SystemCommand. 2018-07-11 15:58:38 +02:00
Markus Reiter
98bb073b46
Merge pull request #4265 from claui/fix-pkg-environment
Fix PKG installer environment
2018-07-11 08:25:19 +02:00
Markus Reiter
4ddb1123d7
Merge pull request #4426 from reitermarkus/refactor-system-command-plist
Simplify `Hbc::SystemCommand::Result#plist`.
2018-07-09 18:30:32 +02:00
Markus Reiter
fcf8cb24fd Remove unused incremental_hash method. 2018-07-06 23:14:34 +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
e07eddc391 Simplify Hbc::SystemCommand::Result#plist. 2018-07-05 10:54:35 +02:00
commitay
44a78a12a9
Merge pull request #4344 from commitay/cask-audit-all-appcasts
cask audit: check for devmate and hockeyapp appcasts
2018-07-04 11:13:40 +10:00
Claudia
79682df8b6
Re-enable tests by removing a stray rspec :focus 2018-07-02 16:01:01 +02:00
Andrew Janke
e0a8a79921 Style fixes for Rubocop 0.57.1 2018-06-30 19:40:14 -04:00
commitay
b12498159b cask audit: check for devmate and hockeyapp appcasts 2018-06-28 23:17:05 +10:00
Markus Reiter
a8bfe09c49 Remove tests for brew cask search. 2018-06-18 16:23:35 +02:00
Vítor Galvão
9831e67452
Merge pull request #4346 from commitay/version-minor_patch
cask dsl versions: add minor_patch
2018-06-16 13:18:21 +01:00