<commit_before>require "formula"
# Credit to https://github.com/Homebrew/homebrew/pull/17675/files

class Depot < Formula
  homepage 'http://dev.chromium.org/developers/how-tos/install-depot-tools'
  url 'https://chromium.googlesource.com/chromium/tools/depot_tools.git', :branch => 'master'
  version 'master'

  depends_on 'repo'

  def install
    dst = prefix/'tools'
    dst.mkpath unless dst.directory?
    mv Dir.glob('*'), dst
        %w[gclient gcl git-cl hammer drover cpplint.py presubmit_support.py
      trychange.py git-try wtf weekly git-gs zsh-goodies].each do |tool|
                (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL=#{prefix}/tools/#{tool}
        export DEPOT_TOOLS_UPDATE=0
        export PATH="$PATH:#{prefix}/tools"
        exec "$TOOL" "$@"
      EOS
        end
  end

  test do
    %w[gclient presubmit_support.py trychange.py].each do |tool|
      system "#{bin}/#{tool} --version"
    end
  end
end<commit_msg>Back to original<commit_after># Credit to https://github.com/Homebrew/homebrew/pull/17675/files
require 'formula'

class DepotTools < Formula
  homepage 'http://dev.chromium.org/developers/how-tos/depottools'
  url 'https://chromium.googlesource.com/chromium/tools/depot_tools.git',
      :branch => 'master'
  version 'master'

  depends_on 'repo'

  # We're linking these tools with auto-update disabled. It's bad enough that
  # all we know is that we're at the HEAD of the master branch, since the
  # Chromium team isn't nice enough to tag releases for us.
  def install
    dst = prefix/'tools'
    dst.mkpath unless dst.directory?
    mv Dir.glob('*'), dst
        %w[gclient gcl git-cl hammer drover cpplint.py presubmit_support.py
      trychange.py git-try wtf weekly git-gs zsh-goodies].each do |tool|
                (bin/tool).write <<-EOS.undent
        #!/bin/bash
        TOOL=#{prefix}/tools/#{tool}
        export DEPOT_TOOLS_UPDATE=0
        export PATH="$PATH:#{prefix}/tools"
        exec "$TOOL" "$@"
      EOS
        end
  end

  def test
    %w[gclient presubmit_support.py trychange.py].each do |tool|
      system "#{bin}/#{tool} --version"
    end
  end
end
{'fraction_non_alphanumeric': 0.12871747211895912, 'fraction_numerical': 0.0055762081784386614, 'mean_word_length': 2.797178130511464, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '2901393', 'n_tokens_mistral': 757, 'n_tokens_neox': 719, 'n_words': 176}