<commit_before>class Auditbeat < Formula
  desc "Lightweight Shipper for Audit Data"
  homepage "https://www.elastic.co/products/beats/auditbeat"
  url "https://github.com/elastic/beats.git",
      tag:      "v7.11.0",
      revision: "84c4d4c4034fcb49c1a318ccdc7311d70adee15b"
  license "Apache-2.0"
  head "https://github.com/elastic/beats.git"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "5e35895e6083afdff03189369f0ea243cf47657562880c57384ea05e08054d60"
    sha256 cellar: :any_skip_relocation, catalina: "8485611811efc43560120e88353f87bb2ca61ba9553e40950669f444439db3c3"
    sha256 cellar: :any_skip_relocation, mojave:   "4d26ade970d0301b60bdef1077f1ea06b3f520ea8e90dad2021d45136dcf5450"
  end

  depends_on "go" => :build
  depends_on "python@3.9" => :build

  def install
    # remove non open source files
    rm_rf "x-pack"

    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/elastic/beats").install buildpath.children
    ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool)

    cd "src/github.com/elastic/beats/auditbeat" do
      # don't build docs because it would fail creating the combined OSS/x-pack
      # docs and we aren't installing them anyway
      inreplace "magefile.go", "devtools.GenerateModuleIncludeListGo, Docs)",
                               "devtools.GenerateModuleIncludeListGo)"

      system "make", "mage"
      # prevent downloading binary wheels during python setup
      system "make", "PIP_INSTALL_PARAMS=--no-binary :all", "python-env"
      system "mage", "-v", "build"
      system "mage", "-v", "update"

      (etc/"auditbeat").install Dir["auditbeat.*", "fields.yml"]
      (libexec/"bin").install "auditbeat"
      prefix.install "build/kibana"
    end<commit_msg>auditbeat: update 7.11.0 bottle.<commit_after>class Auditbeat < Formula
  desc "Lightweight Shipper for Audit Data"
  homepage "https://www.elastic.co/products/beats/auditbeat"
  url "https://github.com/elastic/beats.git",
      tag:      "v7.11.0",
      revision: "84c4d4c4034fcb49c1a318ccdc7311d70adee15b"
  license "Apache-2.0"
  head "https://github.com/elastic/beats.git"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "b86ad7ac522accf36b213eb61c96dfefb92292bf1eb43d46dfdd379dd38a6089"
    sha256 cellar: :any_skip_relocation, catalina: "81c853b2fb1a56f085b1b27d8b7ebf93df591310a6882e725696fff788d53e03"
    sha256 cellar: :any_skip_relocation, mojave:   "9c331a0ed4d70c5cf5df3c0a9f511bb373d9eeea26cab46d1ae3bfd5f184e4f1"
  end

  depends_on "go" => :build
  depends_on "python@3.9" => :build

  def install
    # remove non open source files
    rm_rf "x-pack"

    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/elastic/beats").install buildpath.children
    ENV.prepend_path "PATH", buildpath/"bin" # for mage (build tool)

    cd "src/github.com/elastic/beats/auditbeat" do
      # don't build docs because it would fail creating the combined OSS/x-pack
      # docs and we aren't installing them anyway
      inreplace "magefile.go", "devtools.GenerateModuleIncludeListGo, Docs)",
                               "devtools.GenerateModuleIncludeListGo)"

      system "make", "mage"
      # prevent downloading binary wheels during python setup
      system "make", "PIP_INSTALL_PARAMS=--no-binary :all", "python-env"
      system "mage", "-v", "build"
      system "mage", "-v", "update"

      (etc/"auditbeat").install Dir["auditbeat.*", "fields.yml"]
      (libexec/"bin").install "auditbeat"
      prefix.install "build/kibana"
    end
{'fraction_non_alphanumeric': 0.11491650155675064, 'fraction_numerical': 0.09170676478913105, 'mean_word_length': 3.7057256990679095, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '310660', 'n_tokens_mistral': 1483, 'n_tokens_neox': 1279, 'n_words': 246}