74 Commits

Author SHA1 Message Date
Douglas Eichelberger
b2dc842238 wip 2024-02-11 20:27:38 -08:00
Issy Long
06028c204a
Merge pull request #16518 from issyl0/rubocop-md
rubocop: Try out `rubocop-md` for linting the code in our docs
2024-02-02 15:49:46 +00:00
Douglas Eichelberger
2e90749f9f brew vendor-gems: commit updates. 2024-01-26 15:03:59 -08:00
Issy Long
9786955abe
Add rubocop-md gem to the Gemfile in the style group
- This could be useful for linting code in our docs.
2024-01-24 00:01:36 +00:00
Bo Anderson
93865bf53e
Gemfile: remove ruby-prof bound 2023-12-15 19:24:05 +00:00
dependabot[bot]
a94fcd4923
build(deps-dev): bump ruby-prof from 1.4.3 to 1.6.3 in /Library/Homebrew
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.3 to 1.6.3.
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.4.3...1.6.3)

---
updated-dependencies:
- dependency-name: ruby-prof
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 18:51:14 +00:00
Bo Anderson
89531e9ff3
Update all dependencies 2023-12-15 16:24:46 +00:00
Bo Anderson
688d87e839
Remove Ruby 2.6 & macOS system Ruby support code 2023-12-12 03:44:31 +00:00
Bo Anderson
26ea6b7f9e
Pull in REXML gem as it doesn't ship with Ruby 3 2023-10-27 20:24:10 +01:00
Bo Anderson
4ec450823c
Portable Ruby 3.1.4 (opt-in beta) 2023-10-27 15:58:43 +01:00
Bo Anderson
71f558229a
Test on Ruby 3.1 2023-09-29 04:46:16 +01:00
Bo Anderson
44ea3b217d
Gemfile: fix pr_upload group typo 2023-09-27 20:12:47 +01:00
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
Douglas Eichelberger
f52cbbb9da
Vendor mechanize gem outside Gemfile
We only need a single file and it avoids pulling in e.g. `nokogiri`
which is vulnerable.

Allow updating it using `brew vendor-gems`.
2023-04-24 14:03:55 +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
Mike McQuaid
7b336ed8cd
Revert "Split prof gems into their own group" 2023-04-04 08:49:27 +01:00
Bo Anderson
8bafbcd65a
Split prof gems into their own group 2023-03-31 13:32:38 +01:00
Mike McQuaid
d69c3ef3df
Vendor more gems
Let's resolve the intermittent issues we've seen when various installed
on demand gems cannot be installed by including them all in the
Gemfile.
2023-03-28 09:12:48 +01:00
Douglas Eichelberger
6415ae6739 Add stackprof to Gemfile 2023-03-18 16:23:08 -07: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
Douglas Eichelberger
f126f0d39b Refactor away rspec/wait 2023-01-25 10:07:42 -08:00
Rylan Polster
d1490c3d5c
Add method_source to Gemfile 2023-01-03 03:04:44 -05:00
Bo Anderson
796bad98ff
Allow gem installation on Rubies other than 2.6 2022-11-05 15:23:19 +00:00
Issy Long
295d60b3a2
Gemfile*,dev-cmd/typecheck: Use Spoom for --suggest-typed
- Spoom is the gem that's recommended for automatically changing `typed`
  sigils in files now. It was recommended in the "migrate to Tapioca"
  guide at
  https://github.com/Shopify/tapioca/wiki/Migrating-to-Tapioca#things-that-do-not-need-to-happen.
2022-10-11 01:09:02 +01:00
Bo Anderson
ed2e35853d
Gemfile: stricter Ruby version requirement 2022-08-22 11:11:57 +01:00
Bo Anderson
676ab5181e
Merge pull request #13566 from Bo98/sorbet-runtime
Replace sorbet-runtime-stub with sorbet-runtime
2022-07-21 20:22:46 +01:00
Bo Anderson
4173228c1b
Gemfile: denote minimum Ruby 2022-07-20 13:47:47 +01:00
Bo Anderson
e4264c9f35
Replace sorbet-runtime-stub with sorbet-runtime 2022-07-19 23:43:14 +01:00
Sam Ford
d0961a4e3e
Add addressable to vendored gems 2022-05-18 18:48:16 -04:00
Mike McQuaid
95213893a6
Revert "Livecheck: Use Homebrew curl based on root domain" 2022-05-18 15:36:12 -04:00
Sam Ford
34dd8e3057
Merge pull request #13292 from samford/livecheck/rework-use_homebrew_curl
Livecheck: Use Homebrew curl based on root domain
2022-05-17 16:35:59 -04:00
Sam Ford
fb8a4e5658
Livecheck: Use Homebrew curl based on root domain
At the moment, `#use_homebrew_curl?` can only be true for a
`homepage` or `stable`/cask `url` with `using: :homebrew_curl`. If
the checked URL differs from these URLs, livecheck won't use brewed
curl. This limitation prevents livecheck from using brewed curl for a
`livecheck` block URL that's a string literal (not a symbol for a
`#checkable_url` like `:stable`, `:head`, `:url`). `libzip` was the
original formula referenced in the related brew issue and it meets
this criterion, so it doesn't appear to be handled by the existing
`#use_homebrew_curl?` implementation.

Additionally, the existing behavior can cause livecheck to
unnecessarily use brewed curl for a completely different website
(e.g., `cubelib`, `otf2`). For example, if the `stable` URL has
`using: :homebrew_curl` and the `livecheck` block has `url
:homepage`, livecheck will use brewed curl when checking the
`homepage`. If these are completely different domains/servers, it's
unlikely that we would need to use brewed curl when checking the
`homepage`, so this particular behavior may not be beneficial.

This commit reimplements `use_homebrew_curl?` to apply brewed curl
when the checked URL's root domain is the same as the root domain of
an aforementioned formula/cask URL with `using: :homebrew_curl`. For
example, this looser approach would allow a `livecheck` block
checking `https://www.example.com/downloads/` to use brewed curl if
the `stable` URL was `https://downloads.example.com/example.zip` with
`using: :homebrew_curl`. These could be different servers but, based
on related formulae, this looseness is necessary for the moment.

This approach aims to resolve both issues, allowing brewed curl to be
applied to a slightly broader range of URLs (i.e., not limited to
just the `#checkable_urls`) while also helping to avoid unnecessarily
applying brewed curl when it's less likely to be useful (completely
different domains). Neither approach is perfect but this one may be
more useful in the interim time.

Depending on how this looser approach works in practice, we may want
to consider returning to a stricter approach once we have something
like `using: :homebrew_curl` in `livecheck` blocks (this is
forthcoming). Being explicit in a `livecheck` block is the most
reliable approach (i.e., only use brewed curl when needed), so we
could favor that and pare down the automated approach to only what's
needed to support implicit checks (i.e., with no `livecheck` block).
Of course, it's also possible to drop the automated approach entirely
and simply require a `livecheck` block in this scenario but we can
decide on how to handle this when the time comes.
2022-05-17 00:34:32 -04:00
Bo Anderson
7e07f66e47
Use sorbet-static-and-runtime 2022-05-17 04:15:50 +01:00
Bo Anderson
1a3967ac4f
Gemfile: restrict activesupport version range 2021-12-16 15:30:26 +00:00
Bo Anderson
02724df0d6
Move json_schemer install to Gemfile 2021-09-10 03:08:21 +01:00
Bo Anderson
07239d267c
Migrate from Sorbet DSL plugins to Parlour 2021-08-06 13:32:48 +01:00
Sam Ford
2342dcd90c
Add comment to Gemfile about disallowed gems 2021-06-30 09:11:47 -04:00
Sam Ford
bb463376e8
Remove nokogiri from Gemfile 2021-06-30 09:11:46 -04:00
Alexander Bayandin
1595a908df
Merge pull request #11565 from bayandin/fuzzy-search-and-did-you-mean
Formula fuzzy search and did you mean
2021-06-23 18:27:10 +01:00
Alexander Bayandin
4c57b9d8f8
Gemfile: add did_you_mean gem 2021-06-22 18:06:53 +01:00
Jason Rudolph
e163eb8650
Enhance test suite to emit JUnit XML test reports
In preparation for detecting flaky tests with BuildPulse, this commit
sets up the rspec_junit_formatter gem to output JUnit XML reports of the
test suite, which is the format used by BuildPulse and various other
tooling that interprets test results.

Because the test suite uses the parallel_tests gem, this commit
incorporates some related changes to make all the parallel_tests gem and
the rspec_junit_formatter gem to cooperate with each other.

rspec_junit_formatter writes everything to a single XML file. That works
fine when there's only one process writing to the file. By default,
whatever process finishes last will write to the file and clobber the
output of all the other processes that wrote to the file. 🙈

To prevent this issue, the parallel_tests wiki recommends adding a
`.rspec_parallel` file to specify its RSpec options
(https://github.com/grosser/parallel_tests/wiki#with-rspec_junit_formatter----by-jgarber),
then the project can specify different files for each process to write
to like so:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

However, prior to this commit, the Homebrew/brew test suite specified
its RSpec options via the command line. Unfortunately though, there's no
way (AFAICT) to set the equivalent of these options via the command
line:

  --format RspecJunitFormatter
  --out tmp/rspec<%= ENV['TEST_ENV_NUMBER'] %>.xml

So, we need to use a `.rspec_parallel` file to specify these options ☝️.

However, it appears that RSpec allows you to specify formatters _either_
in an options file (like `.rspec_parallel`) _or_ via command-line args.
But if you specify any formatters via command-line args, then all
formatters in the options file are ignored.  (I suspect that's somehow
related to this bit of code in rspec-core:
https://github.com/rspec/rspec-core/blob/v3.10.0/lib/rspec/core/configuration_options.rb#L64.)

With that in mind, in order to have the RspecJunitFormatter configured
 in `.rspec_parallel`, we need to move the other formatters into
 `.rpsec_parallel` as well, instead of passing them as command-line
 args. Therefore, this commit moves all the formatters into a
 `.rspec_parallel` file.
2021-06-21 13:14:18 -04:00
Bo Anderson
a06d136d2c
Move Sorbet gems into an optional group 2021-06-11 08:10:30 +01:00
Tom Hu
bba27eefec
Use double quotes 2021-04-01 20:29:27 -04:00
Tom Hu
0947ab6c29
Use simplecov-cobertura 2021-04-01 18:59:46 -04:00
Tom Hu
ff7c05a285
Merge branch 'master' into codecov-action 2021-03-21 14:58:03 -04:00
Bo Anderson
bb4e74042a
formula_assertions: use minitest
We are migrating away from using system gems, and we already have minitest in our dependency tree, so we might as well use it.
2021-02-26 18:23:07 +00:00
Rylan Polster
3595ac1f7f
style: call rubocop directly 2021-02-10 22:36:42 -05:00
Tom Hu
1fb58d5b2f Add Codecov GitHub Action step 2021-02-03 22:46:05 -05:00
Mike McQuaid
89fc131422
Gemfile: install bootsnap.
And allow type checking of `homebrew_bootsnap.rb`.
2021-02-02 12:34:15 +00:00
Mike McQuaid
683ae7ff53
Add HOMEBREW_BOOTSNAP to optionally use Bootsnap
> Bootsnap is a library that plugs into Ruby, with optional support
> for ActiveSupport and YAML, to optimize and cache expensive
> computations.
https://github.com/Shopify/bootsnap

For our case that translates to "repeated calls to `brew` have
reductions in the time spend `require`ing speeding up the process
boot time".

For example:

```
$ hyperfine --warmup=2 "unset HOMEBREW_BOOTSNAP; brew info wget" "export HOMEBREW_BOOTSNAP=1; brew info wget"
Benchmark #1: unset HOMEBREW_BOOTSNAP; brew info wget
  Time (mean ± σ):      2.417 s ±  0.032 s    [User: 659.0 ms, System: 855.5 ms]
  Range (min … max):    2.382 s …  2.464 s    10 runs

Benchmark #2: export HOMEBREW_BOOTSNAP=1; brew info wget
  Time (mean ± σ):      1.862 s ±  0.064 s    [User: 425.3 ms, System: 566.8 ms]
  Range (min … max):    1.736 s …  1.952 s    10 runs

Summary
  'export HOMEBREW_BOOTSNAP=1; brew info wget' ran
    1.30 ± 0.05 times faster than 'unset HOMEBREW_BOOTSNAP; brew info wget'
```
2021-01-21 12:34:04 +00:00