<commit_before>cask "parallels12" do
  version "12.2.1-41615"
  sha256 "d5aff59a541bf3483cbed9c740b3a740ba7ebb922fcee4a7ab90e2645ce49fcb"

  url "https://download.parallels.com/desktop/v#{version.major}/#{version}/ParallelsDesktop-#{version}.dmg"
  name "Parallels Desktop"
  desc "Desktop virtualization software"
  homepage "https://www.parallels.com/products/desktop/"

  livecheck do
    url "https://kb.parallels.com/123948"
    regex(/(v?\d+(?:\.\d+)+\s*\(\d+\)|\(v?\d+(?:\.\d+)+-\d+\))/i)
    strategy :page_match do |page, regex|
      page.scan(regex).map { |match| match.first.strip.tr("()", "").gsub(/\s+/, "-") }
    end
  end

  conflicts_with cask: [
    "parallels",
    "homebrew/cask-versions/parallels13",
    "homebrew/cask-versions/parallels14",
    "homebrew/cask-versions/parallels15",
    "homebrew/cask-versions/parallels16",
  ]
  depends_on macos: [
    :yosemite,
    :el_capitan,
    :sierra,
  ]

  app "Parallels Desktop.app"

  postflight do
    # Unhide the application
    system_command "/usr/bin/chflags",
                   args: ["nohidden", "#{appdir}/Parallels Desktop.app"],<commit_msg>parallels12: simplify macOS dependency<commit_after>cask "parallels12" do
  version "12.2.1-41615"
  sha256 "d5aff59a541bf3483cbed9c740b3a740ba7ebb922fcee4a7ab90e2645ce49fcb"

  url "https://download.parallels.com/desktop/v#{version.major}/#{version}/ParallelsDesktop-#{version}.dmg"
  name "Parallels Desktop"
  desc "Desktop virtualization software"
  homepage "https://www.parallels.com/products/desktop/"

  livecheck do
    url "https://kb.parallels.com/123948"
    regex(/(v?\d+(?:\.\d+)+\s*\(\d+\)|\(v?\d+(?:\.\d+)+-\d+\))/i)
    strategy :page_match do |page, regex|
      page.scan(regex).map { |match| match.first.strip.tr("()", "").gsub(/\s+/, "-") }
    end
  end

  conflicts_with cask: [
    "parallels",
    "homebrew/cask-versions/parallels13",
    "homebrew/cask-versions/parallels14",
    "homebrew/cask-versions/parallels15",
    "homebrew/cask-versions/parallels16",
  ]
  depends_on macos: "<= :sierra"

  app "Parallels Desktop.app"

  postflight do
    # Unhide the application
    system_command "/usr/bin/chflags",
                   args: ["nohidden", "#{appdir}/Parallels Desktop.app"],
{'fraction_non_alphanumeric': 0.1786511835640911, 'fraction_numerical': 0.05448861098704779, 'mean_word_length': 3.5436105476673427, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '192459', 'n_tokens_mistral': 957, 'n_tokens_neox': 880, 'n_words': 120}