phinze/homebrew-cask

View on GitHub
Casks/f/freedom.rb

Summary

Maintainability
A
0 mins
Test Coverage
cask "freedom" do
  version "2.22.2"
  sha256 "a9670bd0e72ba841f9e6495e5f51a70a7dc1aeae80a88769d40bece178e38dc7"

  url "https://cdn.freedom.to/installers/updates/mac/#{version}/Freedom.zip"
  name "Freedom"
  desc "App and website blocker"
  homepage "https://freedom.to/"

  livecheck do
    url "https://cdn.freedom.to/installers/updates/mac/Appcast.xml"
    strategy :sparkle, &:short_version
  end

  auto_updates true
  depends_on macos: ">= :big_sur"

  app "Freedom.app"

  uninstall launchctl: "com.80pct.FreedomHelper",
            quit:      "com.80pct.FreedomPlatform",
            delete:    [
              "/Library/PrivilegedHelperTools/com.80pct.FreedomHelper",
              "/var/log/FreedomHelper.log",
            ]

  zap trash: [
    "~/Library/Application Support/com.80pct.FreedomPlatform",
    "~/Library/Caches/com.80pct.FreedomPlatform",
    "~/Library/Caches/com.plausiblelabs.crashreporter.data/com.80pct.FreedomPlatform",
    "~/Library/HTTPStorages/com.80pct.FreedomPlatform",
    "~/Library/Preferences/com.80pct.FreedomPlatform.plist",
  ]
end