forked from dahlia/homebrew-jetbrains-eap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrubymine-eap.rb
More file actions
50 lines (41 loc) · 1.68 KB
/
Copy pathrubymine-eap.rb
File metadata and controls
50 lines (41 loc) · 1.68 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
cask "rubymine-eap" do
arch arm: "-aarch64"
version "2025.3.2,253.30387.23"
sha256 arm: "90fe3860f993191fac31b05f7bae4d53563d10a9bd0b48bd4806d3b1b216dab1",
intel: "e581a8da17ccd8036ab55ee8f8b607502a619ae1b1fae50df9afc7f59a5be8b1"
url "https://download.jetbrains.com/ruby/RubyMine-#{version.csv.second}#{arch}.dmg"
name "RubyMine EAP"
desc "Ruby on Rails IDE (EAP)"
homepage "https://www.jetbrains.com/ruby/nextversion/"
livecheck do
url "https://data.services.jetbrains.com/products/releases?code=RM&release.type=eap"
strategy :json do |json|
json["RM"]&.map do |release|
version = release["version"]
build = release["build"]
next if version.blank? || build.blank?
"#{version},#{build}"
end
end
end
auto_updates true
# The application path is often inconsistent between versions
rename "RubyMine*.app", "RubyMine EAP.app"
app "RubyMine EAP.app"
binary "#{appdir}/RubyMine EAP.app/Contents/MacOS/rubymine", target: "rubymine-eap"
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/JetBrains/RubyMine#{version.csv.first}",
"~/Library/Caches/JetBrains/RubyMine#{version.csv.first}",
"~/Library/Logs/JetBrains/RubyMine#{version.csv.first}",
"~/Library/Preferences/com.jetbrains.RubyMine-EAP.plist",
"~/Library/Saved Application State/com.jetbrains.RubyMine-EAP.savedState",
]
end