<commit_before>cask "spotify" do
  arch = Hardware::CPU.intel? ? "" : "ARM64"

  if Hardware::CPU.intel?
    version "1.1.79.763,c2965cdf,21"
  else
    version "1.1.78.765,5ea20b00,11"
  end

  sha256 :no_check

  url "https://download.scdn.co/Spotify#{arch}.dmg",
      verified: "download.scdn.co/"
  name "Spotify"
  desc "Music streaming service"
  homepage "https://www.spotify.com/"

  livecheck do
    url :url
    strategy :extract_plist do |items|
      match = items["com.spotify.client"].version.match(/^(\d+(?:\.\d+)+)[._-]g(\h+)[._-](\d+)$/i)
      next if match.blank?

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

  auto_updates true
  depends_on macos: ">= :el_capitan"

  app "Spotify.app"

  uninstall quit:      "com.spotify.client",
            launchctl: "com.spotify.webhelper"

  zap trash: [
    "~/Library/Application Support/Spotify",<commit_msg>Update spotify from 1.1.78.765 to 1.1.79.763 (#119448)<commit_after>cask "spotify" do
  arch = Hardware::CPU.intel? ? "" : "ARM64"

  if Hardware::CPU.intel?
    version "1.1.79.763,c2965cdf,21"
  else
    version "1.1.79.763,c2965cdf,18"
  end

  sha256 :no_check

  url "https://download.scdn.co/Spotify#{arch}.dmg",
      verified: "download.scdn.co/"
  name "Spotify"
  desc "Music streaming service"
  homepage "https://www.spotify.com/"

  livecheck do
    url :url
    strategy :extract_plist do |items|
      match = items["com.spotify.client"].version.match(/^(\d+(?:\.\d+)+)[._-]g(\h+)[._-](\d+)$/i)
      next if match.blank?

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

  auto_updates true
  depends_on macos: ">= :el_capitan"

  app "Spotify.app"

  uninstall quit:      "com.spotify.client",
            launchctl: "com.spotify.webhelper"

  zap trash: [
    "~/Library/Application Support/Spotify",
{'fraction_non_alphanumeric': 0.18567493112947658, 'fraction_numerical': 0.049035812672176306, 'mean_word_length': 3.0266075388026605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6838450', 'n_tokens_mistral': 776, 'n_tokens_neox': 715, 'n_words': 125}