homebrew-cask/Casks/r/rubymine.rb

43 lines
1.3 KiB
Ruby

cask "rubymine" do
arch arm: "-aarch64"
version "2023.2.1,232.9559.58"
sha256 arm: "422462636fc4036a2a28037519decef70f38505826b34f167020b1ffeea3a8aa",
intel: "1ae42d9f0af0e293406a7ab6042299cc29a3ae4f6d023656bebc0b1d78ad0a4b"
url "https://download.jetbrains.com/ruby/RubyMine-#{version.csv.first}#{arch}.dmg"
name "RubyMine"
desc "Ruby on Rails IDE"
homepage "https://www.jetbrains.com/ruby/"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=RM&latest=true&type=release"
strategy :json do |json|
json["RM"].map do |release|
"#{release["version"]},#{release["build"]}"
end
end
end
auto_updates true
depends_on macos: ">= :high_sierra"
app "RubyMine.app"
uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "mine") }.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/RubyMine#{version.major_minor}",
"~/Library/Caches/RubyMine#{version.major_minor}",
"~/Library/Logs/RubyMine#{version.major_minor}",
"~/Library/Preferences/RubyMine#{version.major_minor}",
]
end