Merge pull request #200213 from Homebrew/bump-tidelift-1.14.0
[Homebrew/homebrew-cask.git] / Casks / w / whimsical.rb
blobfae28b36a8abacb17543a7f179e39cdc4d61d869
1 cask "whimsical" do
2   arch arm: "arm64", intel: "x64"
4   version "0.2.10,241127ipt7hsvrm"
5   sha256 arm:   "67a6fe36bb9b5774ac984b0c308ae44a68bc9e9f52390ed492405ec7a5e87d3b",
6          intel: "410003cc66c93580ac899f5d2c40b2121f37d01c846ff822fb0221e562aebdbb"
8   url "https://download.todesktop.com/2402209z4j37b73/Whimsical%20#{version.csv.first}%20-%20Build%20#{version.csv.second}-#{arch}-mac.zip",
9       verified: "download.todesktop.com/2402209z4j37b73/"
10   name "Whimsical"
11   desc "Collaboration and diagramming tool"
12   homepage "https://whimsical.com/"
14   livecheck do
15     url "https://download.todesktop.com/2402209z4j37b73/latest-mac.yml"
16     regex(/Whimsical\s(\d+(?:\.\d+)+)(?:\s-\sBuild\s([a-z\d]+?))?-#{arch}-mac\.zip/i)
17     strategy :electron_builder do |yaml, regex|
18       yaml["files"]&.map do |item|
19         match = item["url"]&.match(regex)
20         next if match.blank?
22         match[2].present? ? "#{match[1]},#{match[2]}" : match[1]
23       end
24     end
25   end
27   auto_updates true
28   depends_on macos: ">= :catalina"
30   app "Whimsical.app"
32   zap trash: [
33     "~/Library/Application Support/Whimsical",
34     "~/Library/Caches/com.whimsical.desktop",
35     "~/Library/Caches/com.whimsical.desktop.ShipIt",
36     "~/Library/Logs/Whimsical",
37     "~/Library/Preferences/com.whimsical.desktop.plist",
38     "~/Library/Saved Application State/com.whimsical.desktop.savedState",
39   ]
40 end