<commit_before>cask 'sage' do
  if MacOS.version <= :mavericks
    version '6.9'
    sha256 '21f460c90db2a9ee83d196937587de5daab8c6712b0f24366b6a1c15a8dd592b'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/old/sage-#{version}-x86_64-Darwin-OSX-10.7-app.dmg"
  elsif MacOS.version <= :yosemite
    version '6.9'
    sha256 '03112bf747cf807f308d518f34c1982ca3c9599e65bf64a6782efc78136198a4'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/old/sage-#{version}-x86_64-Darwin-OSX_10.10_x86_64-app.dmg"
  else
    version '7.2'
    sha256 '4ede3cac113778e120d233baf702426ffad10905d43afe239c1ea8fd1068697e'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/sage-#{version}-OSX_10.11.4-x86_64.app.dmg"
  end

  name 'Sage'
  homepage 'https://www.sagemath.org/'
  license :gpl

  depends_on macos: '>= :lion'
  depends_on arch: :x86_64

  if MacOS.version <= :yosemite
    app "Sage-#{version}.app"
    binary "#{appdir}/Sage-#{version}.app/Contents/Resources/sage/sage"
  else
    app "SageMath-#{version}.app"
    binary "#{appdir}/SageMath-#{version}.app/Contents/Resources/sage/sage"
  end

  zap delete: [
                '~/.sage',
                '~/Library/Logs/sage.log',
              ]

  caveats do
    files_in_usr_local
  end
end<commit_msg>updated sage (7.3) (#24181)<commit_after>cask 'sage' do
  if MacOS.version <= :lion
    version '7.2'
    sha256 'f88e0686ae8fe31f2684163a57bea938d93f732842cab7c263ee6e4cdeb271cc'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/sage-#{version}-OSX_10.7.5-x86_64.app.dmg"
  elsif MacOS.version <= :mavericks
    version '7.2'
    sha256 'a4cd5c6f3207cd9c429642bb58a6310ba05e6da9fddbf36dc1aa5e47c5904c96'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/sage-#{version}-OSX_10.9.5-x86_64.app.dmg"
  else
    version '7.3'
    sha256 'c8984ccbe870447d4c470aabbdf0885e31a39ceab055e1a0e0c9a29508fff943'
    # mit.edu/sage was verified as official when first introduced to the cask
    url "http://mirrors.mit.edu/sage/osx/intel/sage-#{version}-OSX_10.11.6-x86_64.app.dmg"
  end

  name 'Sage'
  homepage 'https://www.sagemath.org/'
  license :gpl

  depends_on macos: '>= :lion'
  depends_on arch: :x86_64

  app "SageMath-#{version}.app"
  binary "#{appdir}/SageMath-#{version}.app/Contents/Resources/sage/sage"

  zap delete: [
                '~/.sage',
                '~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.sagemath.sage.sfl',
                '~/Library/Logs/sage.log',
                '~/Library/Preferences/org.sagemath.Sage.plist',
              ]

  caveats do
    files_in_usr_local
  end
end
{'fraction_non_alphanumeric': 0.12591605596269154, 'fraction_numerical': 0.11092604930046636, 'mean_word_length': 3.2777777777777777, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '5539007', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1236, 'n_words': 188}