cask 'pycharm' do version '2018.1.1,181.4445.76' sha256 '00299c551f5ebf4e6d09c4cbed54c17cfdb976396cdf9552d85fdd33dc2834c7' url "https://download.jetbrains.com/python/pycharm-professional-#{version.before_comma}.dmg" appcast 'https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=release', checkpoint: '622c46efe5a979595dfe352c2306195e1d0d2f3a3b99cc0aff62e2e685dc9e44' name 'PyCharm' homepage 'https://www.jetbrains.com/pycharm/' auto_updates true app 'PyCharm.app' uninstall_postflight do ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'charm') }.each { |path| File.delete(path) if File.exist?(path) && File.readlines(path).grep(%r{# see com.intellij.idea.SocketLock for the server side of this interface}).any? } end zap trash: [ "~/Library/Application Support/PyCharm#{version.major_minor}", "~/Library/Caches/PyCharm#{version.major_minor}", "~/Library/Logs/PyCharm#{version.major_minor}", "~/Library/Preferences/PyCharm#{version.major_minor}", ] end