366 Commits

Author SHA1 Message Date
Douglas Eichelberger
9075cbae62 brew style --fix 2023-04-21 09:58:50 -07:00
Douglas Eichelberger
ac1e6ded9a git grep -l '# typed: false' | xargs gsed -i 's|# typed: false||g' 2023-04-21 09:57:47 -07:00
apainintheneck
1322b9cb79 cask: remove os_versions
This was originally used by the API but was replaced months
ago by SimulateSystem. Essentially, it's only current use
was in the #to_h method but is not used internally at all
when creating cask instances from the API JSON.
2023-04-16 13:52:24 -07:00
Markus Reiter
3275b927b8
Make test not depend on macOS version. 2023-04-11 21:02:10 +02:00
Issy Long
6536b641f4
Fix ruby_source_path in Ventura systemsettings-caveats fixture JSON
- Cask source paths were added to the API in 844db75361. The main
  `everything.json` file was updated with the new data in that commit,
  but this one was missed causing local test failures.

Before:

```
Cask::Cask#to_h when loaded from cask file returns expected hash
  Failure/Error: expect(JSON.pretty_generate(hash)).to eq(expected_json_after_ventura)
    [...]

    Diff:
    @@ -93,7 +93,7 @@
        "en",
        "eo"
      ],
    -  "ruby_source_path": "Formula/everything.rb",
    +  "ruby_source_path": "Casks/everything.rb",
      "ruby_source_checksum": {
        "sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
      }

  # ./test/cask/cask_spec.rb:231:in `block (4 levels) in <top (required)>'
  # ./test/support/helper/spec/shared_context/homebrew_cask.rb:52:in `block (2 levels) in <top (required)>'
```
2023-04-11 00:33:11 +01:00
Markus Reiter
844db75361
Add source paths to API. 2023-04-07 15:20:01 +02:00
Markus Reiter
bdd6523ce8
Deprecate appcast. 2023-03-30 03:29:06 +02:00
Issy Long
039a434936
Merge pull request #14976 from issyl0/rubocop-cask-on-arch-block-order
rubocops/cask: Enforce the order of `on_#{arch}` blocks
2023-03-29 12:10:37 +01:00
Markus Reiter
3da305fa80
Add keyboard_layout stanza. 2023-03-26 08:14:24 +02:00
Issy Long
0af5825dfb
rubocops/cask: on_#{os_version} is after [version & sha256] group
- This still doesn't pass `brew readall` for Casks, but it gets us a
  little closer since if `url` has a `version` interpolated in it, the
  `version` stanza has to come first.
- See https://github.com/Homebrew/homebrew-cask/pull/143201 for the
  current failures.
2023-03-25 16:02:30 +00:00
Issy Long
ebdd408f99
test/fixtures: Put the on_system blocks in oldest => newest order 2023-03-21 22:51:23 +00:00
Issy Long
1e18e88c68
test/fixtures: Fix style for the new Cask/NoOverrides cop 2023-03-21 22:51:21 +00:00
Issy Long
865e99c611
test/cask: Rename 'expected_json_ventura' since it's >= Ventura
- Let's actually show in the fixtures JSON filename what's changed
  between the two.
2023-03-18 15:16:23 +00:00
Issy Long
6b4b923b44
test/cask: Fix "System Settings" caveats for (non-)Ventura OSes
- "System Preferences" was updated to be "System Settings" in macOS
  Ventura. This naming was updated in our caveats generator in PR 14997.
- This test was failing for me locally (on Ventura) because it was
  hardcoded to expect `System Preferences => Security & Privacy`, but
  getting `System Settings => Privacy & Security`.
- This is not the most important thing in the world, we can probably
  live with the failing test, but I thought I'd try to fix it anyway.
2023-03-18 13:19:20 +00:00
Douglas Eichelberger
4d32699f61 Placate rubocop 2023-03-14 23:01:09 -07:00
Issy Long
6a704f2f40
sorbet: Bump more files to typed: true
- This was done through the `brew typecheck --suggest-typed --update`
  command.
2023-03-05 18:18:59 +00:00
apainintheneck
9087afba74 Add baseline test for Cask#to_h
Also, added a test for loading JSON files in the cask loader.
2023-02-28 21:43:02 -08:00
Bevan Kay
48a7282458
fix style 2023-02-28 19:02:08 +11:00
Bevan Kay
295a3539a5
Update with-many-languages.rb 2023-02-28 18:55:12 +11:00
Bevan Kay
d1b09a90da
cask/auditor: only audit 10 languages by default on casks with many languages 2023-02-28 18:54:27 +11:00
Mike McQuaid
a743e9277f
workflows/tests: faster, more reliable tests.
- Extract update tests into separate tests.
- Make `brew tests --online` run only once in its own job. This job
  could be made non-required to fight flakiness.
- Split up the various macOS runs into several steps now that we have
  more parallel macOS workers available.
- Cleanup some flaky tests.
2023-02-17 15:26:18 +00: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
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
Douglas Eichelberger
dead4de3fc Resolve Lint/EmptyBlock todos 2023-01-26 21:18:24 -08:00
Mike McQuaid
c3294f9356
test: add instance variable comments. 2023-01-24 10:15:25 +00:00
Douglas Eichelberger
49ca993074 git grep -l rubocop:todo test/ | xargs gsed -i 's|rubocop:todo|rubocop:disable|g' 2023-01-23 11:51:12 -08:00
Douglas Eichelberger
c45efc6eff rubocop --autocorrect --disable-uncorrectable 2023-01-23 11:49:04 -08:00
Rylan Polster
2d5d132713
Include *flight block source in cask API 2023-01-02 14:33:33 -05:00
Mike McQuaid
5994f165f5
Merge pull request #14123 from bevanjkay/cask-wildcard-launchctl
cask/artifact/abstract_uninstall: allow wildcard entries for launchctl
2022-12-29 19:26:53 +00:00
Rylan Polster
d316819f0c
Add tests 2022-12-28 16:10:26 -05:00
Mike McQuaid
1a21c7e7ef
Merge pull request #13658 from bevanjkay/extract-plist-installerpath
unversioned_cask_checker: check installer artifacts
2022-12-28 15:05:26 +00:00
Bevan Kay
e0f067bab8
Update tests 2022-12-28 11:49:37 +11:00
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Bevan Kay
e8e6ee30b4
add initial tests 2022-12-13 00:00:43 +11:00
Bevan Kay
96574c831f
fix tests 2022-12-05 15:20:45 +11:00
Bevan Kay
40fd8f7d78
unversioned_cask_checker: check installer artifacts 2022-12-05 14:26:38 +11:00
Mike McQuaid
59f4b5226a
tests: test on Ubuntu 18.04. 2022-11-09 14:45:43 +00:00
Bo Anderson
7d7083d0f3
Universally apply Ruby disable options 2022-11-05 01:58:12 +00:00
Bo Anderson
4f4747cf98
Merge pull request #14014 from Bo98/ruby3-part2
Additional fixes for Ruby 3 compatibility
2022-10-20 16:17:01 +01:00
Mike McQuaid
bfd2263425
integration_test: fix Bundler deprecation.
Otherwise in some configurations some tests will fail.
2022-10-20 13:33:27 +01:00
Mike McQuaid
416af82670
macOS Ventura (and related) test fixes
- fix `check_for_config_scripts` test, no idea why this wasn't working
- don't autoretry tests if `focus` or `byebug` are enabled
- add a ARM64 Ventura bottle symlink
2022-10-20 11:28:27 +01:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Bo Anderson
15280ba107
test: avoid improper, late usage of formula DSL 2022-08-31 20:40:39 +01:00
Rylan Polster
3f00893201
Include on_{system} blocks as stanzas in rubocop 2022-08-23 14:09:29 -04:00
Rylan Polster
686e02b7ce
Add arm: and intel: arguments to cask sha256 stanza 2022-08-16 00:48:24 -04:00
Mike McQuaid
40c4e5f228
Merge pull request #13671 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.34.1
build(deps): bump rubocop from 1.33.0 to 1.34.1 in /Library/Homebrew
2022-08-11 14:03:59 +01:00
Rylan Polster
39071d5816
Remove arch from cask stanza ordering temporarily 2022-08-10 15:37:28 -04:00
Mike McQuaid
6b697470fd
brew style --fix
For https://github.com/Homebrew/brew/pull/13671
2022-08-10 14:19:33 +01:00