<commit_before>require 'formula'

class Googlecl < Formula
  homepage 'https://code.google.com/p/googlecl/'
  url 'https://googlecl.googlecode.com/files/googlecl-0.9.14.tar.gz'
  sha1 '810b2426e2c5e5292e507837ea425e66f4949a1d'

  depends_on :python if MacOS.version <= :snow_leopard

  conflicts_with 'osxutils', :because => 'both install a google binary'

  def install
    ENV["PYTHONPATH"] = lib+"python2.7/site-packages"
    system "python", "setup.py", "install",
      "--prefix=#{prefix}", "--single-version-externally-managed",
      "--record=installed.txt"

    bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
  end

  test do
    system "#{bin}/google", '--version'
  end
end<commit_msg>googlecl: include gdata resource<commit_after>class Googlecl < Formula
  homepage 'https://code.google.com/p/googlecl/'
  url 'https://googlecl.googlecode.com/files/googlecl-0.9.14.tar.gz'
  sha1 '810b2426e2c5e5292e507837ea425e66f4949a1d'

  depends_on :python if MacOS.version <= :snow_leopard

  conflicts_with 'osxutils', :because => 'both install a google binary'

  resource "gdata" do
    url "https://pypi.python.org/packages/source/g/gdata/gdata-2.0.18.tar.gz"
    sha1 "4cd6804f2af81697219307421996c6055c7c16e4"
  end

  def install
    ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
    resource("gdata").stage do
      system "python", *Language::Python.setup_install_args(libexec/"vendor")
    end

    ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
    system "python", *Language::Python.setup_install_args(libexec)

    bin.install Dir[libexec/"bin/*"]
    bin.env_script_all_files(libexec+'bin', :PYTHONPATH => ENV['PYTHONPATH'])
  end

  test do
    system "#{bin}/google", "help", "docs"
  end
end
{'fraction_non_alphanumeric': 0.14531336661120356, 'fraction_numerical': 0.06100942872989462, 'mean_word_length': 4.353115727002967, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 5, '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': '4696008', 'n_tokens_mistral': 730, 'n_tokens_neox': 666, 'n_words': 109}