36194 Commits

Author SHA1 Message Date
Sam Ford
a2e966c186
Xml: Move require outside of #parse_xml
Since we use `REXML::Document` in the type signature for `#parse_xml`,
we can encounter an `uninitialized constant
Homebrew::Livecheck::Strategy::Xml::REXML` error in strategies like
`Sparkle` that use `Xml#parse_xml` internally when the Sorbet runtime
is used. Moving the related require outside of the `#parse_xml` method
and into the `Xml` strategy proper resolves this issue.
2023-04-29 10:16:47 -04:00
Sam Ford
6597ee6fd3
Sparkle: Account for nil content value
`content` can be `nil` when a request doesn't succeed but
`#versions_from_content` expects a `String` value, so we need to
guard against a `nil` value like we do in other strategies.
2023-04-29 10:16:47 -04:00
Sam Ford
1c03018b6a
Launchpad: Use DEFAULT_REGEX as default regex arg
Using `DEFAULT_REGEX` as the default value of the `#find_versions`
`regex` parameter allows us to tighten the type.
2023-04-29 10:16:46 -04:00
Sam Ford
a28e1aa422
livecheck: Selectively pass args to #find_versions
The existing way of passing values to `#find_versions` methods in
strategies leads to type issues when the Sorbet runtime is enabled.
We've also recently talked about moving away from nilable args when
we can specify a default value but this doesn't work if we pass in a
`nil` value (like we're currently doing).

This commit aims to address both of those areas by better controlling
which arguments we're passing to `#find_versions`. This approach
naively handles `cask`/`url` arguments by special-casing
`ExtractPlist`.

However, we should be checking the strategy's `#find_versions`
method for a `cask` or `url` keyword parameter. The issue is that
`strategy.method(:find_versions).parameters` is returning
`[[:rest, :args], [:block, :blk]]` instead of the actual parameters
like `[[:keyreq, :url], [:key, :regex], [:keyrest, :unused],
[:block, :block]]`.
2023-04-29 10:16:45 -04:00
Mike McQuaid
cd683aefa8
Merge pull request #14629 from Kentzo/sudo-user
sudo: explicitly specify the root user where necessary
2023-04-29 11:17:21 +01:00
Markus Reiter
e666dd6b4f
Merge pull request #15332 from reitermarkus/typecheck-nested-url
Fix type for nested `url` blocks.
2023-04-29 12:13:06 +02:00
Mike McQuaid
5a4c3ccde7
Merge pull request #15331 from Homebrew/sorbet-files-update
sorbet: Update RBI files.
2023-04-29 11:12:26 +01:00
Mike McQuaid
ca155cba39
Merge pull request #15330 from Homebrew/dependabot/bundler/Library/Homebrew/zeitwerk-2.6.8
build(deps): bump zeitwerk from 2.6.7 to 2.6.8 in /Library/Homebrew
2023-04-29 11:11:58 +01:00
Mike McQuaid
4789d18c7c
Merge pull request #15328 from Kentzo/timeout-typo
download_strategy: Fix the timeout value.
2023-04-29 11:11:41 +01:00
Carlo Cabrera
aec05e6b19
Merge pull request #15333 from carlocab/test-runner-debug
determine-test-runners: add debug output
2023-04-29 11:52:27 +08:00
Carlo Cabrera
f3724f00d2
determine-test-runners: fix test 2023-04-29 11:36:31 +08:00
Carlo Cabrera
50df7fab28
determine-test-runners: add debug output
The extra timeout on Intel Big Sur doesn't seem to be set, so I'm adding
this so I can have a closer look.
2023-04-29 11:03:27 +08:00
Markus Reiter
af1961d509
Fix type for nested url blocks. 2023-04-29 03:33:59 +02:00
BrewTestBot
e3baa09a14
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-04-29 00:24:09 +00:00
BrewTestBot
811d755e7f
Update RBI files for zeitwerk.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-28 19:06:59 +00:00
BrewTestBot
f47fc81dd9
brew vendor-gems: commit updates. 2023-04-28 19:02:30 +00:00
dependabot[bot]
2e947b9c35
build(deps): bump zeitwerk from 2.6.7 to 2.6.8 in /Library/Homebrew
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.6.7 to 2.6.8.
- [Release notes](https://github.com/fxn/zeitwerk/releases)
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.6.7...v2.6.8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-28 18:59:56 +00:00
Ilya Kulakov
6a4322833f sudo: Fix tests. 2023-04-28 11:22:54 -07:00
Ilya Kulakov
476d97934f sudo: change sudo_user to sudo_as_root. 2023-04-28 11:22:54 -07:00
Ilya Kulakov
d470661b37 sudo: add the sudo_user arg to SystemCommand. 2023-04-28 11:11:53 -07:00
Ilya Kulakov
563387a7b4 sudo: explicitly specify the root user where necessary
With sudoers one may override default sudo user. This mostly works
provided the admin configured the replacement appropriately. However
there are exceptions that absolutely must be run by root such as
/usr/sbin/installer and, under certain circumstances, /bin/launchctl.
2023-04-28 11:11:53 -07:00
Ilya Kulakov
a63ccfa8ff download_strategy: Fix the timeout value. 2023-04-28 10:11:24 -07:00
Mike McQuaid
e191b827cc
Merge pull request #15257 from Bo98/download-refactor
Refactor formula, cask and Ruby source downloads to use shared code
2023-04-28 08:30:51 +01:00
Bo Anderson
44f058edb5
Refactor formula, cask and Ruby source downloads to use shared code 2023-04-27 23:23:07 +01:00
Mike McQuaid
7386d4e407
Merge pull request #15316 from Homebrew/dependabot/bundler/Library/Homebrew/i18n-1.13.0
build(deps): bump i18n from 1.12.0 to 1.13.0 in /Library/Homebrew
2023-04-27 17:57:19 +01:00
BrewTestBot
45308ed3eb
Update RBI files for i18n.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-27 16:41:43 +00:00
BrewTestBot
a8f023f8bb
brew vendor-gems: commit updates. 2023-04-27 16:37:05 +00:00
dependabot[bot]
7945f0c123
build(deps): bump i18n from 1.12.0 to 1.13.0 in /Library/Homebrew
Bumps [i18n](https://github.com/ruby-i18n/i18n) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/ruby-i18n/i18n/releases)
- [Changelog](https://github.com/ruby-i18n/i18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-i18n/i18n/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: i18n
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 16:34:24 +00:00
Mike McQuaid
e06b2fd3f8
Merge pull request #15325 from woodruffw-forks/ww/more-normalize
pypi: normalize name in `pypi_info`
2023-04-27 17:31:27 +01:00
William Woodruff
ea6423094b
pypi: normalize name in pypi_info
Signed-off-by: William Woodruff <william@yossarian.net>
2023-04-27 10:14:17 -06:00
JBYoshi
84fe93e5d7
Remove successor behavior for zapping. 2023-04-27 10:40:45 -05:00
Mike McQuaid
f543b6f53e
Merge pull request #15323 from Homebrew/sorbet-files-update
sorbet: Update RBI files.
2023-04-27 16:30:59 +01:00
Douglas Eichelberger
6bc94abadc Remove delegation of ReporterHub#empty? 2023-04-27 08:13:51 -07:00
Mike McQuaid
50a699315f
Merge pull request #15324 from Bo98/codecov-file-fix
workflows/tests: fix Codecov root dir
2023-04-27 15:12:01 +01:00
Bo Anderson
b5f4e8e790
workflows/tests: fix Codecov root dir 2023-04-27 14:59:18 +01:00
Mike McQuaid
9d5b017bb9
Merge pull request #15322 from carlocab/rm-linux-cleanup
github_runner_matrix: remove `HOMEBREW_LINUX_CLEANUP`
2023-04-27 12:28:45 +01:00
BrewTestBot
93f8627a58
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-04-27 11:14:15 +00:00
Carlo Cabrera
ff728da97b
github_runner_matrix: remove HOMEBREW_LINUX_CLEANUP
This will allow us to remove handling of this in our workflow files in
Homebrew/core.
2023-04-27 16:45:51 +08:00
Mike McQuaid
b2aa6fb74f
Merge pull request #15320 from Bo98/api-oldnames
Support multiple oldnames for formulae & support formula renames in API
2023-04-27 08:36:16 +01:00
Mike McQuaid
5fccd4ef34
Merge pull request #15318 from razvanazamfirei/modify-bump-logic
`brew bump`: modify versioning logic
2023-04-27 08:30:33 +01:00
Mike McQuaid
4f1830631a
Merge pull request #15312 from issyl0/rubocop-enabled-by-default
rubocop: Set `EnabledByDefault: true`, disabling cops with offenses
2023-04-27 08:29:17 +01:00
Bo Anderson
5510c3fb2b
Support formula renames in API 2023-04-27 05:15:45 +01:00
Bo Anderson
a696bd8203
Support multiple oldnames for formulae 2023-04-27 05:15:43 +01:00
Carlo Cabrera
721f5534ab
Merge pull request #15319 from carlocab/cleanup-github-runner
github_runner_matrix: cleanup GitHub macOS runner
2023-04-27 11:20:51 +08:00
Carlo Cabrera
b339d9f8be
github_runner_matrix: cleanup GitHub macOS runner
These come with some pre-installed software that we probably want to
clean up first.
2023-04-27 09:59:22 +08:00
Razvan Azamfirei
33ddc2d818
modify bump logic 2023-04-26 19:53:10 -04:00
Mike McQuaid
6b33197d54
Merge pull request #15313 from carlocab/deps-build-on-github
github_runner_matrix: test dependents on GitHub runners
2023-04-27 00:34:54 +01:00
Carlo Cabrera
3bfe3e3037
github_runner_matrix: fix tests 2023-04-27 07:20:58 +08:00
Issy Long
0ea46b884b
Fix Rails cop enablement now EnabledByDefault is set
- These were `Enabled: false` for the whole group of Rails cops, so my
  removing the `Enabled: true` cops (what I thought was "redundant"
  config in the previous commit) meant the specific ones we wanted to
  use weren't enabled at all.
- Instead, let's reverse that by unsetting `Enabled: false` for the
  whole group, and then disabling the specific cops with offenses that
  we haven't got around to deciding if we care about yet.
2023-04-26 23:06:26 +01:00
Issy Long
d695c8a311
rubocop: Remove redundant Enabled: true config
- This is done by `EnabledByDefault: true` in the `AllCops` section.
2023-04-26 23:05:07 +01:00