forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlittle-snitch.rb
59 lines (53 loc) · 2.48 KB
/
little-snitch.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cask "little-snitch" do
version "6.0"
sha256 "12e9efa8ee310c733d6623e8cf5c51141324a0a719ef008fc7ec8f13dbe5b5f3"
url "https://www.obdev.at/downloads/littlesnitch/LittleSnitch-#{version}.dmg"
name "Little Snitch"
desc "Host-based application firewall"
homepage "https://www.obdev.at/products/littlesnitch/index.html"
livecheck do
url "https://sw-update.obdev.at/update-feeds/littlesnitch#{version.major}.plist"
regex(/LittleSnitch[._-]v?(\d+(?:\.\d+)+)\.dmg/)
strategy :xml do |xml, regex|
xml.get_elements("//key[text()='DownloadURL']").map do |item|
match = item.next_element&.text&.match(regex)
next if match.blank?
match[1]
end
end
end
auto_updates true
conflicts_with cask: [
"little-snitch@4",
"little-snitch@5",
]
depends_on macos: ">= :sonoma"
app "Little Snitch.app"
zap trash: [
"/Library/Application Support/Objective Development/Little Snitch",
"/Library/Caches/at.obdev.LittleSnitchConfiguration",
"/Library/Extensions/LittleSnitch.kext",
"/Library/Little Snitch",
"/Library/Logs/LittleSnitchDaemon.log",
"/Library/StagedExtensions/Library/Extensions/LittleSnitch.kext",
"~/Library/Application Support/Little Snitch",
"~/Library/Caches/at.obdev.LittleSnitchAgent",
"~/Library/Caches/at.obdev.LittleSnitchConfiguration",
"~/Library/Caches/at.obdev.LittleSnitchHelper",
"~/Library/Caches/at.obdev.LittleSnitchSoftwareUpdate",
"~/Library/Caches/com.apple.helpd/Generated/at.obdev.LittleSnitchConfiguration.help*",
"~/Library/Caches/com.apple.helpd/SDMHelpData/Other/English/HelpSDMIndexFile/at.obdev.LittleSnitchConfiguration.help*",
"~/Library/Logs/Little Snitch Agent.log",
"~/Library/Logs/Little Snitch Helper.log",
"~/Library/Logs/Little Snitch Installer.log",
"~/Library/Logs/Little Snitch Network Monitor.log",
"~/Library/Preferences/at.obdev.LittleSnitchAgent.plist",
"~/Library/Preferences/at.obdev.LittleSnitchConfiguration.plist",
"~/Library/Preferences/at.obdev.LittleSnitchInstaller.plist",
"~/Library/Preferences/at.obdev.LittleSnitchNetworkMonitor.plist",
"~/Library/Preferences/at.obdev.LittleSnitchSoftwareUpdate.plist",
"~/Library/Saved Application State/at.obdev.LittleSnitchInstaller.savedState",
"~/Library/WebKit/at.obdev.LittleSnitchConfiguration",
],
rmdir: "/Library/Application Support/Objective Development"
end