1854 Commits

Author SHA1 Message Date
Douglas Eichelberger
2073e70696 brew style --fix 2023-02-27 21:43:10 -08:00
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
eb2b990575 Port more call sites 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
2400c6daed brew style --fix 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
37015b6b08 Change to pluralize, port more call sites 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
0438a3a538 Draft implementation to replace ActiveSupport inflections 2023-02-27 20:17:33 -08:00
Mike McQuaid
5975ca981d
Merge pull request #14808 from dduugg/audit-types
Fixed type error in 'brew audit'
2023-02-27 13:33:05 +00:00
apainintheneck
fdc2e9f3f5 Merge branch 'master' into delay-loading-from-cask-source-api 2023-02-26 14:50:13 -08:00
apainintheneck
fd62cdf636 cask: delay loading from source API
For casks with certain stanzas, *flight and language
stanzas in this case, we need to use the caskfile
to install them correctly. The JSON API is not an option.

This delays loading from the source API until just before
we try to install one of these casks. This reduces the
number of requests we make to the source API.
2023-02-25 20:54:37 -08:00
Rylan Polster
29bb0ee3bf
Set tap for casks when loading from contents via API 2023-02-25 16:24:58 -05:00
Douglas Eichelberger
7f4250241f Fixd type error in 'brew audit' 2023-02-24 16:20:51 -08:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Bo Anderson
c416e4bbee
cask: handle nil URLs 2023-02-24 18:04:18 +00:00
Mike McQuaid
e9536cbcb7
Merge pull request #14786 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.46.0
build(deps): bump rubocop from 1.45.1 to 1.46.0 in /Library/Homebrew
2023-02-24 16:55:57 +00:00
Bo Anderson
aebc125e9c
cask: support url specs in API 2023-02-24 13:56:46 +00:00
Mike McQuaid
e95ce6967a
brew style --fix 2023-02-24 13:50:07 +00:00
Mike McQuaid
aeda0c473f
Merge pull request #14792 from Bo98/cask-contents-checksum
cask_loader: fix missing checksum in FromContentsLoader
2023-02-24 12:55:11 +00:00
Bo Anderson
09eb7b3dcb
cask_loader: fix missing checksum in FromContentsLoader 2023-02-24 12:09:34 +00:00
Mike McQuaid
f280ce069b
Support loading formulae/casks from subdirectories
Previously, we required all formulae and casks to be in a specific
formula or cask directory but did not check any subdirectories.

This commit allows using subdirectories for official taps, the only
ones likely to be big enough to warrant sharding in this way and to
avoid potentially breaking backwards compatibility for existing taps.

This was inspired by the most recent issues with homebrew-cask.
2023-02-24 10:57:41 +00:00
Mike McQuaid
d7029e95cd
Merge pull request #14769 from dduugg/enable-types
Enable typing in Cask::Artifact
2023-02-23 18:02:44 +00:00
Bo Anderson
336c2c792d
Merge pull request #14733 from Bo98/api-security
Security enhancements to API
2023-02-22 23:10:37 +00:00
Bo Anderson
e663f532a6
Checksum Ruby source file downloads 2023-02-22 22:50:24 +00:00
Bevan Kay
7497f805ba
Revert "cask: audit for correct signing of pkg installers" 2023-02-23 09:12:24 +11:00
Sean Molenaar
2b1fbaa26d
Merge pull request #14748 from SMillerDev/feat/cask/audit_short_version_sparkle
cask: audit if sparkle livecheck needs multipart version
2023-02-22 20:23:17 +01:00
Sean Molenaar
c14b7917a2
Update Library/Homebrew/cask/audit.rb 2023-02-22 19:43:02 +01:00
Douglas Eichelberger
29c6baeed1 Enable typing in Cask::Artifact 2023-02-22 09:11:29 -08:00
Sean Molenaar
dcb6522604
audit: fix appcast_unneeded_long_version syntax 2023-02-22 12:02:25 +01:00
Sean Molenaar
77fc4c2f8a
audit: check if third version exists before checking URL 2023-02-22 11:58:19 +01:00
Sean Molenaar
4dcf5f0ad7
cask: audit style fixes
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-21 19:29:05 +01:00
Sean Molenaar
8806178cf3
cask: audit if sparkle livecheck needs multipart version 2023-02-21 19:27:07 +01:00
Sean Molenaar
c5786ea799
cask: audit for correct signing of pkg installers 2023-02-21 17:05:55 +01:00
Mike McQuaid
d292dbdc2b
Revert "Fix permissions before moving extracted files." 2023-02-20 17:20:57 +00:00
Mike McQuaid
7f1a0936e5
Merge pull request #14702 from issyl0/greedy-short-g
cmd/(outdated,upgrade): Document `-g` as a shorter `--greedy` for Casks
2023-02-20 09:54:18 +00:00
Markus Reiter
7c5b6fd10d
Add signatures for extraction methods. 2023-02-19 19:29:21 +01:00
Issy Long
44b0050b94
cmd/(outdated,upgrade): Document -g as a shorter --greedy for Casks
- Fixes https://github.com/Homebrew/brew/issues/ 14682.
2023-02-18 18:47:49 +00:00
Sean Molenaar
50e9247da4
fix: add better keys and fuller values to influxDB analytics 2023-02-15 14:12:05 +01:00
Mike McQuaid
08c6b4556d
Merge pull request #14616 from reitermarkus/audit-cask-version
Add audit for versions containing colons or slashes.
2023-02-15 11:59:59 +00:00
Bo Anderson
7ef0c48362
Fix analytics handling when core/cask taps are untapped 2023-02-15 05:31:08 +00:00
Mike McQuaid
1d61b219db
cask/cask: fix non-absolute home error.
Needs a leading slash to avoid `File.expand.path` complaining about non-absolute home.
2023-02-14 17:22:18 +00:00
Mike McQuaid
237eec8ef8
Overhaul Formula/Cask JSON generation
- Use constants for placeholders
- Monkeypatch to set `HOMEBREW_PREFIX` consistently to placeholder
- Use environment variable to set `Dir.home` consistently to placeholder
- Use `appdir` short-circuit to set `Cask#appdir` consistently to placeholder
- Use `Cask.generating_hash!` to enable "generating mode" with these patches
- Fix `Formula#caveats` from JSON

Fixes #14505
Fixes #14595
2023-02-14 14:19:40 +00:00
apainintheneck
39c6f7d6fb Stop including *flight block source in cask API
Originally we were going to try and load the *flight blocks from the API
but we ended up going with downloading the caskfile for the subset of
casks that need this functionality for consisty's sake.

This reverts the following commits from most recent to oldest:
- ffc74a51fb32b66a4cd8bc41dbd076dd23d9100e
- e5616e94fe42505434c330be35eeafef2739944f
- d1490c3d5c087d00f2bca1787cce331202b195c5
- 7ca5a5d9a71a73f21bbb8555a38048f027bee89b
- 2d5d132713d0701d02d5ff33e9918812d13d2a83

It also changes how *flight blocks are handled in `.to_h`.
Essentially, when *flight blocks exist they are just included
as a hash of the artifact to nil to indicate that they exist.

More information isn't necessary since we don't evaluate
the current source code in the *flight artifacts that
we get from the API.
2023-02-13 21:22:18 -08:00
Markus Reiter
cd18703582
Add audit for versions containing colons or slashes. 2023-02-14 02:08:56 +01:00
Mike McQuaid
2a417f1416
Merge pull request #14609 from Bo98/json-fix
Fix `brew info --json` regressions around install status
2023-02-13 15:02:26 +00:00
Bo Anderson
cc956d73aa
Fix brew info --json regressions around install status 2023-02-13 05:07:40 +00:00
Bo Anderson
526871896c
cask: replace Caskroom in API for relocated artifacts 2023-02-13 04:33:53 +00:00
Mike McQuaid
602972e4d0
Merge pull request #14587 from Rylan12/info-json-api 2023-02-12 13:41:20 +00:00
Rylan Polster
f7fa5937d8
Allow brew info --json=v2 without taps with JSON API 2023-02-12 12:03:40 +00:00
apainintheneck
6914c310c7 extend/os: remove cask install code
This code is unnecessary since `--formula` is passed
by default to the install command on Linux making it
impossible to reach `Cask::Cmd::Install.install_casks`
since it is surrounded by `if casks.any?; end`.
2023-02-09 17:35:02 -08:00