Merge pull request #194004 from Homebrew/bump-binance-1.54.4
[Homebrew/homebrew-cask.git] / Casks / m / mints.rb
blob0223bbc2acfe0c87aa40d84268cb92427961937f
1 cask "mints" do
2   version "1.20,2024.11"
3   sha256 "244671bda59a5ae3d8f232e6dfb093c81aa70caa3efd20b2928124a3015835d1"
5   url "https://eclecticlightdotcom.files.wordpress.com/#{version.csv.second.major}/#{version.csv.second.minor}/mints#{version.csv.first.no_dots}.zip",
6       verified: "eclecticlightdotcom.files.wordpress.com/"
7   name "Mints"
8   desc "Logging tool suite"
9   homepage "https://eclecticlight.co/mints-a-multifunction-utility/"
11   livecheck do
12     url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist"
13     regex(%r{/(\d+)/(\d+)/[^/]+?$}i)
14     strategy :xml do |xml, regex|
15       item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Mints']]"]
16       next unless item
18       version = item.elements["key[text()='Version']"]&.next_element&.text
19       url = item.elements["key[text()='URL']"]&.next_element&.text
20       match = url.strip.match(regex) if url
21       next if version.blank? || match.blank?
23       "#{version.strip},#{match[1]}.#{match[2]}"
24     end
25   end
27   depends_on macos: ">= :high_sierra"
29   app "mints#{version.csv.first.no_dots}/Mints.app"
31   zap trash: [
32     "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.mints.sfl*",
33     "~/Library/Caches/co.eclecticlight.Mints",
34     "~/Library/HTTPStorages/co.eclecticlight.Mints",
35     "~/Library/Preferences/co.eclecticlight.Mints.plist",
36     "~/Library/Saved Application State/co.eclecticlight.Mints.savedState",
37   ]
38 end