phinze/homebrew-cask

View on GitHub
Casks/f/fabfilter-twin.rb

Summary

Maintainability
A
1 hr
Test Coverage
cask "fabfilter-twin" do
  version "3.05"
  sha256 "0f93606650ce1ead95ba7eabd65140fe0bec9fb9de9844d39e4c01eec3991318"

  url "https://cdn-b.fabfilter.com/downloads/fftwin#{version.no_dots}.dmg"
  name "FabFilter Twin"
  desc "Synthesiser plug-in"
  homepage "https://www.fabfilter.com/products/twin-2-powerful-synthesizer-plug-in"

  livecheck do
    url "https://www.fabfilter.com/download"
    strategy :page_match do |page|
      match = page.match(/fftwin(\d)(\d+)\.dmg/i)
      next if match.blank?

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

  depends_on macos: ">= :sierra"

  pkg "FabFilter Twin #{version} Installer.pkg"

  uninstall pkgutil: "com.fabfilter.Twin.#{version.major}"

  # No zap stanza required
end