<commit_before>cask "mattermost" do
  arch = Hardware::CPU.intel? ? "x64" : "m1"

  version "5.0.4"

  if Hardware::CPU.intel?
    sha256 "3a923e9171df0dc78be6d82c637c1a040aceae596e49ae06465c3c4c045d4f97"
  else
    sha256 "6cd18cbce039a23638e802aa4ada7ab2582d63ccb8bc9f34321f6d3da1fcdc7b"
  end

  url "https://releases.mattermost.com/desktop/#{version}/mattermost-desktop-#{version}-mac-#{arch}.zip"
  name "Mattermost"
  desc "Open-source, self-hosted Slack-alternative"
  homepage "https://about.mattermost.com/"

  livecheck do
    url "https://docs.mattermost.com/install/desktop-app-install.html#macos-10-9"
    regex(%r{href=.*?/mattermost[._-]desktop[._-]v?(\d+(?:\.\d+)+)[._-]mac[._-]#{arch}\.dmg}i)
  end

  app "Mattermost.app"

  zap trash: [
    "~/Library/Application Support/Mattermost",
    "~/Library/Logs/Mattermost",
    "~/Library/Preferences/Mattermost.Desktop.plist",
    "~/Library/Saved Application State/Mattermost.Desktop.savedState",<commit_msg>mattermost 5.1.0<commit_after>cask "mattermost" do
  arch = Hardware::CPU.intel? ? "x64" : "m1"

  version "5.1.0"

  if Hardware::CPU.intel?
    sha256 "54ab4cdc253c7fa449067d6e3a95ee1d28fe65ff4ac9cb96b5efc9a37d114a7c"
  else
    sha256 "a5010c4aa7d79f1d7c849c7d8c11ab8aacffe1dea0176e0d801349adeec9628a"
  end

  url "https://releases.mattermost.com/desktop/#{version}/mattermost-desktop-#{version}-mac-#{arch}.zip"
  name "Mattermost"
  desc "Open-source, self-hosted Slack-alternative"
  homepage "https://about.mattermost.com/"

  livecheck do
    url "https://docs.mattermost.com/install/desktop-app-install.html#macos-10-9"
    regex(%r{href=.*?/mattermost[._-]desktop[._-]v?(\d+(?:\.\d+)+)[._-]mac[._-]#{arch}\.dmg}i)
  end

  app "Mattermost.app"

  zap trash: [
    "~/Library/Application Support/Mattermost",
    "~/Library/Logs/Mattermost",
    "~/Library/Preferences/Mattermost.Desktop.plist",
    "~/Library/Saved Application State/Mattermost.Desktop.savedState",
{'fraction_non_alphanumeric': 0.17034376603386353, 'fraction_numerical': 0.0887634684453566, 'mean_word_length': 4.386740331491713, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6495530', 'n_tokens_mistral': 919, 'n_tokens_neox': 803, 'n_words': 88}