cask "pycharm-edu" do version "2020.2.4,202.7660.65" sha256 "98a5b27e287c9a2ce95d623de2c07582999956a8424fc4efc798f75198fe6360" url "https://download.jetbrains.com/python/pycharm-edu-#{version.before_comma}.dmg" appcast "https://data.services.jetbrains.com/products/releases?code=PCE&latest=true&type=release" name "Jetbrains PyCharm Educational Edition" name "PyCharm Edu" desc "Professional IDE for scientific and web Python development" homepage "https://www.jetbrains.com/pycharm-edu/" auto_updates true app "PyCharm Edu.app" uninstall_postflight do ENV["PATH"].split(File::PATH_SEPARATOR).map { |path| File.join(path, "charm") }.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/PyCharmEdu#{version.major_minor}", "~/Library/Caches/PyCharmEdu#{version.major_minor}", "~/Library/Logs/PyCharmEdu#{version.major_minor}", "~/Library/Preferences/PyCharmEdu#{version.major_minor}", ] end