<commit_before>class Ooniprobe < Formula
  desc "Network interference detection tool"
  homepage "https://ooni.org/"
  url "https://github.com/ooni/probe-cli/archive/v3.15.2.tar.gz"
  sha256 "75e3a51c5002ef95b1743a8836fe0a4ea252f1373dab021798f38b24f992eb75"
  license "GPL-3.0-or-later"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "37f13e7a4c29fc9bb82f17af24dfbff2c5c89dcdc9d25b6fcf62c2c429c617de"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "409a6da13f4c4d11e36b379d271d4766f4c7bbab6073023c051a214e0ab7df82"
    sha256 cellar: :any_skip_relocation, monterey:       "3ac29c15f0e177197e43705bf9244fedb6b3a042793a6b0a4402037e4add0bf8"
    sha256 cellar: :any_skip_relocation, big_sur:        "1462141e771a79241f3c9d441451263761469c1e7cd99feaf0a2df57ae5e4628"
    sha256 cellar: :any_skip_relocation, catalina:       "b827dfc25d78607b72cce3b8dc9a1e0f30cdd2392c83d1c8dc1eef7c91878ffe"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "fe24a992da86bde5f1fc79f83bb2228923d6f4bf2a8ee9b99aa03d1c5e905136"
  end

  depends_on "go" => :build
  depends_on "tor"

  def install
    system "go", "build", *std_go_args, "-ldflags", "-s -w", "./cmd/ooniprobe"
    (var/"ooniprobe").mkpath
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/ooniprobe version")
    # failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB).
    return if OS.linux?

    (testpath/"config.json").write <<~EOS<commit_msg>ooniprobe: update 3.15.2 bottle.<commit_after>class Ooniprobe < Formula
  desc "Network interference detection tool"
  homepage "https://ooni.org/"
  url "https://github.com/ooni/probe-cli/archive/v3.15.2.tar.gz"
  sha256 "75e3a51c5002ef95b1743a8836fe0a4ea252f1373dab021798f38b24f992eb75"
  license "GPL-3.0-or-later"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "98053aff9f9dd632386babeb8681430f439fb6f485d0153986a1cbf65b1b6692"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "8af10899fcd7343628b6fced5992cefd2739fc9349bb9cd771992d6b89a78da8"
    sha256 cellar: :any_skip_relocation, monterey:       "844d9adca5233e51932c45c5cc039cfca9750289bc5fa2081ece89b0533292ea"
    sha256 cellar: :any_skip_relocation, big_sur:        "6eb67906aee20bcb489e7134eaeadee934837a3628e36a6a7322cd396b974d6a"
    sha256 cellar: :any_skip_relocation, catalina:       "612ed9029e8b954045c516d33acf86d8d4e4bc2e4153e1e2eff604341aaf01e6"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "fc09c1495f3f18106d75afe4144c7845ef1b8c31073a3ba8189fd9ca7c29c8ef"
  end

  depends_on "go" => :build
  depends_on "tor"

  def install
    system "go", "build", *std_go_args, "-ldflags", "-s -w", "./cmd/ooniprobe"
    (var/"ooniprobe").mkpath
  end

  test do
    assert_match version.to_s, shell_output("#{bin}/ooniprobe version")
    # failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB).
    return if OS.linux?

    (testpath/"config.json").write <<~EOS
{'fraction_non_alphanumeric': 0.09047467346288628, 'fraction_numerical': 0.20675374323032814, 'mean_word_length': 5.217821782178218, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '5175364', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1351, 'n_words': 202}