43 lines
1.3 KiB
Ruby
43 lines
1.3 KiB
Ruby
cask "rubymine" do
|
|
arch arm: "-aarch64"
|
|
|
|
version "2023.2.2,232.9921.48"
|
|
sha256 arm: "53e551897d42d0986b2e01f171bd7b96fe790516fdf1578feabec0a44cf441e5",
|
|
intel: "2b77f24770813c0cf55892effde8c0a6a5af1c9f4b08c1c8ae9163e503afc5d3"
|
|
|
|
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
|