<commit_before>class Pup < Formula
  desc "Parse HTML at the command-line"
  homepage "https://github.com/EricChiang/pup"
  url "https://github.com/ericchiang/pup/archive/v0.4.0.tar.gz"
  sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0"
  license "MIT"
  head "https://github.com/EricChiang/pup.git"

  bottle do
    rebuild 1
    sha256 cellar: :any_skip_relocation, big_sur:     "adf4c73c13c8066e9aa9c9acae07a6d4f84965dff901919a2f718ef898d1bcb7"
    sha256 cellar: :any_skip_relocation, catalina:    "b543d371442c8a14f8113396523d65f1775f4b61ca55d4b61b859c180eb20777"
    sha256 cellar: :any_skip_relocation, mojave:      "baeef002d46ed4c9872242419ed991b9d9f26d8e5b296f54b2ffb9e1e6bcfc84"
    sha256 cellar: :any_skip_relocation, high_sierra: "f470de75187b994ef9612c5404dc7622a356c8ee6af21f6b2549b5d7c5d88d32"
    sha256 cellar: :any_skip_relocation, sierra:      "4ba84cffa7cfd01bd252223055abdf5fd8b6cfc27474131cf313e688ea8eeecf"
    sha256 cellar: :any_skip_relocation, el_capitan:  "a1aa49640871c127c76f4aea6db65487db964a055e2aa4d86ee2d8b7f5dcb561"
  end

  depends_on "go" => :build
  depends_on "gox" => :build

  def install
    ENV["GOPATH"] = buildpath
    dir = buildpath/"src/github.com/ericchiang/pup"
    dir.install buildpath.children

    cd dir do
      system "gox", "-arch", "amd64", "-os", "darwin", "./..."
      bin.install "pup_darwin_amd64" => "pup"
    end

    prefix.install_metafiles dir
  end

  test do
    output = pipe_output("#{bin}/pup p text{}", "<body><p>Hello</p></body>", 0)
    assert_equal "Hello", output.chomp
  end
end
<commit_msg>pup: Set GO111MODULE=auto for Go 1.16 (#71683)<commit_after>class Pup < Formula
  desc "Parse HTML at the command-line"
  homepage "https://github.com/EricChiang/pup"
  url "https://github.com/ericchiang/pup/archive/v0.4.0.tar.gz"
  sha256 "0d546ab78588e07e1601007772d83795495aa329b19bd1c3cde589ddb1c538b0"
  license "MIT"
  head "https://github.com/EricChiang/pup.git"

  bottle do
    rebuild 1
    sha256 cellar: :any_skip_relocation, big_sur:     "adf4c73c13c8066e9aa9c9acae07a6d4f84965dff901919a2f718ef898d1bcb7"
    sha256 cellar: :any_skip_relocation, catalina:    "b543d371442c8a14f8113396523d65f1775f4b61ca55d4b61b859c180eb20777"
    sha256 cellar: :any_skip_relocation, mojave:      "baeef002d46ed4c9872242419ed991b9d9f26d8e5b296f54b2ffb9e1e6bcfc84"
    sha256 cellar: :any_skip_relocation, high_sierra: "f470de75187b994ef9612c5404dc7622a356c8ee6af21f6b2549b5d7c5d88d32"
    sha256 cellar: :any_skip_relocation, sierra:      "4ba84cffa7cfd01bd252223055abdf5fd8b6cfc27474131cf313e688ea8eeecf"
    sha256 cellar: :any_skip_relocation, el_capitan:  "a1aa49640871c127c76f4aea6db65487db964a055e2aa4d86ee2d8b7f5dcb561"
  end

  depends_on "go" => :build
  depends_on "gox" => :build

  def install
    ENV["GOPATH"] = buildpath
    ENV["GO111MODULE"] = "auto"
    dir = buildpath/"src/github.com/ericchiang/pup"
    dir.install buildpath.children

    cd dir do
      system "gox", "-arch", "amd64", "-os", "darwin", "./..."
      bin.install "pup_darwin_amd64" => "pup"
    end

    prefix.install_metafiles dir
  end

  test do
    output = pipe_output("#{bin}/pup p text{}", "<body><p>Hello</p></body>", 0)
    assert_equal "Hello", output.chomp
  end
end

{'fraction_non_alphanumeric': 0.10456915056731064, 'fraction_numerical': 0.19196565470714505, 'mean_word_length': 4.835420393559929, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 6, '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': '5542779', 'n_tokens_mistral': 1767, 'n_tokens_neox': 1428, 'n_words': 202}