28966 Commits

Author SHA1 Message Date
Mike McQuaid
942e77d3a8
Merge pull request #16244 from abitrolly/depath-create
formula_creator: Remove `path` attr to reduce code complexity
2023-11-23 16:08:54 +00:00
Anatoli Babenia
4063675e0e Suggestion by @MikeMcQuaid
"ActiveSupport adds blank? to NilClass."
2023-11-23 18:53:22 +03:00
Anatoli Babenia
bfbea8be26 Style fix 2023-11-23 18:12:12 +03:00
Anatoli Babenia
4fed4529d3 Raise when formula name is empty
P.S. That still doesn't check if the name is invalid, like "34"
2023-11-23 18:06:40 +03:00
Anatoli Babenia
d8f19ff881 Rename generate! to write_formula! 2023-11-23 18:04:03 +03:00
Mike McQuaid
1b8207bf47
Merge pull request #16250 from branchvincent/pip-cache
formula: add `PIP_CACHE_DIR` to build env
2023-11-23 12:54:01 +00:00
Mike McQuaid
e93b0fc430
Merge pull request #16224 from Rylan12/remove-os-mac-on-linux
Deprecate `OS::Mac` on Linux
2023-11-23 12:40:22 +00:00
Mike McQuaid
1e2cdc6eac
formula: tweak cache ordering. 2023-11-23 12:38:51 +00:00
Rylan Polster
b7532a86e1
Add commented out deprecations for MacOS when simulating Linux 2023-11-22 21:22:00 -05:00
Rylan Polster
4efd7cdb28
Comment out MacOS on Linux deprecations 2023-11-22 21:21:29 -05:00
Rylan Polster
f98b8f948c
Add rubocop to remove MacOS references 2023-11-22 21:19:01 -05:00
Branch Vincent
e58ed46195
formula: add PIP_CACHE_DIR to build env 2023-11-22 13:53:05 -08:00
Bo Anderson
ad2c1c9bad
test/os/mac/diagnostic: fix when env is not set 2023-11-22 01:02:46 +00:00
Bo Anderson
6502524456
brew.sh: set HOMEBREW_RUBY3 earlier 2023-11-22 00:51:43 +00:00
Bo Anderson
189d709c41
Merge pull request #16241 from Bo98/ruby3-developers
Enable Ruby 3 for `HOMEBREW_DEVELOPER` and the Docker image
2023-11-21 23:40:31 +00:00
Bo Anderson
7a9f3eb800
utils/ruby.sh: don't _require_ 3.1 in HOMEBREW_RUBY3 mode 2023-11-21 15:03:22 +00:00
Anatoli Babenia
51b16585fb formula_creator: Remove path attr to reduce code complexity
`path` attribute is used only once, and it is easier to calculate
it on the fly than to update its state after different methods.
2023-11-21 13:28:47 +03:00
Bo Anderson
559336c771
Enable Ruby 3 for HOMEBREW_DEVELOPER 2023-11-20 20:04:18 +00:00
BrewTestBot
b5733fceeb
Update RBI files for json_schemer.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-11-20 18:39:17 +00:00
BrewTestBot
65faab59c4
brew vendor-gems: commit updates. 2023-11-20 18:33:49 +00:00
dependabot[bot]
a43ba37425
build(deps-dev): bump json_schemer in /Library/Homebrew
Bumps [json_schemer](https://github.com/davishmcclurg/json_schemer) from 2.0.0 to 2.1.0.
- [Changelog](https://github.com/davishmcclurg/json_schemer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/davishmcclurg/json_schemer/compare/v2.0.0...v2.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 18:29:27 +00:00
Kevin
ad1bb178d4
Merge pull request #16234 from samford/livecheck/xml-add-element_text-method
Xml: Add #element_text method
2023-11-19 09:05:07 -08:00
Kevin
bd2c9791a9
Merge pull request #16233 from Bo98/formula_files_by_name-optimise
tap: optimise `CoreTap#formula_files_by_name`
2023-11-18 12:32:16 -08:00
Sam Ford
5a3632efa4
xml_spec: Standardize XPath expressions
The XML examples used in `Xml` strategy tests is known/predictable,
so the related XPaths can be explicit instead of loose.
2023-11-17 22:34:12 -05:00
Sam Ford
9bfe423a5a
Xml: Add #element_text method
This refactors verbose code in the `Sparkle` strategy where we access
element text into a reusable `Xml#element_text` method, replacing
chained calls like `item.elements["title"]&.text&.strip&.presence`
with `Xml.element_text(item, "title")`.

`#element_text` is only used to retrieve the text of a child element
in the `Sparkle` strategy but it can also retrieve the text from the
provided element if the `child_path` argument is omitted (i.e.,
`Xml.element_text(item)`). This will allow us to also avoid similar
calls like `item.text.strip.presence` in the future.
2023-11-17 22:34:12 -05:00
Bo Anderson
b1ddb056db
tap: optimise CoreTap#formula_files_by_name 2023-11-18 01:01:41 +00:00
BrewTestBot
2a3341acb3
Update RBI files for public_suffix.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-11-17 18:16:48 +00:00
BrewTestBot
a4962a6677
brew vendor-gems: commit updates. 2023-11-17 18:10:48 +00:00
dependabot[bot]
dfb7a6371e
build(deps): bump public_suffix from 5.0.3 to 5.0.4 in /Library/Homebrew
Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 5.0.3 to 5.0.4.
- [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/main/CHANGELOG.md)
- [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: public_suffix
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-17 18:06:41 +00:00
Bo Anderson
34b1f37846
dev-cmd/vendor-gems: git add Gemfile.lock 2023-11-17 17:48:26 +00:00
Mike McQuaid
78b7d7e2d6
Merge pull request #16231 from Bo98/vendor-gem-workaround
dev-cmd/vendor-gems: workaround Dependabot removing lockfile platforms
2023-11-17 17:02:07 +00:00
Bo Anderson
58ff22eb55
dev-cmd/vendor-gem: workaround Dependabot removing lockfile platforms 2023-11-17 16:51:03 +00:00
Bo Anderson
efc71abf97
Merge pull request #16228 from Bo98/setup_path-ruby3-fix
standalone/init: don't pollute environment on Ruby 3 startup
2023-11-17 11:41:49 +00:00
Mike McQuaid
41d67bb28d
Merge pull request #16196 from samford/cask/rework-livecheck_min_os-audit
Use Sparkle sorting/filtering in #livecheck_min_os
2023-11-17 11:41:21 +00:00
Mike McQuaid
68c660f49c
Merge pull request #16227 from Bo98/determine-all-runners
dev-cmd/determine-test-runner: add `--all-supported`
2023-11-17 11:41:08 +00:00
Bo Anderson
585f5cdeb3
standalone/init: don't pollute environment on Ruby 3 startup 2023-11-17 02:17:13 +00:00
Bo Anderson
ca549fa10d
dev-cmd/determine-test-runner: add --all-supported 2023-11-17 02:11:01 +00:00
Bo Anderson
71f0533b17
Gemfile.lock: restore missing platform 2023-11-17 01:46:43 +00:00
Sam Ford
75ce7240fc
Sparkle: Refactor macOS os strings into constant 2023-11-16 12:05:25 -05:00
Sam Ford
491e2c4a80
Reorder #audit_min_os array for consistency
This change doesn't affect the behavior of the `#audit_min_os`
method and simply reorders the array members to place `plist_min_os`
before `sparkle_min_os` for the sake of consistency (using the same
order as the preceding lines).
2023-11-16 12:05:25 -05:00
Sam Ford
28451bd2bc
Use Sparkle sorting/filtering in #livecheck_min_os
The `#livecheck_min_os` cask audit method manually replicates some of
the `Sparkle` strategy's behavior but in an incomplete way that has
lead to inappropriate audit failures at times. This reimplements it
to use `Livecheck` methods, so it will align with the `Sparkle`
strategy's behavior.
2023-11-16 12:05:24 -05:00
Sam Ford
d376b46a7d
Skip items strategy blocks in #livecheck_min_os
The `#livecheck_min_os` cask audit method should be skipped when a
`Sparkle` `livecheck` block contains a `strategy` block that uses
the `items` argument (instead of `item`). These `strategy` blocks
contain arbitrary logic that ignores/overrides the strategy's sorting,
so we can't identify which item would be first/newest.
2023-11-16 12:05:24 -05:00
Sam Ford
bc2ce97e5d
Sparkle: Move sorting/filtering into methods
We need to be able to replicate the `Sparkle` strategy's sorting
and filtering behavior in a related cask audit, so this extracts
the logic into reusable methods.

This also stores `item.minimum_system_version` as a `MacOSVersion`
object (instead of a string), so we can do proper version comparison
(instead of naive string comparison) wherever needed.
2023-11-16 12:05:24 -05:00
Sam Ford
4f469234d0
Sparkle: Ensure empty strings become nil
Sometimes appcasts contain empty elements/attributes and the `Item`
values end up as an empty string because of how they're handled in
`#items_from_content`. It's reasonable to expect that empty values
would be `nil` instead, so this adds `#presence` calls to ensure this
is the case.
2023-11-16 12:05:24 -05:00
Rylan Polster
529f7b7953
Remove El Capitan system curl workaround 2023-11-16 11:47:48 -05:00
BrewTestBot
d9c7b9f70d
Update RBI files for unf_ext.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-11-16 16:40:04 +00:00
BrewTestBot
0f22f4ed90
brew vendor-gems: commit updates. 2023-11-16 16:35:26 +00:00
dependabot[bot]
e3355faa4d
build(deps-dev): bump unf_ext from 0.0.9 to 0.0.9.1 in /Library/Homebrew
Bumps [unf_ext](https://github.com/knu/ruby-unf_ext) from 0.0.9 to 0.0.9.1.
- [Changelog](https://github.com/knu/ruby-unf_ext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/knu/ruby-unf_ext/compare/v0.0.9...v0.0.9.1)

---
updated-dependencies:
- dependency-name: unf_ext
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-16 16:31:25 +00:00
Rylan Polster
8704e79cc0
Separate MacOS references 2023-11-15 18:19:39 -05:00
Rylan Polster
0839e21425 Deprecate MacOS methods on Linux 2023-11-15 18:38:53 +00:00