<commit_before>class Rure < Formula
  desc "C API for RUst's REgex engine"
  homepage "https://github.com/rust-lang/regex/tree/HEAD/regex-capi"
  url "https://github.com/rust-lang/regex/archive/1.7.0.tar.gz"
  sha256 "9eb315d2874029e55397f5c4ff610215bc65d589679d72979378a94bcbc47586"
  license all_of: [
    "Unicode-TOU",
    any_of: ["Apache-2.0", "MIT"],
  ]

  bottle do
    sha256 cellar: :any,                 arm64_ventura:  "fd50bff22be71fbae8c422ac599e6fff0e4efc164b2c6e481d3f9333f010ea33"
    sha256 cellar: :any,                 arm64_monterey: "96e03e60025e7a807c0310ca52b92dbb74f0754a2fa5c6a3574943a6ea43b159"
    sha256 cellar: :any,                 arm64_big_sur:  "217c7c2c97c04ab1af1621e270ea867f953e2c4644548b38463781277b329dbc"
    sha256 cellar: :any,                 monterey:       "33b0c8e9d7e0db6187901b0c106118cb421a1061b86e7b85cd9a6168bccb7d12"
    sha256 cellar: :any,                 big_sur:        "9553095ff8bdfcbd1b51859881c9d329d3f70d40b9f5bf71636c1f41bee6dbfa"
    sha256 cellar: :any,                 catalina:       "306d235a91ad6e2454b142a29d373bfc5709fcbb4531e9718ecfce6202beb025"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "305261750d4870844c903e45983f7863eaa321e6aba6683b4f0b88fde59d8c51"
  end

  depends_on "rust" => :build

  def install
    system "cargo", "build", "--lib", "--manifest-path", "regex-capi/Cargo.toml", "--release"
    include.install "regex-capi/include/rure.h"
    lib.install "target/release/#{shared_library("librure")}"
    lib.install "target/release/librure.a"
    prefix.install "regex-capi/README.md" => "README-capi.md"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <rure.h>
      int main(int argc, char **argv) {
        rure *re = rure_compile_must("a");
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lrure", "-o", "test"
    system "./test"
  end
end
<commit_msg>rure: update 1.7.0 bottle.<commit_after>class Rure < Formula
  desc "C API for RUst's REgex engine"
  homepage "https://github.com/rust-lang/regex/tree/HEAD/regex-capi"
  url "https://github.com/rust-lang/regex/archive/1.7.0.tar.gz"
  sha256 "9eb315d2874029e55397f5c4ff610215bc65d589679d72979378a94bcbc47586"
  license all_of: [
    "Unicode-TOU",
    any_of: ["Apache-2.0", "MIT"],
  ]

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "e1f1933ea249fc5ee80a196c487e3845245569d71296ba0f410836fa72f2df9c"
    sha256 cellar: :any,                 arm64_big_sur:  "36aa508ccd0e7547847426e3fc81ba665ca68830552656a539a22c7c4d57da47"
    sha256 cellar: :any,                 monterey:       "ec325f3c444065c4417b581bc0cf9526d58fe821c73668d37da280e02a99195c"
    sha256 cellar: :any,                 big_sur:        "804c90171510e98f72f2b4f3ac871f60ce3beaaa8a8d6ec0d7fb65c43a53daa9"
    sha256 cellar: :any,                 catalina:       "a77cf8820bd860ccd0a2c2956a27d12d8ec3ce902ee8e0c60cc64c5f00db55fb"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "02094429cdc14bb30129260c30ba4d52e6323019fb8d169c2de3887bdfd5c338"
  end

  depends_on "rust" => :build

  def install
    system "cargo", "build", "--lib", "--manifest-path", "regex-capi/Cargo.toml", "--release"
    include.install "regex-capi/include/rure.h"
    lib.install "target/release/#{shared_library("librure")}"
    lib.install "target/release/librure.a"
    prefix.install "regex-capi/README.md" => "README-capi.md"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <rure.h>
      int main(int argc, char **argv) {
        rure *re = rure_compile_must("a");
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-L#{lib}", "-lrure", "-o", "test"
    system "./test"
  end
end

{'fraction_non_alphanumeric': 0.11949175452825088, 'fraction_numerical': 0.1897810218978102, 'mean_word_length': 3.327485380116959, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '6909880', 'n_tokens_mistral': 1939, 'n_tokens_neox': 1566, 'n_words': 218}