<commit_before>class Ejdb < Formula
  desc "Embeddable JSON Database engine C11 library"
  homepage "https://ejdb.org"
  url "https://github.com/Softmotions/ejdb/archive/v2.0.45.tar.gz"
  sha256 "fa3083a97b2a9e9e59c51edda9001db1d69f26960566cd8bad93c5d30d9f414f"
  head "https://github.com/Softmotions/ejdb.git"

  bottle do
    cellar :any
    sha256 "ce4c580948d8ce53d3608d9b7ee5d7a20e1f708f7c94f7705bff8ba7feabee71" => :catalina
    sha256 "f02d9c9fa43a65910f9b98f42f6239de2ed88df1703a5aa595ad873e0323b517" => :mojave
    sha256 "aef2a4c04ff2c8219153c7e94a04ac0a967426058b42b02fae0776b3ab5343ab" => :high_sierra
  end

  depends_on "cmake" => :build

  def install
    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "make", "install"
    end
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <ejdb2/ejdb2.h>

      #define RCHECK(rc_)          \\<commit_msg>ejdb: update 2.0.45 bottle.<commit_after>class Ejdb < Formula
  desc "Embeddable JSON Database engine C11 library"
  homepage "https://ejdb.org"
  url "https://github.com/Softmotions/ejdb/archive/v2.0.45.tar.gz"
  sha256 "fa3083a97b2a9e9e59c51edda9001db1d69f26960566cd8bad93c5d30d9f414f"
  head "https://github.com/Softmotions/ejdb.git"

  bottle do
    cellar :any
    sha256 "46163fc4b633be0ea2c02fa6a5bca3705c9a17e3592627d34f3243ddf9271fb1" => :catalina
    sha256 "dc07e8bfcaaa88f6ac190a58a86935d38da935a8c4115aceb4ce320b58d4ad87" => :mojave
    sha256 "34a6481828a589de2ceaafdb015d5465983ddca9ea684a928825fdf05309e9a4" => :high_sierra
  end

  depends_on "cmake" => :build

  def install
    mkdir "build" do
      system "cmake", "..", *std_cmake_args
      system "make", "install"
    end
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <ejdb2/ejdb2.h>

      #define RCHECK(rc_)          \\
{'fraction_non_alphanumeric': 0.10514786418400876, 'fraction_numerical': 0.192223439211391, 'mean_word_length': 4.005479452054795, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '2432410', 'n_tokens_mistral': 983, 'n_tokens_neox': 807, 'n_words': 115}