270 Commits

Author SHA1 Message Date
Issy Long
935649abaf
Merge pull request #15263 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-rspec-2.20.0
build(deps): bump rubocop-rspec from 2.19.0 to 2.20.0 in /Library/Homebrew
2023-04-22 18:58:03 +01:00
Issy Long
4a87c624d7
Fix new RSpec/IndexedLet offenses 2023-04-22 01:02:38 +01:00
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
Bo Anderson
3697825784
search: remove remote searching 2023-04-12 13:16:19 +01:00
Mike McQuaid
63d8de3600
brew style --fix 2023-04-07 19:10:22 +01: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
b8743d337b
Merge pull request #14991 from issyl0/cask-url-audit-pass-referrer
cask/audit: Pass a URL's `referer` through to cURL
2023-03-17 15:33:38 -04:00
Issy Long
0701ea42fa
cask/audit: Pass a URL's referer through to cURL
- Some casks have URL arguments like "referer" (spelled wrong, that's
  intentional in the HTTP spec).
- The audit for one such cask, `iThoughtsX`, was failing because the
  "referer" wasn't getting passed through to cURL so the access would
  404.

----

Before:

```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - The binary URL https://cdn.toketaware.com?download=iThoughtsX.zip is not reachable (HTTP status code 404)
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 2 problems in 1 cask detected
```

After:

```
❯ brew audit --cask --online --appcast --signing 'ithoughtsx'
[...]
audit for ithoughtsx: failed
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
 - Version '9.2.0' differs from '9.3.0' retrieved by livecheck.
Error: 1 problem in 1 cask detected
```
2023-03-16 23:28:50 +00:00
Markus Reiter
9d415e22da
Simplify SPDX test. 2023-03-15 14:30:47 +01:00
Issy Long
3a83b5492c
rubocop: Clean up Style/BlockDelimiters excludes and autofix offenses
- The defaults of using "do ... end" for multi-line blocks everywhere is
  good, better than switching everything to braces everywhere.
2023-03-08 23:54:22 +00:00
Mike McQuaid
f4e180c40b
brew style --fix 2023-03-07 08:57:57 +00:00
Issy Long
7a334070b8
Merge pull request #14893 from issyl0/sorbet-bumps 2023-03-06 12:23:59 +00:00
Issy Long
984e8d1503
Merge pull request #14877 from issyl0/rubocop-layout/multiline-method-indentation
rubocop: Enable `Layout/MultilineMethodCallIndentation` & fix offenses
2023-03-06 12:18:29 +00: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
Issy Long
edeefebf61
utils/github: Fix double counting of author/committer numbers
- The usage of this in `brew contributions` wasn't correct for a user
  with 5 authored commits to homebrew/cask that had been committed by
  other people, the numbers would turn out as 5 authored, 5 committed.
- I decided to do this properly by getting the SHAs for author and
  committer and determine the differences between the two arrays.
  This also accounts for when authored commits are 0, or committed
  commits, or both.
- Add tests, because I don't want to fix this a third time!
2023-03-05 14:41:04 +00:00
Issy Long
734a651f93
rubocop: Enable Layout/MultilineMethodCallIndentation & fix offenses
- Part of trying to reduce the number of `Excludes:` we have in our
  RuboCop configs.
- The fixes here all seemed reasonable, with some minimal tweaks for
  line length and less floatiness. Apart from `test/dev-cmd/bottle_spec.rb`
  where RuboCop wanted to do some ridiculously floaty indentation and there
  wasn't an obvious alternative place to break the lines, so I opted for
  in-line disables instead.
2023-03-03 22:18:51 +00:00
Issy Long
e05cd2c542
rubocop: In-line Style/HashAsLastArrayItem disablement
- We want to move away from `Excludes:` in the main `.rubocop.yml` config file
  containing full file paths, because it's hard to track whether they're still
  necessary or not (and other occurrences in the files that you might
  legitimately want to improve are unaccounted for).
2023-03-02 22:11:05 +00:00
Mike McQuaid
32463227ac
Deprecate preferred_shell and shell_profile.
I know that we're outside our normal deprecation cycle but: these are
totally broken with the API and it doesn't make sense to support them
only for non-core formulae.
2023-02-28 15:02:06 +00: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
Bo Anderson
921b427ff2
test/utils/analytics_spec: fix flaky test 2023-02-17 02:17:03 +00:00
Mike McQuaid
769a8c5001
analytics: report to InfluxDB by default.
Now that this is ready: let's roll it out to everyone in 4.0.0.
2023-02-15 17:27:02 +00:00
Mike McQuaid
c5252817c2
analytics: refactor InfluxDB/Google handling. 2023-02-15 16:34:50 +00:00
Sean Molenaar
50e9247da4
fix: add better keys and fuller values to influxDB analytics 2023-02-15 14:12:05 +01:00
Mike McQuaid
6c27021211
Merge pull request #14525 from SMillerDev/master
analytics: stop sending analytics in tests
2023-02-06 21:28:29 +01:00
Sean Molenaar
61e5e19bdb
analytics: fix spelling
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Eric Knibbe <enk3@outlook.com>
2023-02-06 16:56:25 +01:00
Sean Molenaar
10e3c522f7
analytics: stop sending analytics in tests 2023-02-06 16:28:34 +01:00
Bo Anderson
83b23e6d5e
Fix license handling for API formulae 2023-02-06 10:09:40 +00:00
Mike McQuaid
c3294f9356
test: add instance variable comments. 2023-01-24 10:15:25 +00:00
Douglas Eichelberger
8aadd14cea Use block style instead 2023-01-23 11:56:55 -08: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
Douglas Eichelberger
f365870a42 Resolve utils/analytics_spec violation 2023-01-22 17:26:44 -08:00
Mike McQuaid
d1be288418
some needs_network specs: temporarily disable.
These are absurdly flaky right now so let's disable them.
2023-01-20 17:41:07 +00:00
Sean Molenaar
59ebdab2b7
analytics: switch to InfluxDB for logging 2023-01-19 18:15:27 +01:00
Caleb Xu
c75adc8238
utils/gzip: introduce new module 2023-01-06 22:58:22 -05:00
Mike McQuaid
77c0d38c35
brew style --fix 2022-12-13 11:37:06 +00:00
Frederick Zhang
c27eed4606
Curl: Fix following redirections when base changes
Update base URL when there is an absolute location, so that following
relative locations are considered relative to the new base.

Consider below cURL output for https://example_one.com:

    HTTP/1.1 302 Moved Temporarily
    Location: https://example_two.com

    HTTP/1.1 302 Moved Temporarily
    Location: /foo/

    HTTP/1.1 200 OK

The final URL should be https://example_two.com/foo/ rather than
https://example_one.com/foo/.
2022-11-30 01:32:24 +11:00
Bo Anderson
e7b47bc34e
test: sort metadata alphabetically 2022-11-05 16:51:33 +00:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Bo Anderson
9b99594753
Preliminary compatibility fixes for Ruby 3 2022-10-11 02:53:27 +01:00
Mike McQuaid
1b3f5980be
Merge pull request #13839 from apainintheneck/no-autoremove-build-deps-when-built-from-src
autoremove: ignore build deps when built from src
2022-09-14 13:10:14 +01:00
apainintheneck
f068f74f55 Move autoremove code to util and add tests 2022-09-13 23:23:48 -07:00
Mike McQuaid
7349c2b996
brew style --fix 2022-09-13 09:43:09 +01:00
Mike McQuaid
bc295f7947
update-sponsors: don't require admin token.
Instead, use a different API to query these with a lower scope.

This should be usable by GitHub Actions.
2022-09-07 16:49:41 +01:00
Bo Anderson
04f6f53b58
dev-cmd/pr-pull: avoid expensive search API calls 2022-09-03 21:19:37 +01:00
Rylan Polster
6c35317732
Add and update tests 2022-07-21 16:41:23 +02:00
Rylan Polster
eab3d077bc
Improvements 2022-07-21 15:32:51 +02:00
Bo Anderson
6eb2d6df9a
utils/ruby_check_version_script: fix invalid shebang 2022-07-16 02:49:33 +01:00
Mike McQuaid
217bfb7dad
utils/ruby_check_version_script: fix and test.
Don't use ActiveSupport methods and add a test to make sure this doesn't regress.

Fixes #13559
2022-07-16 02:47:33 +01:00