<commit_before>class Phantomjs < Formula
  desc "Headless WebKit scriptable with a JavaScript API"
  homepage "http://phantomjs.org/"
  head "https://github.com/ariya/phantomjs.git"
  # Temporarily use Vitallium's fork (who is a maintainer) until 2.1.0.
  url "https://github.com/Vitallium/phantomjs.git",
      :tag => "2.0.1",
      :revision => "33aaaff64a197b20076faab1b08b8757516aa976"

  bottle do
    cellar :any
    sha256 "8c1e531d9d6f06a1c8cfd1a8b58de013c67311a63b7ef7527a74c94c96bd1a5b" => :el_capitan
    sha256 "6d70d6aa35b60f8ae26ac7a40c41ab0cb7e70a55b07abac6d236545116b83822" => :yosemite
    sha256 "8712122649fa42ca342fa98a4588dac3402f7038e11540e541e6dc80193cbe82" => :mavericks
  end

  depends_on "openssl"

  def install
    if build.stable?
      system "./build.sh", "--confirm", "--jobs", ENV.make_jobs,
             "--qt-config", "-I #{Formula["openssl"].opt_include} -L #{Formula["openssl"].opt_lib}"
    else
      inreplace "build.py", "/usr/local", HOMEBREW_PREFIX
      system "./build.py", "--confirm", "--jobs", ENV.make_jobs
    end
    bin.install "bin/phantomjs"
    (share/"phantomjs").install "examples"
  end

  test do
    path = testpath/"test.js"
    path.write <<-EOS
      console.log("hello");
      phantom.exit();
    EOS

    assert_equal "hello", shell_output("#{bin}/phantomjs #{path}").strip
  end
end<commit_msg>phantomjs 2.1.0<commit_after>class Phantomjs < Formula
  desc "Headless WebKit scriptable with a JavaScript API"
  homepage "http://phantomjs.org/"
  url "https://github.com/ariya/phantomjs.git",
      :tag => "2.1.0",
      :revision => "292358499e1ac66503a2639a76aeb155aa44ef73"
  head "https://github.com/ariya/phantomjs.git"

  bottle do
    cellar :any
    sha256 "8c1e531d9d6f06a1c8cfd1a8b58de013c67311a63b7ef7527a74c94c96bd1a5b" => :el_capitan
    sha256 "6d70d6aa35b60f8ae26ac7a40c41ab0cb7e70a55b07abac6d236545116b83822" => :yosemite
    sha256 "8712122649fa42ca342fa98a4588dac3402f7038e11540e541e6dc80193cbe82" => :mavericks
  end

  depends_on "openssl"

  def install
    inreplace "build.py", "/usr/local", HOMEBREW_PREFIX
    system "./build.py", "--confirm", "--jobs", ENV.make_jobs
    bin.install "bin/phantomjs"
    pkgshare.install "examples"
  end

  test do
    path = testpath/"test.js"
    path.write <<-EOS
      console.log("hello");
      phantom.exit();
    EOS

    assert_equal "hello", shell_output("#{bin}/phantomjs #{path}").strip
  end
end
{'fraction_non_alphanumeric': 0.1314708299096138, 'fraction_numerical': 0.1343467543138866, 'mean_word_length': 3.755859375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '2599944', 'n_tokens_mistral': 1159, 'n_tokens_neox': 966, 'n_words': 160}