67 Commits

Author SHA1 Message Date
Douglas Eichelberger
4dcd5ac47f Remove HashValidator 2023-03-19 17:37:58 -07:00
Douglas Eichelberger
516c61057b Use ActiveSupport Hash#assert_valid_keys instend of refinement 2023-03-19 17:37:58 -07:00
Ruoyu Zhong
e9ce4a5a4e
Update path to system settings on Ventura
"System Preferences" has been renamed to "System Settings" on Ventura.
Privacy and security settings have moved, too. This commit makes sure
these changes are reflected. (Some adjustments were already made in
#14092.)

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
2023-03-17 19:24:07 +08:00
Douglas Eichelberger
900ee97f95 Revert splat changes to AbstractUninstall 2023-03-07 06:46:59 -08:00
Douglas Eichelberger
d98b7845d3 Enable typing in misc files 2023-03-03 08:29:26 -08:00
apainintheneck
c19017c6bd Make Cask#to_h work without the API
Set metadata when we load casks from the source API.

Set `@tap_git_head` manually.

Also, allow `auto_update` to receive false.
This is only done for consistency.

Stop double printing the `kext` caveat.

Handle Array elements correctly when substituting
path elements in artifacts. This affected how the
Uninstall Signal keys were evaluated (they are
represented as arrays of arrays).
2023-02-28 19:36:20 -08:00
Douglas Eichelberger
29c6baeed1 Enable typing in Cask::Artifact 2023-02-22 09:11:29 -08:00
Bevan Kay
3869bf156c
change line splitting method 2022-12-29 12:54:59 +11:00
Bevan Kay
db9d48a7ec
fix tests 2022-12-28 12:50:16 +11:00
Bevan Kay
2614a29419
fix style 2022-12-19 14:43:16 +11:00
Bevan Kay
84f288be79
fix style 2022-12-19 14:39:48 +11:00
Bevan Kay
1ddd130ef9
add comment to .drop(), don't add blank lines to services array 2022-12-19 14:35:20 +11:00
Bevan Kay
e8e6ee30b4
add initial tests 2022-12-13 00:00:43 +11:00
Bevan Kay
836efe621f
cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl 2022-12-05 15:08:23 +11:00
Bevan Kay
33d3a5d728
cask/artifiact/abstract_uninstall: allow wildcard entries for launchctl 2022-11-09 13:21:49 +11:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility 2022-10-18 01:54:59 +01:00
Rylan Polster
90d22bc7b1
Include dsl key in cask artifact hash 2022-08-25 03:04:48 -04:00
Bo Anderson
e78665f4f7
Replace ENV["HOME"] with Dir.home 2022-06-17 19:47:57 +01:00
Nanda H Krishna
eecbd5887c
Apply suggestion from review
Co-authored-by: Markus Reiter <me@reitermark.us>
2021-03-26 02:28:51 +05:30
nandahkrishna
94737ef41d
cask: add password warning for pkg uninstall 2021-03-26 00:11:39 +05:30
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
d0ad829e43 use arrow character for UI prompts 2021-01-26 15:36:43 -05:00
EricFromCanada
571179ff0e pass second argument to ohai when applicable 2021-01-26 15:36:43 -05:00
Markus Reiter
a01deaaf52 Handle running apps in application.<bundle_id>.<number>.<number> format. 2020-12-26 14:02:49 +01:00
Carlos Sanchez
278bc77f2d fix: launchctl list can return empty id
causing

Error: undefined method `match?' for nil:NilClass

Seen in macOS Big Sur
2020-11-24 18:12:10 +01:00
Markus Reiter
da9289eff0 Add more type signatures. 2020-11-13 12:26:36 +01:00
EricFromCanada
3768b7a6e9 apidoc: update comment wording, punctuation, formatting 2020-11-06 00:21:02 -05:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Markus Reiter
5426e47579 Document Artifact. 2020-08-26 03:13:59 +02:00
Maxime Garcia
65bb03a7db Fix uninitialized constant Cask::Pkg 2020-07-27 18:04:29 +02:00
Jonathan Chang
76709d82c5 Fix brew style. 2020-07-13 23:24:14 +10:00
Markus Reiter
b2ccf3ba78
Merge pull request #7587 from Rylan12/cask-zap-full-disk-access
brew cask zap prompt when Full Disk Access is needed
2020-05-31 23:41:25 +02:00
Mike McQuaid
ca47992a6c
Fix rubocop-performance brew style. 2020-05-22 08:52:26 +01:00
Rylan Polster
d0bd687a3d brew cask zap prompts when Full Disk Access is needed 2020-05-21 10:24:28 -04:00
Daniel Bayley
f3a0fcfb6d Make rmdir: recursive 2020-02-11 07:56:15 +00:00
Markus Reiter
04493e2dde Fix trash.swift without arguments. 2019-10-23 06:59:39 +02:00
Markus Reiter
7a5e4d1269 Remove User::automation_access?. 2019-10-22 07:38:35 +02:00
Issy Long
1f6168fe8a
Change regexp.match?(string) to string.match?(regexp) everywhere
- Only try to call `.match?` on strings that aren't nil.
2019-10-13 23:22:51 +01:00
Issy Long
b78028b9c2
Auto-fix Performance/RegexpMatch offenses 2019-10-13 16:04:26 +01:00
L. E. Segovia
1ddafee614
Cask: address @reitermarkus's comments 2019-10-03 20:16:01 +00:00
L. E. Segovia
70c49809fe
Cask: typo in trash_paths 2019-10-02 14:09:26 +00:00
L. E. Segovia
b9a3884ebf
Cask: output files requiring sudo to console 2019-10-02 13:36:05 +00:00
L. E. Segovia
aa85bec73e
Fix style issues 2019-10-02 00:25:38 +00:00
L. E. Segovia
f980ac82b9
Cask: refuse to trash root-owned files
These files cannot be trashed from CLI without sudo, which trashes them
instead to root's Trash. AppleScript isn't of use here because it will
break Travis (as it will fail when asking for admin permissions).

Fixes homebrew/homebrew-cask#69897
2019-10-01 11:12:23 +00:00
Markus Reiter
d8afed206f Use AppleScript to check if GUI apps are running. 2019-09-15 01:37:04 +02:00
Markus Reiter
f010aa48ff Skip AppleScript actions if Automation Access isn't granted. 2019-09-13 16:35:44 +02:00
Markus Reiter
d5cc46f931 Support deleting login items by path. 2019-08-12 23:56:26 +02:00
L. E. Segovia
a5fc2ec834
Skip :trash step if no paths exist
Fixes Homebrew/cask#63583
2019-05-21 12:56:23 +00:00
L. E. Segovia
93b2c29612 Port file trashing to Swift
This avoids hitting AppleScript timeouts in CI.
2019-05-09 20:03:31 +00:00