36540 Commits

Author SHA1 Message Date
Markus Reiter
95e3b43647
Fix repo audit for discontinued casks. 2023-04-14 19:02:07 +02:00
Carlo Cabrera
2816c1274f
Merge pull request #15224 from carlocab/github-vars
brew: don't filter `GITHUB_EVENT_NAME`
2023-04-14 20:53:19 +08:00
Carlo Cabrera
de95396407
brew: don't filter GITHUB_EVENT_NAME
We need this in `test-bot`. See Homebrew/homebrew-test-bot#905 and
Homebrew/homebrew-test-bot#906.
2023-04-14 20:40:14 +08:00
Markus Reiter
46c0df1379
Merge pull request #15063 from reitermarkus/audit-arch
Allow running `audit` for different architecture.
2023-04-14 13:29:05 +02:00
Mike McQuaid
9912dcab7c
Merge pull request #15220 from Homebrew/dependabot/bundler/Library/Homebrew/yard-0.9.34
build(deps): bump yard from 0.9.33 to 0.9.34 in /Library/Homebrew
2023-04-13 19:43:45 +01:00
BrewTestBot
85b0db6e07
Update RBI files for yard.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-13 18:25:42 +00:00
BrewTestBot
4d4419c915
brew vendor-gems: commit updates. 2023-04-13 18:18:32 +00:00
dependabot[bot]
4d87cd16be
build(deps): bump yard from 0.9.33 to 0.9.34 in /Library/Homebrew
Bumps [yard](https://github.com/lsegal/yard) from 0.9.33 to 0.9.34.
- [Release notes](https://github.com/lsegal/yard/releases)
- [Changelog](https://github.com/lsegal/yard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lsegal/yard/compare/v0.9.33...v0.9.34)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 18:14:38 +00:00
Issy Long
6de61e4994
Ensure that stanza grouping works for nested stanzas with comments
- Since moving `comments_hash` to `Stanza`, we've been using the wrong
  kind of "comments": the comments for the _stanza_, not the comments
  for the entire Cask.
- Add a test to ensure this actually works. There was previously an
  infinite loop here due to the bad `comments`, visible in a `StanzaOrder`
  cop test, which I speculatively added a failing test for. Turns out
  that supporting nested stanza _ordering_ (vs. just grouping) is a
  whole separate piece of work (there are multiple TODOs there already),
  so I've backed that out and will do that separately.
2023-04-13 15:59:18 +01:00
hyuraku
98ec60c15e remove nil param 2023-04-13 19:02:20 +09:00
Mike McQuaid
688b732ea0
Merge pull request #15216 from ZhongRuoyu/locale
test/cask/dsl_spec: fix test for certain locale settings
2023-04-13 08:27:51 +01:00
Ruoyu Zhong
b4dba7a42a
locale: reorder segments to match standard format
Following #14998, reorder the locale segments to `language`, `script`,
`region` to match the standard format. This does not require changes
outside the `Locale` class because `Locale` instances are always
constructed with the `parse` method.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-04-13 11:31:24 +08:00
Ruoyu Zhong
1dd2e0cd7f
test/cask/dsl_spec: fix test for certain locale settings
As I mentioned in #15146, two `Cask::DSL` tests failed on my local
machine, even on `master`. `git bisect` suggested that it was #14998
that introduced those failures. It turned out that the tests here could
fail under certain locale settings, like this one below:

    $ defaults read -g AppleLanguages
    (
        "en-GB",
        "zh-Hans-SG"
    )

This is not actually a regression. With the aforementioned locale
settings, an explicit `let(:languages) { ["en"] }` setting would result
in locales being considered in the following order: `en`, `en-GB`,
`zh-Hans-SG`. For each of them, the `detect` method from `Locale` is
called, with `locale_groups` as `[["zh"], ["en-US"]]`, the list of
locales defined in the test cask.

    def detect(locale_groups)
      locale_groups.find { |locales| locales.any? { |locale| eql?(locale) } } ||
        locale_groups.find { |locales| locales.any? { |locale| include?(locale) } }
    end

Neither of `en` and `en-GB` satisfies the `detect` conditions. (Note
that `Locale.parse("en").include?("en-US")` evaluates to `false`.) But
`zh-Hans-SG` does (because `Locale.parse("zh-Hans-SG").include?("zh")`
is `true`). So, despite having `:languages` set to `en`, the Chinese
locale was still used.

This could be fixed by generalising the test cask's English locale
settings from `en-US` to `en`. This is already the case for most
existing casks:

    $ grep 'language "en.*", default: true' Casks/*.rb
    Casks/battle-net.rb:  language "en", default: true do
    Casks/cave-story.rb:  language "en", default: true do
    Casks/firefox.rb:  language "en", default: true do
    Casks/libreoffice-language-pack.rb:    language "en-GB", default: true do
    Casks/libreoffice-language-pack.rb:    language "en-GB", default: true do
    Casks/openoffice.rb:  language "en", default: true do
    Casks/seamonkey.rb:  language "en-US", default: true do
    Casks/thunderbird.rb:  language "en", default: true do
    Casks/wondershare-edrawmax.rb:  language "en", default: true do

Note that this should make the language stanza tests independent of
locale settings, because `zh` and `en` should be able to capture all the
test cases.

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-04-13 11:27:20 +08:00
Markus Reiter
8b9ee05118
Cache Stanza#comments. 2023-04-12 23:08:49 +02:00
Issy Long
6e6493bd1b
Fix Stanza#source_range_with_comments
- All hail Sorbet for telling me that I forgot to rename this variable!
2023-04-12 20:52:38 +01:00
Markus Reiter
66d80cb114
Allow running audit for different architecture. 2023-04-12 21:46:48 +02:00
Issy Long
10bdb9f653
Don't pass cask_node into Stanza, stanza_node.parent is enough 2023-04-12 20:46:23 +01:00
Issy Long
519c1b46d8
In-line converting nodes to stanzas; move comment detection to Stanza
- Since comment detection is only used in `Stanza`, move it there.
- The `stanzaify` method was only in `CaskBlock` since the other use of
  `Stanza.new` was. Since it's only used in one other place, move it to
  where it's used.
2023-04-12 20:46:22 +01:00
Issy Long
233db299cd
rubocop/cask: Check for correct stanza grouping within on_* blocks
- A variant of this was an ancient TODO from 2018 (with `if/else` blocks).
- Now in 2023 we have `on_*` blocks within Casks that are very common.
- The most common stanzas present inside `on_*` blocks are `version`,
  `sha256` and `url`. So I feel like it's worth keeping a consistent
  style for these inside and outside `on_*` blocks.
2023-04-12 20:46:20 +01:00
Markus Reiter
5c56cb73c6
Merge pull request #15214 from Homebrew/dependabot/bundler/Library/Homebrew/yard-0.9.33
build(deps): bump yard from 0.9.32 to 0.9.33 in /Library/Homebrew
2023-04-12 21:35:26 +02:00
Markus Reiter
1d84750147
Merge pull request #15213 from Homebrew/dependabot/github_actions/codecov/codecov-action-3.1.2
build(deps): bump codecov/codecov-action from 3.1.1 to 3.1.2
2023-04-12 21:28:37 +02:00
Markus Reiter
7fa2763521
Merge pull request #15215 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.50.1
build(deps): bump rubocop from 1.50.0 to 1.50.1 in /Library/Homebrew
2023-04-12 21:28:11 +02:00
BrewTestBot
503305b185
Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-12 19:11:07 +00:00
BrewTestBot
284fb1b7dd
Update RBI files for yard.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-12 19:08:42 +00:00
BrewTestBot
009b50c73b
brew vendor-gems: commit updates. 2023-04-12 19:02:50 +00:00
BrewTestBot
689753ca53
brew vendor-gems: commit updates. 2023-04-12 19:02:11 +00:00
dependabot[bot]
f7851d0bf4
build(deps): bump rubocop from 1.50.0 to 1.50.1 in /Library/Homebrew
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.50.0 to 1.50.1.
- [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.50.0...v1.50.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 18:58:54 +00:00
dependabot[bot]
327ed30d22
build(deps): bump yard from 0.9.32 to 0.9.33 in /Library/Homebrew
Bumps [yard](https://github.com/lsegal/yard) from 0.9.32 to 0.9.33.
- [Release notes](https://github.com/lsegal/yard/releases)
- [Changelog](https://github.com/lsegal/yard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lsegal/yard/compare/v0.9.32...v0.9.33)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 18:58:08 +00:00
dependabot[bot]
625e976fb4
build(deps): bump codecov/codecov-action from 3.1.1 to 3.1.2
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](d9f34f8cd5...40a12dcee2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-12 18:56:46 +00:00
Markus Reiter
9b60fcf7ac
Merge pull request #15212 from reitermarkus/fix-audit-pkg
Fix codesign audit paths.
4.0.13
2023-04-12 20:29:34 +02:00
Markus Reiter
19939ac276
Fix codesign audit paths. 2023-04-12 19:57:42 +02:00
Bo Anderson
8c69c95417
Merge pull request #15204 from Bo98/portable-ruby-2.6.10_1
Portable Ruby 2.6.10_1
2023-04-12 16:13:36 +01:00
Carlo Cabrera
b15e448dbf
Merge pull request #15210 from carlocab/actionlint
workflows: add actionlint workflow
2023-04-12 22:22:25 +08:00
hyuraku
b8f18309c3 repair variable 2023-04-12 22:23:08 +09:00
hyuraku
acca57a2d8 repair cask_results query 2023-04-12 21:59:28 +09:00
Carlo Cabrera
7b85950e7a
workflows: add actionlint workflow
Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-04-12 20:31:17 +08:00
Mike McQuaid
81b6c79d42
Merge pull request #15209 from Bo98/search-no-remote
search: remove remote searching
2023-04-12 13:29:11 +01:00
Bo Anderson
3697825784
search: remove remote searching 2023-04-12 13:16:19 +01:00
Bo Anderson
e2aae0fa63
Require Ruby 2.6.10 2023-04-12 13:15:34 +01:00
Mike McQuaid
92d68e318d
Merge pull request #15174 from razvanazamfirei/fish-completions
Update fish completions
2023-04-12 12:39:23 +01:00
hyuraku
f7b51d8cd1 pass opitions as named parameters 2023-04-12 20:16:10 +09:00
Issy Long
14ff148750
Merge pull request #15207 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.50.0
build(deps): bump rubocop from 1.49.0 to 1.50.0 in /Library/Homebrew
2023-04-12 12:10:34 +01:00
Razvan Azamfirei
5080010da2
change some fish completions to brew --repo 2023-04-12 05:15:19 -04:00
Mike McQuaid
0d749b5db0
Merge pull request #15173 from ywwry66/fix-brew-tests-tar
Don't save mac metadata/extended attributes for `brew bottle`
2023-04-12 06:58:41 +01:00
Kevin
9f1d00e1df
Merge pull request #15206 from reitermarkus/macos-version-tests
Make test not depend on macOS version.
2023-04-11 22:50:25 -07:00
Markus Reiter
a085fb4ead
Fix code style.
Co-authored-by: Issy Long <issyl0@github.com>
2023-04-12 00:05:47 +02:00
Issy Long
5aa24832df
brew style --fix 2023-04-11 21:12:13 +01:00
BrewTestBot
ad188c9a4b
Update RBI files for rubocop.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-04-11 20:04:55 +00:00
BrewTestBot
73b1fd1388
brew vendor-gems: commit updates. 2023-04-11 19:58:03 +00:00
dependabot[bot]
e6cc04668c
build(deps): bump rubocop from 1.49.0 to 1.50.0 in /Library/Homebrew
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.49.0 to 1.50.0.
- [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.49.0...v1.50.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-11 19:54:01 +00:00