Files
2021-04-19 03:46:51 +00:00

39 lines
1.2 KiB
Ruby

cask "rubymine" do
version "2021.1,211.6693.118"
sha256 "553a3e0b3e11f42def5490bff66d66289e580afd892ad57755b3a2b7079009e9"
url "https://download.jetbrains.com/ruby/RubyMine-#{version.before_comma}.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 :page_match do |page|
version = page.match(/"version":"(\d+(?:\.\d+)*)/i)
build = page.match(/"build":"(\d+(?:\.\d+)*)/i)
"#{version[1]},#{build[1]}"
end
end
auto_updates true
app "RubyMine.app"
uninstall_postflight do
ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "mine") }.each do |path|
if File.exist?(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