Files
homebrew-cask/Casks/r/rustrover.rb

44 lines
1.5 KiB
Ruby

cask "rustrover" do
arch arm: "-aarch64"
version "2023.3,233.10527.212"
sha256 arm: "d98eb787a95dcf35ab8948e7b98dca4e769ed3d08405ed69376c33e7e33f4085",
intel: "1573cb95ff2f8afcb5ac8c38ffdad68e9c49dbdaf3750bd19afe4081deafeb98"
url "https://download.jetbrains.com/rustrover/RustRover-#{version.csv.second}#{arch}.dmg"
name "RustRover"
desc "Rust IDE"
homepage "https://www.jetbrains.com/rust/"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=RR&latest=true&type=eap"
strategy :json do |json|
json["RR"].map do |release|
"#{release["version"]},#{release["build"]}"
end
end
end
auto_updates true
depends_on macos: ">= :catalina"
app "RustRover #{version.before_comma} EAP.app", target: "RustRover.app"
uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "rover") }.each do |path|
if File.readable?(path) &&
File.readlines(path).grep(/# see com.intellij.idea.SocketLock for the server side of this interface/).any?
File.delete(path)
end
end
end
zap trash: [
"~/Library/Application Support/JetBrains/RustRover#{version.major_minor}",
"~/Library/Caches/JetBrains/RustRover#{version.major_minor}",
"~/Library/Logs/JetBrains/RustRover#{version.major_minor}",
"~/Library/Preferences/com.jetbrains.rustrover-EAP.plist",
"~/Library/Saved Application State/com.jetbrains.rustrover-EAP.SavedState",
]
end