cask "mixed-in-key" do version "11.2.6.7446,67" sha256 :no_check # required as upstream package is updated in-place url "https://builds.mixedinkey.com/download/#{version.csv.second}/release/latest?key=public" name "Mixed In Key" desc "Harmonic mixing for DJs and music producers" homepage "https://mixedinkey.com/get#{version.major}/" # The version for the latest file can only be found by checking the headers # (`Location` or `Content-Disposition`) of the unversioned URL for the latest # file. This URL includes a numeric ID that varies based on major version and # platform (Mac, Windows). The upstream download page is specific to a given # major version, so we have to fetch multiple pages to identify the current # URL for the latest file. livecheck do url "https://shop.mixedinkey.com" regex(/Mixed(?:%2B|[+._-])In(?:%2B|[+._-])Key[._-]v?(\d+(?:\.\d+)+)/i) strategy :page_match do |page, regex| # Find the current major version major_version = page[/Mixed\s+in\s+Key\s+v?(\d+)\s*