The `ElectronBuilder` strategy uses `YAML#safe_load` to parse YAML
content and this limits deserialization to appropriate classes. We
recently encountered a `Tried to load unspecified class: Time` error
when using the `ElectronBuilder` strategy on a `latest-mac.yml` file
containing `releaseDate: 2022-12-01T02:02:46.419Z`.
The electron-builder YAML files we usually encounter use single
quotes around the `releaseDate` value to ensure it's treated as a
string (e.g., `releaseDate: '2022-10-12T17:55:26.718Z'`) and this is
what we do in `electron_builder_spec.rb`. The aforementioned YAML
file doesn't use single quotes around the value, so it's treated as
a timestamp and apparently this makes Psych use `Time` (which
`#safe_load` doesn't allow by default).
Seeing as we can't control the YAML content and there's a chance we
may encounter other files like this in the future, this commit
modifies the related `#safe_load` call to allow `Time` (and `Date`
for good measure). This will resolve the aforementioned error and
allow the `ElectronBuilder` strategy to work as expected in this
scenario.
- Change name of rubocop warning
- Disable linting on remaining offending lines
- Add todos to move lines with disabled linting
checks to extend/os in the future
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/.
- Some of these are currently failing globally on GitHub Actions.
- Some(/all?) of these predate our use of the macOS sandbox,
environment filtering, PATH filtering and pushing users much harder to
use bottles instead of building from source
- I haven't seen a case for a long time where any of these actually
debugged a user issue. If/when this happens: we can add a given check
back.
- This should allow us to dramatically reduce the amount of cleanup
that `brew test-bot` needs to do on GitHub Actions.
- This was another thing that I should have done in PR 3411 in 2017,
tested that the regex for autocorrecting `desc` stanzas ending in full
stops actually worked. At least I'm getting to it now.
- This was funny (and embarrassing), I was looking at my first contributions to
Homebrew since someone asked me how long I'd been involved.
- Turns out that in 2017 I improved the formula description RuboCop rule to
allow descriptions to end with `etc.` in
https://github.com/Homebrew/brew/pull/3411. Apparently I didn't have time
back then to write a test for it. So now I will remedy this 5 years later.
- 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
The `check_for_resources` code arguably speaks for itself, so it
doesn't feel like a necessary addition. Besides that, this cleans up
some other comments and text to better align with existing examples.