22 Commits

Author SHA1 Message Date
Patrick Linnane
e63c885033
Support Tahoe, drop Mojave and older
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-09-12 10:40:19 -07:00
Bevan Kay
69145c911d
cask/dsl/rename: add api support 2025-08-19 11:47:15 +10:00
Mike McQuaid
d13aaf94db
Deprecate conflicts_with formula: in Cask DSL.
This is outside of our usual deprecation process but it's a no-op method
that does, and has always done, nothing so it doesn't make sense to wait
another 2.5 months before deprecating it.

While we're here, make `conflicts_with` `typed: strict` in Sorbet.
2025-08-18 19:25:54 +01:00
botantony
91f328950f test/fixtures: fix cask JSON fixture
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
9ff2abbcdf no_autobump!: rename no_autobump_msg field to no_autobump_message
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
1fcacdc2dc formula/cask DSL: add no_autobump! method
Signed-off-by: botantony <antonsm21@gmail.com>
2025-04-29 18:04:59 +02:00
botantony
4fa1355be0 deprecate!/disable!: remove non-typed replacement field
Signed-off-by: botantony <antonsm21@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-04-21 21:13:25 +02:00
Rylan Polster
f874603a21 Add implicit macOS dependency to casks without explicit depends_on stanza 2025-02-17 14:30:44 +01:00
Caleb Xu
215fc85579
deprecate_disable: support optional replacement parameter 2024-11-08 15:49:00 -05:00
Douglas Eichelberger
ba3f426726 clean up fixture 2024-11-07 13:00:38 -08:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Bo Anderson
326bc3f889
Fix cask source checksum handling 2024-03-19 21:21:37 +00:00
Mike McQuaid
03e583e746
cask: read bundle version from Info.plist when sensible.
If you're trying to use `brew info --json=v2` to get an installed
version and figure out if it is outdated: you're going to have a bad
time with `auto_updates` casks because `installed_version` alone is not
enough to get the actually currently installed version of the app.

Instead, in these cases, try to read from `Info.plist` if there is one
and use that version.

While we're here, add a `blank?` method to `Version` so we can use it
for `present?` checks (making a `null?` `Version` object `blank?`).

Co-authored-by: Markus Reiter <me@reitermark.us>
2024-03-06 15:52:16 +00:00
Razvan Azamfirei
82cdf27eb8
fixture/cask: fix style violations 2024-01-28 10:19:39 -05:00
Issy Long
8910d5a479
Remove the single-element array in everything.json used for Cask tests
```
  1) Cask::Cask#to_h when loaded from cask file returns expected hash
     Failure/Error: expect(JSON.pretty_generate(hash)).to eq(expected_json)

Diff:
       @@ -28,9 +28,7 @@
              "uninstall": [
                {
                  "launchctl": "com.every.thing.agent",
       -          "delete": [
       -            "/Library/EverythingHelperTools"
       -          ],
       +          "delete": "/Library/EverythingHelperTools",
                  "kext": "com.every.thing.driver",
                  "signal": [
                    [
       @@ -103,7 +101,7 @@
          ],
          "ruby_source_path": "Casks/everything.rb",
          "ruby_source_checksum": {
       -    "sha256": "b2707d1952f02c3fa566b7ad2a707a847a959d36f51d3dee642dbe5deec12f27"
       +    "sha256": "0c4af571cce1632fc6a3dcf3e75ba82a3283077ef12399428192c26f9d6f779b"
          }
        }
     # ./test/cask/cask_spec.rb:225:in `block (4 levels) in <top (required)>'
     # ./test/support/helper/spec/shared_context/homebrew_cask.rb:53:in `block (2 levels) in <top (required)>'
```
2024-01-21 01:32:15 +00:00
Rylan Polster
40d3ab6a5d
Add tests and fix brew typecheck 2023-12-16 20:01:47 -05:00
Mike McQuaid
54012f14ce
cask: add installed_time to JSON output.
This is provided for formulae in `installed.time` and is useful to have
for casks as well as formulae so let's output it here too.
2023-11-03 11:37:01 +00:00
Markus Reiter
a3231a03fa
Implement cask renames. 2023-05-12 21:17:30 +02:00
apainintheneck
1322b9cb79 cask: remove os_versions
This was originally used by the API but was replaced months
ago by SimulateSystem. Essentially, it's only current use
was in the #to_h method but is not used internally at all
when creating cask instances from the API JSON.
2023-04-16 13:52:24 -07:00
Markus Reiter
3275b927b8
Make test not depend on macOS version. 2023-04-11 21:02:10 +02:00
Markus Reiter
844db75361
Add source paths to API. 2023-04-07 15:20:01 +02:00
apainintheneck
9087afba74 Add baseline test for Cask#to_h
Also, added a test for loading JSON files in the cask loader.
2023-02-28 21:43:02 -08:00