34 lines
978 B
Ruby
34 lines
978 B
Ruby
cask "hook" do
|
|
version "3.4.1,2021.12"
|
|
sha256 "3de81aefb305d35019e2b1713f45af22aecd426cd802637c0c540811ef8c14d1"
|
|
|
|
url "https://hookproductivity.com/wp-content/uploads/#{version.csv.second.major}/#{version.csv.second.minor}/Hook-productivity-app-#{version.csv.first}.dmg_.zip",
|
|
user_agent: :fake
|
|
name "Hook"
|
|
desc "Link and retrieve key information"
|
|
homepage "https://hookproductivity.com/"
|
|
|
|
livecheck do
|
|
url :homepage
|
|
strategy :page_match do |page|
|
|
match = page.match(%r{href=.*?/(\d+)/(\d+)/Hook-productivity-app-(\d+(?:\.\d+)*(?:-\d+)*)\.dmg}i)
|
|
next if match.blank?
|
|
|
|
"#{match[3]},#{match[1]}.#{match[2]}"
|
|
end
|
|
end
|
|
|
|
auto_updates true
|
|
|
|
app "Hook.app"
|
|
|
|
uninstall launchctl: "com.cogsciapps.hookautolaunchhelper",
|
|
quit: "com.cogsciapps.hook"
|
|
|
|
zap trash: [
|
|
"~/Library/Caches/com.cogsciapps.hook",
|
|
"~/Library/Logs/com.cogsciapps.hook",
|
|
"~/Library/Preferences/com.cogsciapps.hook.plist",
|
|
]
|
|
end
|