<commit_before>class Jinx < Formula
  desc "Embeddable scripting language for real-time applications"
  homepage "https://github.com/JamesBoer/Jinx"
  url "https://github.com/JamesBoer/Jinx/archive/v1.2.0.tar.gz"
  sha256 "18a88ef34b06c63210ac966429785c5e6f7ec4369719260f2af4a3dee1544e1b"
  license "MIT"
  head "https://github.com/JamesBoer/Jinx.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "500008f0bcc3b8104cf661a23f0801d898699b4ceb811f4605025af28d5556c9" => :catalina
    sha256 "146702c8621f915729d27b1ac04105e534a984e62532d7966a4252e412febcb0" => :mojave
    sha256 "d091ec17ecfeba616bdf756768e8f1800a06d6dfbf1245979194d35f7a4b4039" => :high_sierra
  end

  depends_on "cmake" => :build

  def install
    # disable building tests
    inreplace "CMakeLists.txt", "if(NOT jinx_is_subproject)", "if(FALSE)"

    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "make"
      lib.install "libJinx.a"
    end

    include.install Dir["Source/*.h"]
  end

  test do
    (testpath/"test.cpp").write <<~EOS
      #include "Jinx.h"
<commit_msg>jinx: update 1.2.0 bottle.<commit_after>class Jinx < Formula
  desc "Embeddable scripting language for real-time applications"
  homepage "https://github.com/JamesBoer/Jinx"
  url "https://github.com/JamesBoer/Jinx/archive/v1.2.0.tar.gz"
  sha256 "18a88ef34b06c63210ac966429785c5e6f7ec4369719260f2af4a3dee1544e1b"
  license "MIT"
  head "https://github.com/JamesBoer/Jinx.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "0500e01d366b1f61c140570eeaae54003e30ad139b3f169d7dafdb08b2fd7b59" => :catalina
    sha256 "f12580f7319652bf5309ef767509d2f2c823bbedadeb8a85b2b6f35d0a65a747" => :mojave
    sha256 "22146d4fcd750935d4f125820ee3cb33088a977106fa630e22c7487e3a3a8132" => :high_sierra
  end

  depends_on "cmake" => :build

  def install
    # disable building tests
    inreplace "CMakeLists.txt", "if(NOT jinx_is_subproject)", "if(FALSE)"

    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "make"
      lib.install "libJinx.a"
    end

    include.install Dir["Source/*.h"]
  end

  test do
    (testpath/"test.cpp").write <<~EOS
      #include "Jinx.h"

{'fraction_non_alphanumeric': 0.10840606338998622, 'fraction_numerical': 0.17271474506201195, 'mean_word_length': 4.27360774818402, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2919039', 'n_tokens_mistral': 1124, 'n_tokens_neox': 912, 'n_words': 137}