1421 Commits

Author SHA1 Message Date
Douglas Eichelberger
7fdd75ad41 brew style --fix 2023-04-17 11:00:55 -07:00
Douglas Eichelberger
09c679e75f Refactor module_function to reduce rbi need 2023-04-17 10:37:59 -07:00
Razvan Azamfirei
a2b80e4ec2
fix origin_branch_name 2023-04-17 09:57:06 -04:00
Douglas Eichelberger
403f08db8b Remove delegation 2023-04-16 09:30:21 -07:00
Douglas Eichelberger
b90897e280 Create git_repo attr 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
8307255ce8 Update call sites 2023-04-15 19:35:13 -07:00
Douglas Eichelberger
429f23dcc6 Create GitRepoPath 2023-04-15 19:35:12 -07: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
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
Bo Anderson
376440cf3e
Dynamically find gem groups 2023-04-10 16:54:48 +01:00
Bo Anderson
b84bed7385
Revert "Revert "Split prof gems into their own group""
This reverts commit 7b336ed8cd3eb20461fdc45ce67e5318e53920c4.
2023-04-10 16:54:48 +01:00
Markus Reiter
fbf474a3fd
Add curl_head method. 2023-04-06 10:22:24 +02:00
Douglas Eichelberger
200b5cad6a Minor YARD improvements 2023-04-05 10:06:45 -07:00
Douglas Eichelberger
c5ffec1a11 Enable types in dev-cmd, etc. 2023-04-04 22:23:46 -07:00
Mike McQuaid
7b336ed8cd
Revert "Split prof gems into their own group" 2023-04-04 08:49:27 +01:00
Douglas Eichelberger
6397229f68 Enable types in extensions, etc. 2023-04-01 18:56:42 -07:00
Bo Anderson
8bafbcd65a
Split prof gems into their own group 2023-03-31 13:32:38 +01:00
Dawid Dziurla
5e1253ba0d
github: set maintainer_can_modify for PR creation 2023-03-31 11:29:05 +02:00
Issy Long
61dc026fcc
rubocop: Remove the final Naming/MethodParameterName exceptions: pr
- Core RuboCop didn't want this shortening upstreamed, but that's OK!
2023-03-24 00:29:42 +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
Nanda H Krishna
30845593cc
utils/github/actions: remove Error class 2023-03-18 16:38:08 -04:00
Nanda H Krishna
b792a5fd20
utils/github/actions: add format_multiline_string method 2023-03-18 10:49:16 -04: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
Mike McQuaid
650f516c5b
Merge pull request #14992 from dduugg/enable-typing
Fix GitHub.last_commit and enable more typing
2023-03-16 17:12:48 -04:00
Caleb Xu
8d51f806c5
utils/gzip: don't mark API as private 2023-03-16 00:00:54 -04:00
Douglas Eichelberger
827fc87cde Enable more typing 2023-03-15 14:29:15 -07:00
Douglas Eichelberger
f4c9a96c70 Enable types in dev-cmd 2023-03-14 08:32:03 -07:00
Issy Long
cace5c429f
rubocop: Enable Style/AccessorGrouping and autofix offenses
- With RuboCop 1.48.1 this no longer reports offenses and applies bugged
  autocorrections for `attr`s with Sorbet `sig`s, so we can enable it.
2023-03-14 00:01:02 +00:00
Issy Long
8e13a6e1f4
Merge pull request #14944 from issyl0/more-rubocop-naming-method-parameter-name
rubocop: Further trim `Naming/MethodParameterName` allowlist
2023-03-11 22:59:39 +00:00
Issy Long
e9d994622e
rubocop: Drop "f" from Naming/MethodParameterName allowlist
- This either stands for "file" but more often than not "formula".
2023-03-11 00:17:27 +00:00
Douglas Eichelberger
9446db7720 Typecheck some utils 2023-03-09 21:46:35 -08:00
Douglas Eichelberger
02fd0422aa Enable typing in a few more files 2023-03-09 13:42:06 -08:00
Issy Long
2814d2285a
Make str variable names longer
- Three characters is the RuboCop limit for parameter names, but more
  descriptive is good.
- Requested in
  https://github.com/Homebrew/brew/pull/14922#pullrequestreview-1330848594,
  but the automerge was too quick for me to get to it.
2023-03-08 15:30:25 +00:00
Issy Long
89fb8c78e8
rubocop: Drop "s" from Naming/MethodParameterName allowlist
- Most usages of this were in the `pretty_duration` method, where "s"
  is better described as "seconds" since we're calculating a duration.
- I also took the executive decision to do the same to "m" which refers
  to "minutes".
2023-03-08 14:42:53 +00:00
Issy Long
1295904986
sorbet: Autogenerate the RBI file for utils/tty.rb
- Sort of. It's not via Parlour, because I read the docs and all it says
  about dynamically generating things is "of course it's better to do
  that", no examples. I tried my best, but Bo's work on `attr.rb` was
  mind-boggling.
- Instead, let's add a simple but functional generator script that I
  actually understand, as an alternative to maintaining these RBI files
  for dynamic methods manually, so that we can get rid of some use of
  `srb rbi hidden-definitions` since that's deprecated.
- TODO: Run this script as part of `brew typecheck --update` so it gets
  updated with all the other RBI files periodically.
- Follow up to PR 14651.
2023-03-06 21:46:04 +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
42c9ad1447
Merge pull request #14860 from issyl0/contributions-commits-committed
dev-cmd/contributions: Count the number of commits a user committed
2023-03-03 17:37:35 +00:00
Douglas Eichelberger
d98b7845d3 Enable typing in misc files 2023-03-03 08:29:26 -08:00
Douglas Eichelberger
a5aef97851 brew style --fix 2023-03-02 11:49:09 -08:00
Issy Long
9250a6705e
dev-cmd/contributions: Count the number of commits a user committed
- The GitHub list commits API now supports this filtering
  (https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#list-commits--parameters),
  because I wrote it. :-)
- Authoring a commit and committing a commit are two separate concepts: author
  is the person who wrote the code and, in old parlance, the committer is the
  person who applied the patch (remember when we sent patches to mailing lists?).
- In practice for us in Homebrew, this occurs when we make a change in GitHub's
  web editor, or, more obviously, when BrewTestBot pushes `homebrew-core`
  commits from users (then, `BrewTestBot` is the `committer`).
2023-03-01 23:38:49 +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
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
7f3593e12d inline titleize 2023-02-27 20:18:10 -08:00
Douglas Eichelberger
2c5067ec77 Port dynamic invocation 2023-02-27 20:18:10 -08:00
Douglas Eichelberger
2c73d4d9b7 Replace deconstantize inflection with util 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
d62211d3af Replace demodulize inflection with util 2023-02-27 20:17:33 -08:00
Douglas Eichelberger
37015b6b08 Change to pluralize, port more call sites 2023-02-27 20:17:33 -08:00