diff --git a/Casks/c/cirrus.rb b/Casks/c/cirrus.rb index 42e358e90fc95..249fa8be48a52 100644 --- a/Casks/c/cirrus.rb +++ b/Casks/c/cirrus.rb @@ -10,21 +10,27 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/cirrus(\d+)\.zip}i) - strategy :page_match do |page, regex| - match = page.match(regex) - next if match.blank? + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Cirrus']]"] + next unless item - "#{match[3].split("", 2).join(".")},#{match[1]}.#{match[2]}" + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end - depends_on macos: ">= :sierra" + depends_on macos: ">= :high_sierra" app "cirrus#{version.csv.first.major}#{version.csv.first.minor}/Cirrus.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.cirrusmac.sfl*", "~/Library/Caches/co.eclecticlight.CirrusMac", + "~/Library/HTTPStorages/co.eclecticlight.CirrusMac", "~/Library/Preferences/co.eclecticlight.CirrusMac.plist", "~/Library/Saved Application State/co.eclecticlight.CirrusMac.savedState", ] diff --git a/Casks/d/dintch.rb b/Casks/d/dintch.rb index 020a8a4683618..058ebb1b02c40 100644 --- a/Casks/d/dintch.rb +++ b/Casks/d/dintch.rb @@ -10,11 +10,16 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - strategy :page_match do |page| - match = page.match(%r{(\d+)/(\d+)/dintch(\d+)\.zip}i) - next if match.blank? + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Dintch']]"] + next unless item - "#{match[3].split("", 2).join(".")},#{match[1]}.#{match[2]}" + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end @@ -23,6 +28,7 @@ app "dintch#{version.csv.first.no_dots}/Dintch.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.dintch.sfl*", "~/Library/Caches/co.eclecticlight.Dintch", "~/Library/HTTPStorages/co.eclecticlight.Dintch", "~/Library/Preferences/co.eclecticlight.Dintch.plist", diff --git a/Casks/l/lockrattler.rb b/Casks/l/lockrattler.rb index 4f5fa5de50500..2293ed13bd1a0 100644 --- a/Casks/l/lockrattler.rb +++ b/Casks/l/lockrattler.rb @@ -6,24 +6,30 @@ verified: "eclecticlightdotcom.files.wordpress.com/" name "Lock Rattler" desc "Checks security systems and reports issues" - homepage "https://eclecticlight.co/" + homepage "https://eclecticlight.co/lockrattler-systhist/" livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/lockrattler(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='LockRattler']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end - depends_on macos: ">= :el_capitan" + depends_on macos: ">= :high_sierra" app "lockrattler#{version.csv.first.major}#{version.csv.first.minor}/LockRattler.app" zap trash: [ "~/Library/Caches/co.eclecticlight.LockRattler", + "~/Library/HTTPStorages/co.eclecticlight.LockRattler", "~/Library/Preferences/co.eclecticlight.LockRattler.plist", "~/Library/Saved Application State/co.eclecticlight.LockRattler.savedState", ] diff --git a/Casks/m/metamer.rb b/Casks/m/metamer.rb index b6fe2f38ae736..1c8d4308b6de3 100644 --- a/Casks/m/metamer.rb +++ b/Casks/m/metamer.rb @@ -10,11 +10,16 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - strategy :page_match do |page| - match = page.match(%r{(\d+)/(\d+)/metamer(\d+)\.zip}i) - next if match.blank? + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Metamer']]"] + next unless item - "#{match[3].split("", 2).join(".")},#{match[1]}.#{match[2]}" + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end @@ -23,9 +28,10 @@ app "metamer#{version.csv.first.no_dots}/Metamer.app" zap trash: [ - "~/Library/Caches/co.eclecticlight.Metamer/", - "~/Library/HTTPStorages/co.eclecticlight.Metamer/", + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.metamer.sfl*", + "~/Library/Caches/co.eclecticlight.Metamer", + "~/Library/HTTPStorages/co.eclecticlight.Metamer", "~/Library/Preferences/co.eclecticlight.Metamer.plist", - "~/Library/Saved Application State/co.eclecticlight.Metamer.savedState/", + "~/Library/Saved Application State/co.eclecticlight.Metamer.savedState", ] end diff --git a/Casks/m/mints.rb b/Casks/m/mints.rb index a207b64e91c7f..de7d498ffa74d 100644 --- a/Casks/m/mints.rb +++ b/Casks/m/mints.rb @@ -10,19 +10,25 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/mints(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + 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&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end - depends_on macos: ">= :sierra" + depends_on macos: ">= :high_sierra" 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", diff --git a/Casks/s/signet.rb b/Casks/s/signet.rb index 2852ed85d1cc5..ba63e7bf60735 100644 --- a/Casks/s/signet.rb +++ b/Casks/s/signet.rb @@ -10,18 +10,26 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/signet(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Signet']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end + depends_on macos: ">= :high_sierra" + app "#{token}#{version.csv.first.no_dots}/Signet.app" zap trash: [ "~/Library/Caches/co.eclecticlight.Signet", + "~/Library/HTTPStorages/co.eclecticlight.Signet", "~/Library/Preferences/co.eclecticlight.Signet.plist", "~/Library/Saved Application State/co.eclecticlight.Signet.savedState", ] diff --git a/Casks/s/silentknight.rb b/Casks/s/silentknight.rb index edad49069b597..17786a73bb498 100644 --- a/Casks/s/silentknight.rb +++ b/Casks/s/silentknight.rb @@ -6,6 +6,8 @@ livecheck do skip "Legacy version" end + + depends_on macos: ">= :el_capitan" end on_catalina :or_newer do version "2.07,2023.11" @@ -13,13 +15,23 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{(\d+)/(\d+)/silentknight([^1]\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='SilentKnight#{version.major}']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + # Temporarily override the version to account for a one-off mismatch + version = "2.07" if version == "2.7" + + "#{version},#{match[1]}.#{match[2]}" end end + + depends_on macos: ">= :catalina" end url "https://eclecticlightdotcom.files.wordpress.com/#{version.csv.second.major}/#{version.csv.second.minor}/silentknight#{version.csv.first.no_dots}.zip", @@ -28,12 +40,12 @@ desc "Automatically checks computer's security" homepage "https://eclecticlight.co/lockrattler-systhist/" - depends_on macos: ">= :el_capitan" - app "silentknight#{version.csv.first.no_dots}/SilentKnight.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.silentknight.sfl*", "~/Library/Caches/co.eclecticlight.SilentKnight", + "~/Library/HTTPStorages/co.eclecticlight.SilentKnight", "~/Library/Preferences/co.eclecticlight.SilentKnight.plist", "~/Library/Saved Application State/co.eclecticlight.SilentKnight.savedState", ] diff --git a/Casks/s/silnite.rb b/Casks/s/silnite.rb index b1dbeeebaec48..3f38e39dd383d 100644 --- a/Casks/s/silnite.rb +++ b/Casks/s/silnite.rb @@ -9,16 +9,14 @@ homepage "https://eclecticlight.co/lockrattler-systhist/" livecheck do - url :homepage - regex(%r{href=.*?/(\d+)/(\d+)/silnite[._-]?v?(\d+(?:\.\d+)*\w?)\.zip}i) + url "https://eclecticlight.co/downloads/" + regex(%r{href=.*?/(\d+)/(\d+)/silnite[^"' >]*?\.zip[^>]*?>\s*silnite\s+v?(\d+(?:\.\d+)*)[^a-z)]}i) strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2]},#{match[0]}.#{match[1]}" - end + page.scan(regex).map { |match| "#{match[2]},#{match[0]}.#{match[1]}" } end end - depends_on macos: ">= :el_capitan" + depends_on macos: ">= :big_sur" pkg "silnite#{version.csv.first}/silniteInstaller.pkg" diff --git a/Casks/s/spundle.rb b/Casks/s/spundle.rb index eaa410374fede..8aa132dd9183f 100644 --- a/Casks/s/spundle.rb +++ b/Casks/s/spundle.rb @@ -10,11 +10,16 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{(\d+)/(\d+)/Spundle(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Spundle']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end @@ -23,7 +28,9 @@ app "spundle#{version.csv.first.no_dots}/Spundle.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.spundle.sfl*", "~/Library/Caches/co.eclecticlight.Spundle", + "~/Library/HTTPStorages/co.eclecticlight.Spundle", "~/Library/Preferences/co.eclecticlight.Spundle.plist", "~/Library/Saved Application State/co.eclecticlight.Spundle.savedState", ] diff --git a/Casks/t/taccy.rb b/Casks/t/taccy.rb index 600d5e4c58209..84d28327ed8ab 100644 --- a/Casks/t/taccy.rb +++ b/Casks/t/taccy.rb @@ -10,11 +10,16 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/taccy(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Taccy']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end diff --git a/Casks/t/thetimemachinemechanic.rb b/Casks/t/thetimemachinemechanic.rb index 67652873df8f2..721e33954e6b3 100644 --- a/Casks/t/thetimemachinemechanic.rb +++ b/Casks/t/thetimemachinemechanic.rb @@ -11,21 +11,27 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/t2m2(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='T2M22']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end - depends_on macos: ">= :sierra" + depends_on macos: ">= :big_sur" app "t2m2#{version.csv.first.major}#{version.csv.first.minor}/TheTimeMachineMechanic.app" zap trash: [ - "~/Library/Caches/co.eclecticlight.TheTimeMachineMechanic", - "~/Library/Preferences/co.eclecticlight.TheTimeMachineMechanic.plist", - "~/Library/Saved Application State/co.eclecticlight.TheTimeMachineMechanic.savedState", + "~/Library/Caches/co.eclecticlight.TheTimeMachineMechanic2", + "~/Library/HTTPStorages/co.eclecticlight.TheTimeMachineMechanic2", + "~/Library/Preferences/co.eclecticlight.TheTimeMachineMechanic2.plist", + "~/Library/Saved Application State/co.eclecticlight.TheTimeMachineMechanic2.savedState", ] end diff --git a/Casks/u/ulbow.rb b/Casks/u/ulbow.rb index a4b20bc84fe14..06a381ca020c9 100644 --- a/Casks/u/ulbow.rb +++ b/Casks/u/ulbow.rb @@ -10,19 +10,25 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/ulbow(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='Ulbow']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end - depends_on macos: ">= :sierra" + depends_on macos: ">= :high_sierra" app "ulbow#{version.csv.first.no_dots}/Ulbow.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.ulbow.sfl*", "~/Library/Caches/co.eclecticlight.Ulbow", "~/Library/HTTPStorages/co.eclecticlight.Ulbow", "~/Library/Preferences/co.eclecticlight.Ulbow.plist", diff --git a/Casks/x/xattred.rb b/Casks/x/xattred.rb index 1df4721093657..ce7003dc73425 100644 --- a/Casks/x/xattred.rb +++ b/Casks/x/xattred.rb @@ -10,11 +10,16 @@ livecheck do url "https://raw.githubusercontent.com/hoakleyelc/updates/master/eclecticapps.plist" - regex(%r{/(\d+)/(\d+)/xattred(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + regex(%r{/(\d+)/(\d+)/[^/]+?$}i) + strategy :xml do |xml, regex| + item = xml.elements["//dict[key[text()='AppName']/following-sibling::*[1][text()='xattred']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end @@ -23,7 +28,9 @@ app "xattred#{version.csv.first.major}#{version.csv.first.minor}/xattred.app" zap trash: [ + "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/co.eclecticlight.xattred.sfl*", "~/Library/Caches/co.eclecticlight.xattred", + "~/Library/HTTPStorages/co.eclecticlight.xattred", "~/Library/Preferences/co.eclecticlight.xattred.plist", "~/Library/Saved Application State/co.eclecticlight.xattred.savedState", ] diff --git a/Casks/x/xprocheck.rb b/Casks/x/xprocheck.rb index 49f2a588c7048..c880f7c77d771 100644 --- a/Casks/x/xprocheck.rb +++ b/Casks/x/xprocheck.rb @@ -9,12 +9,17 @@ homepage "https://eclecticlight.co/consolation-t2m2-and-log-utilities/" livecheck do - url :homepage - regex(%r{/(\d+)/(\d+)/xprocheck(\d+)\.zip}i) - strategy :page_match do |page, regex| - page.scan(regex).map do |match| - "#{match[2].split("", 2).join(".")},#{match[0]}.#{match[1]}" - end + 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()='XProCheck']]"] + next unless item + + version = item.elements["key[text()='Version']"]&.next_element&.text&.strip + match = item.elements["key[text()='URL']"]&.next_element&.text&.strip&.match(regex) + next if version.blank? || match.blank? + + "#{version},#{match[1]}.#{match[2]}" end end @@ -22,5 +27,10 @@ app "xprocheck#{version.csv.first.no_dots}/XProCheck.app" - zap trash: "~/Library/Saved Application State/co.eclecticlight.XProCheck.savedState" + zap trash: [ + "~/Library/Caches/co.eclecticlight.XProCheck", + "~/Library/HTTPStorages/co.eclecticlight.XProCheck", + "~/Library/Preferences/co.eclecticlight.XProCheck.plist", + "~/Library/Saved Application State/co.eclecticlight.XProCheck.savedState", + ] end