cask 'intellij-idea-eap' do version '2017.1.2,171.4249.4' sha256 '2a094a9655de0d845c38af2b10b1f446771063fc1114877e3a9fde69e782f175' url "https://download.jetbrains.com/idea/ideaIU-#{version.after_comma}.dmg" name 'IntelliJ IDEA Ultimate EAP' homepage "https://confluence.jetbrains.com/display/IDEADEV/IDEA+#{version.major_minor}+EAP" auto_updates true app "IntelliJ IDEA #{version.before_comma} EAP.app" uninstall_postflight do ENV['PATH'].split(File::PATH_SEPARATOR).map { |path| File.join(path, 'idea') }.each { |path| File.delete(path) if File.exist?(path) } end zap delete: [ "~/Library/Caches/IntelliJIdea#{version.major_minor}", "~/Library/Logs/IntelliJIdea#{version.major_minor}", "~/Library/Application Support/IntelliJIdea#{version.major_minor}", "~/Library/Preferences/IntelliJIdea#{version.major_minor}", ] end