<commit_before>require "English"

ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/cask/Gemfile"
ENV["BUNDLE_PATH"] = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle"

def run_tests(executable, files, args = [])
  opts = []
  opts << "--serialize-stdout" if ENV["CI"]

  system "bundle", "exec", executable, *opts, "--", *args, "--", *files
end

repo_root = Pathname.new(__FILE__).realpath.parent.parent
repo_root.cd do
  ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
  ENV["HOMEBREW_NO_EMOJI"] = "1"
  ENV.delete("HOMEBREW_CASK_OPTS")

  Homebrew.install_gem_setup_path! "bundler"
  unless quiet_system("bundle", "check")
    system "bundle", "install"
  end

  require "bundler/setup"

  rspec = ARGV.flag?("--rspec") || !ARGV.flag?("--minitest")
  minitest = ARGV.flag?("--minitest") || !ARGV.flag?("--rspec")
<commit_msg>Move `require "bundler/setup“` to top of `cask-tests`.<commit_after>require "English"
require "bundler/setup"

ENV["BUNDLE_GEMFILE"] = "#{HOMEBREW_LIBRARY_PATH}/cask/Gemfile"
ENV["BUNDLE_PATH"] = "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle"

def run_tests(executable, files, args = [])
  opts = []
  opts << "--serialize-stdout" if ENV["CI"]

  system "bundle", "exec", executable, *opts, "--", *args, "--", *files
end

repo_root = Pathname.new(__FILE__).realpath.parent.parent
repo_root.cd do
  ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
  ENV["HOMEBREW_NO_EMOJI"] = "1"
  ENV.delete("HOMEBREW_CASK_OPTS")

  Homebrew.install_gem_setup_path! "bundler"
  unless quiet_system("bundle", "check")
    system "bundle", "install"
  end

  rspec = ARGV.flag?("--rspec") || !ARGV.flag?("--minitest")
  minitest = ARGV.flag?("--minitest") || !ARGV.flag?("--rspec")

{'fraction_non_alphanumeric': 0.19461077844311378, 'fraction_numerical': 0.0023952095808383233, 'mean_word_length': 5.211895910780669, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '814504', 'n_tokens_mistral': 699, 'n_tokens_neox': 665, 'n_words': 104}