28781 Commits

Author SHA1 Message Date
Douglas Eichelberger
b1f722aed7 Update RBI files 2023-03-21 17:37:48 -07:00
Douglas Eichelberger
f38a672938 brew style --fix 2023-03-21 17:37:48 -07:00
Douglas Eichelberger
82dc57dfea Enable UnpackStrategy types 2023-03-21 17:37:46 -07:00
BrewTestBot
8f5f8df00a
sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
2023-03-22 00:27:09 +00:00
Issy Long
bc796a3120
Add a failing test for the arch inside url inside on_* weirdness
- So that I remember what's up with this after some sleep.
2023-03-22 00:23:38 +00:00
Issy Long
8091e603df
rubocops/cask: Ignore livecheck blocks within on_* blocks
- The Cask `sip`, to give a random example, was failing this RuboCop
  because it has a `livecheck` block within an `on_*` block and the
  livecheck block and the top-level Cask both have `url` stanzas. This
  is a legitimate use of `livecheck` blocks because the cask software
  download URL and the livecheck version check URL are not the same
  thing, so let's skip over `livecheck` blocks and their contents.
2023-03-21 23:49:54 +00:00
Issy Long
794cd37dbb
Remove unnecessary skip since toplevel_stanzas doesn't look in blocks
Co-authored-by: Markus Reiter <me@reitermark.us>
2023-03-21 22:51:28 +00:00
Issy Long
7a4a579847
rubocops/cask: Run on_system_stanzas(on_block) once in the beginning
Co-authored-by: Markus Reiter <me@reitermark.us>
2023-03-21 22:51:27 +00:00
Issy Long
c337dc4c81
rubocops/cask: Skip string interpolations when determining inner stanzas
- Otherwise syntax like this, where `#{arch}` is an interpolation,
  causes an offense:

```ruby
cask "transcribe" do
  arch arm: "_arm"

  on_catalina :or_older do
    version "8.75.2"
    sha256 "f01781100cd3b9987c8f8892145a2eaa358df07b92e10e26f30b6a877f5b352c"

    url "https://www.seventhstring.com/xscribe/downmo/transcribe#{version.no_dots}.dmg"

    livecheck_version = "10"
  end
  on_big_sur :or_newer do
    livecheck_version = "11"

    version "9.21"
    sha256 :no_check

    url "https://www.seventhstring.com/xscribe/transcribe#{arch}.dmg"
  end
  [...]
end
```

```
Casks/transcribe.rb:2:3: C: Cask/NoOverrides: Do not use a top-level arch stanza as the default. Add it to an on_{system} block instead.
Use :or_older or :or_newer to specify a range of macOS versions.

  arch arm: "_arm"
  ^^^^^^^^^^^^^^^^

1 file inspected, 1 offense detected
```
2023-03-21 22:51:26 +00:00
Markus Reiter
e04101007f
Fix check for Set. 2023-03-21 22:51:25 +00:00
Issy Long
deb8a13a73
rubocops/cask: Make names, the list of method names in on_*, a Set
Co-authored-by: Markus Reiter <me@reitermark.us>
2023-03-21 22:51:24 +00:00
Issy Long
0b7bd81959
rubocops/cask: No need for the first return if, [].each works OK 2023-03-21 22:51:24 +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
478ba9b604
rubocops/cask: Add another test case to check I've done it right?
- I wrote this because I was concerned that I'd done something wrong
  since `brew style --only=Cask/NoOverrides` in
  `$(brew --repo homebrew/cask)` didn't report any offenses. Turns out
  I'd just missed the `.` off the end of the command to target the
  current directory! But, the cost of writing the test is sunk now,
  and more tests can't hurt?
2023-03-21 22:51:22 +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
35cd764261
rubocops/cask: Tweak offense message to read better 2023-03-21 22:51:20 +00:00
Issy Long
2c5165850a
rubocops/cask: Check ON_SYSTEM_METHODS instead of STANZA_ORDER
- This is already here and used in multiple places. Continuing to use
  `STANZA_ORDER` will break this cop when we add `ON_SYSTEM_METHODS`
  to that list.
2023-03-21 22:51:19 +00:00
Issy Long
ff2fad6bcf
rubocops/cask: Don't force on_* blocks for all stanzas
- In the event that there's only one common stanza within the `on_*`
  blocks (eg, `url`) with a generic `version` that doesn't change per-OS,
  let's not force adding `version` to each `on_*` block as well.
2023-03-21 22:51:18 +00:00
Issy Long
dec1309140
rubocops/cask: Casks with zero on_* blocks are still valid 2023-03-21 22:51:17 +00:00
Issy Long
5ce4966f4a
rubocops/cask: Use ON_SYSTEM_METHODS for skipping
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
2023-03-21 22:51:16 +00:00
Issy Long
9cc046bc60
rubocops/cask: Enforce the use of on_{system} blocks
- As discussed in
  https://github.com/Homebrew/brew/pull/14976#issuecomment-1474544569
  and further comments, this is needed because in order to enforce the
  order of `on_{arch,system}` blocks we need to have everything
  consistently within one of those blocks.
- We previously allowed overrides where the top-level `version` stanza
  would be the default, unless on an OS that had an `on_system` block
  with a `version` specified. But this breaks down when we try to order
  the `on_system` blocks because if a `url` at the top-level has a
  `version` interpolated in it, then the `version` stanza needs to be
  above the `url` stanza. But it could be that `version` is OS-specific.
- Let's stop allowing overrides and require that everything be in an
  `on_system` block. This will make it easier to enforce the order of
  `on_system` blocks in a future PR (14976).
2023-03-21 22:51:12 +00:00
Markus Reiter
3c89f99df1
Fix toplevel_stanzas. 2023-03-21 14:43:59 +01:00
Mike McQuaid
8c6f31a7ac
Merge pull request #15024 from bevanjkay/download-strategy
download_strategy: fix case where filename cannot be parsed
2023-03-21 12:37:35 +00:00
Mike McQuaid
d3d372d6f5
download_strategy: use another blank. 2023-03-21 12:19:06 +00:00
Mike McQuaid
fd0b3e8035
download_strategy: use blank. 2023-03-21 12:18:17 +00:00
Markus Reiter
c6a5d79ef9
Remove explicit error for empty BOM retry. 2023-03-21 00:39:26 +01:00
Bevan Kay
f197f164c8
download_strategy: fix case where filename cannot be parsed 2023-03-21 09:12:07 +11:00
BrewTestBot
2fd89ae605
Update RBI files for stackprof.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-03-20 19:07:52 +00:00
BrewTestBot
062e47d9ca
brew vendor-gems: commit updates. 2023-03-20 19:02:19 +00:00
dependabot[bot]
c1c08859cf
build(deps): bump stackprof from 0.2.23 to 0.2.24 in /Library/Homebrew
Bumps [stackprof](https://github.com/tmm1/stackprof) from 0.2.23 to 0.2.24.
- [Release notes](https://github.com/tmm1/stackprof/releases)
- [Changelog](https://github.com/tmm1/stackprof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tmm1/stackprof/compare/v0.2.23...v0.2.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-20 18:58:42 +00:00
Mike McQuaid
584588afb4
Merge pull request #14971 from MikeMcQuaid/import-postgresql-upgrade-database
cmd/postgresql-upgrade-database: import from homebrew/core.
2023-03-20 15:55:23 +00:00
Mike McQuaid
8bf8393b89
Merge pull request #15021 from MikeMcQuaid/influxdb_cardinality
analytics: improve InfluxDB cardinality
2023-03-20 15:54:17 +00:00
Mike McQuaid
4d8445e29d
analytics: improve InfluxDB cardinality
- roll InfluxDB token (we need to report to a new bucket to fix implicit schema)
- adjust various parameters
- separate default tags and fields
- send more fields and fewer tags (tags should have low cardinality)
- use `--data-binary` to match InfluxDB documentation
- document second precision for greater InfluxDB performance
- pass through tap name, formula/cask name, options separately
- pass `devcmdrun` as a tag
- avoid sending very high-cardinality `OS_VERSION` values
2023-03-20 15:26:47 +00:00
Mike McQuaid
bd8341d422
Merge pull request #15020 from dtrodrigues/pluralize-includecount
Add include_count parameter to pluralize util
2023-03-20 13:53:31 +00:00
Mike McQuaid
1e4abe2cc9
Merge pull request #15018 from dduugg/rm-hash-refinement
Use ActiveSupport Hash#assert_valid_keys instead of refinement
2023-03-20 13:48:47 +00:00
Dustin Rodrigues
b776fb32de
change includecount to include_count for readability 2023-03-20 07:23:17 -04:00
Dustin Rodrigues
e5fba88035
use includecount argument in pluralize 2023-03-19 23:35:47 -04:00
Dustin Rodrigues
b68c955946
utils: add includecount argument to pluralize util 2023-03-19 23:35:40 -04:00
Douglas Eichelberger
92b99b3132 Remove misleading upstream.rbi, enable types in on_system 2023-03-19 19:41:46 -07:00
Douglas Eichelberger
4dcd5ac47f Remove HashValidator 2023-03-19 17:37:58 -07:00
Douglas Eichelberger
516c61057b Use ActiveSupport Hash#assert_valid_keys instend of refinement 2023-03-19 17:37:58 -07:00
Mike McQuaid
94eafdb3fe
Merge pull request #15015 from dtrodrigues/contributions-plural
dev-cmd/contributions: appropriately pluralize contribution statement
2023-03-19 18:52:44 -04:00
Dustin Rodrigues
afae58b430
dev-cmd/contributions: fix typecheck errors 2023-03-19 17:34:35 -04:00
Mike McQuaid
203c93196b
Merge pull request #15011 from carlocab/pr-pull-no-cherry-pick
pr-pull: add `--no-cherry-pick` flag
2023-03-19 17:32:31 -04:00
Mike McQuaid
c5fa3d221c
Merge pull request #15009 from apainintheneck/remove-old-prefix-placeholder
cask: remove old prefix placeholder
2023-03-19 17:29:00 -04:00
Mike McQuaid
96eb047121
Merge pull request #15008 from dduugg/enable-types
Enable types in Library/Homebrew/cask, etc.
2023-03-19 17:22:18 -04:00
Mike McQuaid
c31ae1ce6a
Merge pull request #14948 from hyuraku/remove-cask/cmd/fetch
remove `cask/cmd/fetch`
2023-03-19 17:21:22 -04:00
Dustin Rodrigues
834740f04c
dev-cmd/contributions: refactor to shorten line length 2023-03-19 17:12:11 -04:00
Issy Long
b979646c42
Merge pull request #15000 from issyl0/fix-extra-blank-line-in-caveats
caveats: Remove extra blank line between `keg_only` and other caveats
2023-03-19 20:57:15 +00:00
Dustin Rodrigues
a562d6deee
dev-cmd/contributions: appropriately pluralize contribution statement 2023-03-19 16:55:33 -04:00