phinze/homebrew-cask

View on GitHub
Casks/r/robofont.rb

Summary

Maintainability
A
0 mins
Test Coverage
cask "robofont" do
  version "4.4,2310101500"
  sha256 :no_check

  url "https://static.typemytype.com/robofont/RoboFont.dmg",
      verified: "static.typemytype.com/robofont/"
  name "RoboFont"
  desc "Font editor"
  homepage "https://robofont.com/"

  livecheck do
    url "https://doc.robofont.com/appcast.xml"
    strategy :page_match do |page|
      match = page.match(/Version\s(\d+(?:\.\d+)+)\s\(build\s(\d+(?:\.\d+)*)\)/i)
      next if match.blank?

      "#{match[1]},#{match[2]}"
    end
  end

  depends_on macos: ">= :sierra"

  app "RoboFont.app"

  zap trash: [
    "~/Library/Application Support/RoboFont",
    "~/Library/Preferences/com.typemytype.robofont#{version.major}.plist",
    "~/Library/Saved Application State/com.typemytype.robofont#{version.major}.savedState",
  ]

  caveats do
    requires_rosetta
  end
end