<commit_before>class DockerLs < Formula
  desc "Tools for browsing and manipulating docker registries"
  homepage "https://github.com/mayflower/docker-ls"
  url "https://github.com/mayflower/docker-ls.git",
    :tag => "v0.3.1",
    :revision => "d80310976c9707e261e57ebfa9acf4e0b1781460"

  bottle do
    cellar :any_skip_relocation
    sha256 "946e27ec3c35ec19d98c1a8efdf59a809db23926f97d3cd98b195d15c28491cd" => :high_sierra
    sha256 "1815a65eab86116dfc1de21331352348d59f391cdbc2ed1454a1847f62b21845" => :sierra
    sha256 "d011c19d2e36dd798ffa5723448cfeb1d95c25b7e78ad4b64207f4c79c5be383" => :el_capitan
  end

  depends_on "go" => :build

  def install
    ENV["GOPATH"] = buildpath

    (buildpath/"src/github.com/mayflower/docker-ls").install buildpath.children

    system "go", "generate", "github.com/mayflower/docker-ls/lib"

    cd "src/github.com/mayflower/docker-ls" do
      system "go", "build", "-o", bin/"docker-ls", "./cli/docker-ls"
      system "go", "build", "-o", bin/"docker-rm", "./cli/docker-rm"
      prefix.install_metafiles
    end
  end

  test do
    assert_match /\Wlatest\W/m, pipe_output("#{bin}/docker-ls tags \
      -r https://index.docker.io -u '' -p '' \
      --progress-indicator=false library/busybox \
    ")

    assert_match /401/, pipe_output("#{bin}/docker-rm  \<commit_msg>docker-ls: update 0.3.1 bottle for Linuxbrew.<commit_after>class DockerLs < Formula
  desc "Tools for browsing and manipulating docker registries"
  homepage "https://github.com/mayflower/docker-ls"
  url "https://github.com/mayflower/docker-ls.git",
    :tag => "v0.3.1",
    :revision => "d80310976c9707e261e57ebfa9acf4e0b1781460"

  bottle do
    cellar :any_skip_relocation
    sha256 "946e27ec3c35ec19d98c1a8efdf59a809db23926f97d3cd98b195d15c28491cd" => :high_sierra
    sha256 "1815a65eab86116dfc1de21331352348d59f391cdbc2ed1454a1847f62b21845" => :sierra
    sha256 "d011c19d2e36dd798ffa5723448cfeb1d95c25b7e78ad4b64207f4c79c5be383" => :el_capitan
    sha256 "3fd62c952adeafdfde327184a6a2dc19b129b3c7b358be64a554ea99b95020c9" => :x86_64_linux
  end

  depends_on "go" => :build

  def install
    ENV["GOPATH"] = buildpath

    (buildpath/"src/github.com/mayflower/docker-ls").install buildpath.children

    system "go", "generate", "github.com/mayflower/docker-ls/lib"

    cd "src/github.com/mayflower/docker-ls" do
      system "go", "build", "-o", bin/"docker-ls", "./cli/docker-ls"
      system "go", "build", "-o", bin/"docker-rm", "./cli/docker-rm"
      prefix.install_metafiles
    end
  end

  test do
    assert_match /\Wlatest\W/m, pipe_output("#{bin}/docker-ls tags \
      -r https://index.docker.io -u '' -p '' \
      --progress-indicator=false library/busybox \
    ")

    assert_match /401/, pipe_output("#{bin}/docker-rm  \
{'fraction_non_alphanumeric': 0.13703570140641905, 'fraction_numerical': 0.13523260007212407, 'mean_word_length': 3.8159722222222223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, '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': '6570852', 'n_tokens_mistral': 1343, 'n_tokens_neox': 1092, 'n_words': 166}