<commit_before>class Packetbeat < Formula
  desc "Lightweight Shipper for Network Data"
  homepage "https://www.elastic.co/products/beats/packetbeat"
  url "https://github.com/elastic/beats.git",
    tag:      "v7.9.3",
    revision: "7aab6a9659749802201db8020c4f04b74cec2169"
  license "Apache-2.0"
  head "https://github.com/elastic/beats.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "8cc7ffaa87e8e059d2fc56c202cc5844f2bcd05358c1bc16588d70c1c9dec12d" => :catalina
    sha256 "3dc4ac4e4e4e06cccd0f2b4c9264d264b4dca4ebf1377954d8fd294b63938676" => :mojave
    sha256 "e9240b9b19b296a1bcb7f641e76a5661ac39e2ecd64b5d019f61c0940c9fd9d6" => :high_sierra
  end

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

  resource "virtualenv" do
    url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz"
    sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54"
  end

  # Update MarkupSafe to 1.1.1, remove with next release
  # https://github.com/elastic/beats/pull/20105
  patch do
    url "https://github.com/elastic/beats/commit/5a6ca609259956ff5dd8e4ec80b73e6c96ff54b2.patch?full_index=1"
    sha256 "b362f8921611297a0879110efcb88a04cf660d120ad81cd078356d502ba4c2ce"
  end

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

    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/elastic/beats").install buildpath.children

    xy = Language::Python.major_minor_version "python3"
    ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages"

    resource("virtualenv").stage do
      system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor")<commit_msg>packetbeat 7.10.0<commit_after>class Packetbeat < Formula
  desc "Lightweight Shipper for Network Data"
  homepage "https://www.elastic.co/products/beats/packetbeat"
  url "https://github.com/elastic/beats.git",
    tag:      "v7.10.0",
    revision: "1428d58cf2ed945441fb2ed03961cafa9e4ad3eb"
  license "Apache-2.0"
  head "https://github.com/elastic/beats.git"

  bottle do
    cellar :any_skip_relocation
    sha256 "8cc7ffaa87e8e059d2fc56c202cc5844f2bcd05358c1bc16588d70c1c9dec12d" => :catalina
    sha256 "3dc4ac4e4e4e06cccd0f2b4c9264d264b4dca4ebf1377954d8fd294b63938676" => :mojave
    sha256 "e9240b9b19b296a1bcb7f641e76a5661ac39e2ecd64b5d019f61c0940c9fd9d6" => :high_sierra
  end

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

  resource "virtualenv" do
    url "https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz"
    sha256 "1d7e241b431e7afce47e77f8843a276f652699d1fa4f93b9d8ce0076fd7b0b54"
  end

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

    ENV["GOPATH"] = buildpath
    (buildpath/"src/github.com/elastic/beats").install buildpath.children

    xy = Language::Python.major_minor_version "python3"
    ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python#{xy}/site-packages"

    resource("virtualenv").stage do
      system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"vendor")
{'fraction_non_alphanumeric': 0.10865561694290976, 'fraction_numerical': 0.1731123388581952, 'mean_word_length': 5.035185185185185, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 10, 'lorem ipsum': 0, 'www.': 2, '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': '5177085', 'n_tokens_mistral': 1644, 'n_tokens_neox': 1366, 'n_words': 162}