cask "mints" do version "1.21,2025.06" sha256 "4d876ca29f21db23f89ecff1e0d72c849f2697b99ebb665b3d7a0e4803efa03c" url "https://eclecticlight.co/wp-content/uploads/#{version.csv.second.major}/#{version.csv.second.minor}/mints#{version.csv.first.no_dots}.zip" name "Mints" desc "Logging tool suite" homepage "https://eclecticlight.co/mints-a-multifunction-utility/" livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" regex(%r{/(\d+)/(\d+)/[^/]+?$}i) strategy :xml do |xml, regex| item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Mints']]"] next unless item version = item.elements["key[text()='Version']"]&.next_element&.text url = item.elements["key[text()='URL']"]&.next_element&.text match = url.strip.match(regex) if url next if version.blank? || match.blank? "#{version.strip},#{match[1]}.#{match[2]}" end end depends_on macos: ">= :big_sur" app "mints#{version.csv.first.no_dots}/Mints.app" zap trash: [ "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.mints.sfl*", "~/Library/Caches/co.eclecticlight.Mints", "~/Library/HTTPStorages/co.eclecticlight.Mints", "~/Library/Preferences/co.eclecticlight.Mints.plist", "~/Library/Saved Application State/co.eclecticlight.Mints.savedState", ] end