<commit_before>class Ooniprobe < Formula
  desc "Network interference detection tool"
  homepage "https://ooni.org/"
  url "https://github.com/ooni/probe-cli/archive/v3.4.0.tar.gz"
  sha256 "e573cc6496860b75c02d35a1829c220c9c8062350f2178fce208698538bb3ced"
  license "BSD-3-Clause"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "96ec812187f18df0ce2b892275f712495167d5b07441325f3d19ab043c0e3352"
    sha256 cellar: :any_skip_relocation, catalina: "aa5c27c834a0cd256f31536c6c186cf15304e22331774c83da6961c22145473d"
    sha256 cellar: :any_skip_relocation, mojave:   "e8726380e93d3c6df0138fa764da071c10d7ad6add4a59ad19962941930438dc"
  end

  depends_on "go" => :build

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

  test do
    (testpath/"config.json").write <<~EOS
      {
        "_version": 3,
        "_informed_consent": true,
        "sharing": {
          "include_ip": false,
          "include_asn": true,
          "upload_results": false
        },<commit_msg>ooniprobe 3.5.1<commit_after>class Ooniprobe < Formula
  desc "Network interference detection tool"
  homepage "https://ooni.org/"
  url "https://github.com/ooni/probe-cli/archive/v3.5.1.tar.gz"
  sha256 "8278f9318ef939c46169dc44e89bbc03915c660912e66be9c4b20d18d00816fe"
  license "BSD-3-Clause"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "96ec812187f18df0ce2b892275f712495167d5b07441325f3d19ab043c0e3352"
    sha256 cellar: :any_skip_relocation, catalina: "aa5c27c834a0cd256f31536c6c186cf15304e22331774c83da6961c22145473d"
    sha256 cellar: :any_skip_relocation, mojave:   "e8726380e93d3c6df0138fa764da071c10d7ad6add4a59ad19962941930438dc"
  end

  depends_on "go" => :build

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

  test do
    (testpath/"config.json").write <<~EOS
      {
        "_version": 3,
        "_informed_consent": true,
        "sharing": {
          "include_ip": false,
          "include_asn": true,
          "upload_results": false
        },
{'fraction_non_alphanumeric': 0.11380597014925373, 'fraction_numerical': 0.18470149253731344, 'mean_word_length': 3.875, 'pattern_counts': {'":': 12, '<': 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': '7207195', 'n_tokens_mistral': 1089, 'n_tokens_neox': 875, 'n_words': 129}