<commit_before>class Lolcat < Formula
  desc "Rainbows and unicorns in your console!"
  homepage "https://github.com/busyloop/lolcat"
  url "https://github.com/busyloop/lolcat.git",
      :tag => "v99.9.10",
      :revision => "a30aab7f973832c785c08fd2456c77a2d986ca2a"

  bottle do
    cellar :any_skip_relocation
    sha256 "79a876424a8942e9bd196c73778c61479d1092d96ce1833ccdecc5814a484cfc" => :high_sierra
    sha256 "492e7fe98802675c99f981a57ad9526b248351a9c62ff4c65c92cc91a7ce7d0a" => :sierra
    sha256 "ede0105710e8d64af8998252e978dc4983efa10a234ecdab25b6bd61a8d11a08" => :el_capitan
    sha256 "b338cd33256e246e29f7e3c79b2442d8abb895e10e97e5fb988c7d8dced2ac36" => :yosemite
  end

  def install
    ENV["GEM_HOME"] = libexec
    system "gem", "build", "lolcat.gemspec"
    system "gem", "install", "lolcat-#{version}.gem"
    bin.install libexec/"bin/lolcat"
    bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"])
  end

  test do
    (testpath/"test.txt").write <<~EOS<commit_msg>lolcat: update 99.9.10 bottle.<commit_after>class Lolcat < Formula
  desc "Rainbows and unicorns in your console!"
  homepage "https://github.com/busyloop/lolcat"
  url "https://github.com/busyloop/lolcat.git",
      :tag => "v99.9.10",
      :revision => "a30aab7f973832c785c08fd2456c77a2d986ca2a"

  bottle do
    cellar :any_skip_relocation
    sha256 "5ef4486eb2d3247c74d11fbc41e8aa8b8b62839f297a8b0b8b48505dfa7faa36" => :high_sierra
    sha256 "f31fe40b97c83ba23c7925c650e3f3f7d25a5e78dae3ad7c4106f95224f89a2d" => :sierra
    sha256 "e0cc835f1f2258ee8ada70feeb61e7a8ac7d8b85845439a6c108bf192e59f28f" => :el_capitan
  end

  def install
    ENV["GEM_HOME"] = libexec
    system "gem", "build", "lolcat.gemspec"
    system "gem", "install", "lolcat-#{version}.gem"
    bin.install libexec/"bin/lolcat"
    bin.env_script_all_files(libexec/"bin", :GEM_HOME => ENV["GEM_HOME"])
  end

  test do
    (testpath/"test.txt").write <<~EOS
{'fraction_non_alphanumeric': 0.11791967044284243, 'fraction_numerical': 0.18640576725025745, 'mean_word_length': 4.941896024464832, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, 'https://': 4, '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': '6464439', 'n_tokens_mistral': 1052, 'n_tokens_neox': 874, 'n_words': 113}