<commit_before>require "formula"

class Docker < Formula
  homepage "http://docker.io"
  url "https://github.com/dotcloud/docker.git", :tag => "v0.8.0"
  sha1 "1e9362dab2ac2ecb4a1f193a7e72d060000438c3"

  option "without-completions", "Disable bash/zsh completions"

  bottle do
    revision 2
    sha1 "6656fe911e1db382fbe704dbe9e0e68272f0ee01" => :mavericks
    sha1 "d73586890467d00728db185cf0550479e4b94628" => :mountain_lion
    sha1 "bd6595664d5384c4e1584864d96d409d475016ce" => :lion
  end

  def patches
    [
      "https://github.com/dotcloud/docker/commit/6174ba.patch",
      "https://github.com/dotcloud/docker/commit/f794fb.patch",
    ]
  end

  depends_on "go" => :build

  def install
    ENV["GIT_DIR"] = downloader.cached_location/".git"
    ENV["AUTO_GOPATH"] = "1"
    inreplace "hack/make/dynbinary", "sha1sum", "shasum"

    system "hack/make.sh", "dynbinary"
    bin.install "bundles/0.8.0/dynbinary/docker-0.8.0" => "docker"

    if build.with? "completions"
      bash_completion.install "contrib/completion/bash/docker"
      zsh_completion.install "contrib/completion/zsh/_docker"
    end
  end

  test do
    system "#{bin}/docker", "--version"
  end
end<commit_msg>docker: replace inreplace with upstream patch.<commit_after>require "formula"

class Docker < Formula
  homepage "http://docker.io"
  url "https://github.com/dotcloud/docker.git", :tag => "v0.8.0"
  sha1 "1e9362dab2ac2ecb4a1f193a7e72d060000438c3"

  option "without-completions", "Disable bash/zsh completions"

  bottle do
    revision 2
    sha1 "6656fe911e1db382fbe704dbe9e0e68272f0ee01" => :mavericks
    sha1 "d73586890467d00728db185cf0550479e4b94628" => :mountain_lion
    sha1 "bd6595664d5384c4e1584864d96d409d475016ce" => :lion
  end

  def patches
    [
      "https://github.com/dotcloud/docker/commit/6174ba.patch",
      "https://github.com/dotcloud/docker/commit/f794fb.patch",
      "https://github.com/dotcloud/docker/commit/32535e.patch",
    ]
  end

  depends_on "go" => :build

  def install
    ENV["GIT_DIR"] = downloader.cached_location/".git"
    ENV["AUTO_GOPATH"] = "1"

    system "hack/make.sh", "dynbinary"
    bin.install "bundles/0.8.0/dynbinary/docker-0.8.0" => "docker"

    if build.with? "completions"
      bash_completion.install "contrib/completion/bash/docker"
      zsh_completion.install "contrib/completion/zsh/_docker"
    end
  end

  test do
    system "#{bin}/docker", "--version"
  end
end
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.11193415637860082, 'mean_word_length': 3.675, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, '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': '6565478', 'n_tokens_mistral': 1123, 'n_tokens_neox': 938, 'n_words': 145}