-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
languagetool.rb
35 lines (29 loc) · 1.31 KB
/
languagetool.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cask "languagetool" do
version "2.2.3"
sha256 "b7a2e2f377d7476ebbb0485a447b11f25d6078f37e1616270daeec8cd304296d"
url "https://languagetool.org/download/mac-app/LanguageToolDesktop-#{version}.dmg"
name "LanguageTool for Desktop"
desc "Grammar, spelling and style suggestions in all the writing apps"
homepage "https://languagetool.org/"
# Older items in the Sparkle feed may have a newer pubDate, so it's necessary
# to work with all of the items in the feed (not just the newest one).
livecheck do
url "https://languagetool.org/download/mac-app/appcast.xml"
regex(/(\d+(?:\.\d+)+)/i)
strategy :sparkle do |items, regex|
# The Sparkle versioning scheme is inconsistent. We check the short
# version directly since the versions are not listed chronologically.
# The livecheck may need to be reverted to extracting the version from
# the url. See: https://github.com/Homebrew/homebrew-cask/pull/156995
items.map { |item| item.short_version[regex, 1] }
end
end
depends_on macos: ">= :big_sur"
app "LanguageTool for Desktop.app"
uninstall quit: "org.languagetool.desktop"
zap trash: [
"~/Library/Application Support/LanguageTool for Desktop",
"~/Library/Caches/org.languagetool.desktop",
"~/Library/Preferences/org.languagetool.desktop.plist",
]
end