33509 Commits

Author SHA1 Message Date
Douglas Eichelberger
c455911059
Merge pull request #18931 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.37.0
build(deps-dev): bump rubocop-ast from 1.36.2 to 1.37.0 in /Library/Homebrew
2024-12-13 20:25:38 +00:00
BrewTestBot
e9e319ac30
Update RBI files for logger.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-13 20:07:39 +00:00
BrewTestBot
c6e1851b20
Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-13 20:07:34 +00:00
BrewTestBot
dff03f05fe
brew vendor-gems: commit updates. 2024-12-13 20:07:32 +00:00
BrewTestBot
61cf19b7c3
brew vendor-gems: commit updates. 2024-12-13 20:07:26 +00:00
dependabot[bot]
34d0200d50
build(deps-dev): bump logger from 1.6.2 to 1.6.3 in /Library/Homebrew
Bumps [logger](https://github.com/ruby/logger) from 1.6.2 to 1.6.3.
- [Release notes](https://github.com/ruby/logger/releases)
- [Commits](https://github.com/ruby/logger/compare/v1.6.2...v1.6.3)

---
updated-dependencies:
- dependency-name: logger
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-13 18:34:00 +00:00
dependabot[bot]
a62ed660f4
build(deps-dev): bump rubocop-ast in /Library/Homebrew
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.36.2 to 1.37.0.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.36.2...v1.37.0)

---
updated-dependencies:
- dependency-name: rubocop-ast
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-13 18:33:47 +00:00
Patrick Linnane
ae4d29312d
Merge pull request #18922 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-3.3.0
build(deps-dev): bump rubocop-rspec from 3.2.0 to 3.3.0 in /Library/Homebrew
2024-12-13 02:38:40 +00:00
Patrick Linnane
59de157457
Merge pull request #18920 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.69.2
build(deps-dev): bump rubocop from 1.69.1 to 1.69.2 in /Library/Homebrew
2024-12-13 02:38:36 +00:00
BrewTestBot
c737251bf4
Update RBI files for rubocop-rspec.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-13 02:28:19 +00:00
BrewTestBot
a9f1b35698
brew vendor-gems: commit updates. 2024-12-13 02:28:09 +00:00
BrewTestBot
b34fe7ed12
Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2024-12-13 02:27:07 +00:00
BrewTestBot
8390c79530
brew vendor-gems: commit updates. 2024-12-13 02:26:44 +00:00
BrewTestBot
2c190f5a99
brew vendor-gems: commit updates. 2024-12-12 22:26:17 +00:00
dependabot[bot]
0faaa336a3
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11690 to 0.5.11691.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 18:45:51 +00:00
dependabot[bot]
d4a128f8e6
build(deps-dev): bump rubocop-rspec in /Library/Homebrew
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 18:45:18 +00:00
dependabot[bot]
6505e84064
build(deps-dev): bump rubocop from 1.69.1 to 1.69.2 in /Library/Homebrew
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.69.1 to 1.69.2.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.69.1...v1.69.2)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-12 18:44:56 +00:00
apainintheneck
9c0987c71c cask/info: update tests 2024-12-12 00:01:30 -08:00
apainintheneck
8bee0555b9 cask/info: send missing args after removing openstruct
This seems like it was a bug before the recent change to remove
OpenStruct from `Homebrew::CLI::Args` but it was failing silently
before. Now we pass the args to the `Cask::Info.info` method so
that when they eventually reach the `Utils::Analytics.output_analytics`
method they are present as expected.

Example error fragment:

```console
$ set -e HOMEBREW_NO_ANALYTICS
$ brew info iterm2 --cask --verbose
==> iterm2: 3.5.10 (auto_updates)
https://iterm2.com/
Installed
/usr/local/Caskroom/iterm2/3.5.4 (91.7MB)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/i/iterm2.rb
==> Name
iTerm2
==> Description
Terminal emulator as alternative to Apple's Terminal app
==> Artifacts
iTerm.app (App)
Error: undefined method `analytics?' for an instance of Homebrew::CLI::Args
/usr/local/Homebrew/Library/Homebrew/utils/analytics.rb:248:in `output_analytics'
/usr/local/Homebrew/Library/Homebrew/utils/analytics.rb:342:in `cask_output'
/usr/local/Homebrew/Library/Homebrew/cask/info.rb:39:in `info'
```
2024-12-11 23:24:22 -08:00
Douglas Eichelberger
9e3e1e1847 Namespace some top-level constants 2024-12-11 11:04:55 -08:00
Douglas Eichelberger
563c2b1d3a
Merge pull request #18847 from Homebrew/no-ostruct
Remove OpenStruct from CLI::Args
2024-12-11 18:41:13 +00:00
Ruoyu Zhong
a50e15e43c
cmd/list: support using --full-name with --installed-on-request et al.
Fixes https://github.com/Homebrew/brew/issues/18908#issuecomment-2532926860.
2024-12-11 11:27:08 +08:00
Douglas Eichelberger
69f2d3bf32
Merge branch 'master' into no-ostruct 2024-12-10 11:00:32 -08:00
Rui Chen
52569372bb
chore(formula): raise error if no universal binaries are found to deuniversalize
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-10 09:26:27 -05:00
Bo Anderson
ccdf39ff4e
dev-cmd/tap-new: improve handling of multi-user setups 2024-12-10 05:24:10 +00:00
Mike McQuaid
ad356d3658
Merge pull request #18903 from Homebrew/livecheck/pypi-handle-regex
Pypi: Restore regex support
2024-12-09 09:11:29 +00:00
apainintheneck
ebede56314 cask/artifact/abstract_uninstall: handle sudo trashed paths correctly
This showed a confusing message when the trash path was able to be
deleted using sudo since the untrashable array was updated but
the check was higher up for returning early.

```
==> Trashing files:
/Users/Shared/Maxon
/Users/Shared/Red Giant
~/Library/Application Support/Maxon
~/Library/Application Support/Red Giant
~/Library/Caches/net.maxon.app-manager
~/Library/Preferences/Maxon
~/Library/Preferences/net.maxon.app-manager.plist
~/Library/Saved Application State/net.maxon.app-manager.savedState
==> Using sudo to gain ownership of path '/Users/Shared/Maxon'
==> Using sudo to gain ownership of path '/Users/Shared/Red Giant'
Warning: The following files could not be trashed, please do so manually:
==> Removing all staged versions of Cask 'maxon'
```

The warning about files not getting trashed should only be shown if
some files didn't get trashed.

Fixes https://github.com/Homebrew/brew/issues/18901
2024-12-08 15:53:59 -08:00
Sam Ford
270313f649
Pypi: Restore regex support
We recently updated the `Pypi` strategy to use the PyPI JSON API and
the default strategy behavior no longer relies on a regex, so the initial implementation didn't include regex handling. This restores
support for a `livecheck` block regex by updating the `DEFAULT_BLOCK`
logic to handle an optional regex. This allows us to use a regex to
omit parts of the `info.version` value without having to duplicate
the default block logic in a `strategy` block only to use a regex.

This isn't currently necessary for any existing formulae using the
`Pypi` strategy but we have a few that needed a custom regex with
the previous strategy approach, so they may need this functionality
in the future. Besides that, restoring regex support to `Pypi`
ensures that `livecheck`/`strategy` blocks work in a fairly
consistent manner across strategies.
2024-12-08 14:29:44 -05:00
Sam Ford
08c927b6a1
Json: Allow nil regex block argument
This updates the block-handling logic in `Json::versions_from_content`
to naively pass the regex value when the block has two parameters. Up
to now, we have been ensuring that `regex` is not `nil` and this
makes sense with existing usage (the `Crate` strategy's default
block, formulae/cask `strategy` blocks). However, we need to allow a
`nil` `regex` value to make it possible to add an optional `regex`
parameter in the `Pypi::DEFAULT_BLOCK` Proc. This is necessary to
allow the `Pypi` strategy to work with an optional regex from a
`livecheck` block again [without creating an additional
`DEFAULT_BLOCK` variant with a regex parameter].
2024-12-08 14:29:44 -05:00
Douglas Eichelberger
ce9216e66c Fix use of tap 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
73046d68ff Make cli_args idiomatic 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
aa7da18d88 Access table internally 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
659f993dab Avoid exposing table 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
6d19b84ef1 Fix args validation 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
2902eec390 Use table lookups 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
1a83801587 Add special case for #tap 2024-12-08 10:28:10 -08:00
Douglas Eichelberger
fef1211c19 Use method result table
foo
2024-12-08 10:28:10 -08:00
Douglas Eichelberger
3ea76b8498 Avoid re-defining #formula? 2024-12-08 10:28:09 -08:00
Douglas Eichelberger
3a4243742f Remove OpenStruct from CLI::Args 2024-12-08 10:27:49 -08:00
Douglas Eichelberger
8fa9b72a96
Merge pull request #18902 from Homebrew/cli-cleanup 2024-12-08 08:40:04 -08:00
Sam Ford
b13a4c5dbb
Merge pull request #18895 from chenrui333/update-to-use-json-endpoint
fix(livecheck/pypi): update to use json endpoint to query version
2024-12-07 23:23:01 -05:00
Sam Ford
ac4854ef9e
Pypi: Expand test coverage
Among other things, the previous commit added a `provided_content`
paramter to `Pypi::find_versions`, so this takes advantage of that to
expand `Pypi` test coverage to 100%.
2024-12-07 20:44:56 -05:00
Sam Ford
935eb89eca
Pypi: Rework to use Json::find_versions
This reworks the new `Pypi` JSON API implementation to use
`Json::find_versions` in `Pypi::find_versions`, borrowing some of the
approach from the `Crate` strategy.

Besides that, this pares down the fields in the
`::generate_input_values` return hash to only `:url`, as we're not
using a generated regex to match version information in this setup.

This adds a `provided_content` parameter to `::find_versions` as part
of this process and I will expand the `Pypi` tests to increase
coverage (like the `Crates` tests) in a later PR. 75% of `Pypi` checks
are failing at the moment (with some returning inaccurate version
information), so the current priority is getting this fix merged in
the short-term.
2024-12-07 20:40:55 -05:00
Ruoyu Zhong
8896086cb1
Merge pull request #18897 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11690
build(deps-dev): bump sorbet from 0.5.11685 to 0.5.11690 in /Library/Homebrew
2024-12-08 03:19:28 +08:00
BrewTestBot
103e371fec
brew vendor-gems: commit updates. 2024-12-07 19:09:57 +00:00
apainintheneck
9567d57e39 Add missing utils/service require
This was originally added in https://github.com/Homebrew/brew/pull/18865.

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
/usr/local/Homebrew/Library/Homebrew/service.rb:458:in `block in to_systemd_unit': uninitialized constant Utils::Service (NameError)
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `map'
        from /usr/local/Homebrew/Library/Homebrew/service.rb:458:in `to_systemd_unit'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `bind_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/call_validation.rb:278:in `validate_call'
        from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11685/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added'
        from -e:1:in `<main>'
```

```console
$ brew ruby -e 'p "activemq".f.service.to_systemd_unit'
"[Unit]\nDescription=Homebrew generated unit for activemq\n\n[Install]\nWantedBy=default.target\n\n[Service]\nType=simple\nExecStart=\"/usr/local/opt/activemq/bin/activemq\" \"console\"\nWorkingDirectory=/usr/local/opt/activemq/libexec\n"
```
2024-12-07 10:35:33 -08:00
dependabot[bot]
895f130c2d
build(deps-dev): bump sorbet in /Library/Homebrew
Bumps [sorbet](https://github.com/sorbet/sorbet) from 0.5.11685 to 0.5.11690.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-07 17:17:01 +00:00
Douglas Eichelberger
06aaeafa4f Minor CLI code improvements 2024-12-07 08:09:15 -08:00
Rui Chen
d49e01b82b
fix(livecheck/pypi): update to use json endpoint to query version
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-12-07 02:00:18 -05:00
Ruoyu Zhong
405cedad23
Merge pull request #18893 from Homebrew/dependabot/bundler/Library/Homebrew/sorbet-0.5.11685
build(deps-dev): bump sorbet from 0.5.11681 to 0.5.11685 in /Library/Homebrew
2024-12-07 10:35:36 +08:00