<commit_before>require 'formula'

class NeedsSnowLeopardOrNewer < Requirement
  def satisfied?
    MacOS.snow_leopard?
  end

  def message
    "PhantomJS requires Mac OS X 10.6 (Snow Leopard) or newer."
  end
end

class Phantomjs < Formula
  url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip"
  homepage 'http://www.phantomjs.org/'
  sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64'

  depends_on NeedsSnowLeopardOrNewer.new

  def install
    bin.install "bin/phantomjs"
  end

  def caveats; <<-EOS.undent
    PhantomJS in Homebrew currently does not hide the dock icon.
    For more information see:
    http://code.google.com/p/phantomjs/issues/detail?id=281
    EOS
  end
end
<commit_msg>Wrapper script for phantomjs to hide Dock icon.<commit_after>require 'formula'

class NeedsSnowLeopardOrNewer < Requirement
  def satisfied?
    MacOS.snow_leopard?
  end

  def message
    "PhantomJS requires Mac OS X 10.6 (Snow Leopard) or newer."
  end
end

class Phantomjs < Formula
  url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip"
  homepage 'http://www.phantomjs.org/'
  sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64'

  depends_on NeedsSnowLeopardOrNewer.new

  def script; <<-EOS.undent
    #!/bin/sh
    # phantomjs wrapper script to hide dock icon
    # See http://code.google.com/p/phantomjs/issues/detail?id=281
    exec #{libexec}/phantomjs "$@"
    EOS
  end

  def install
    libexec.install ['bin/phantomjs', 'bin/Info.plist']
    (bin+'phantomjs').write script
  end
end

{'fraction_non_alphanumeric': 0.099935107073329, 'fraction_numerical': 0.048020765736534715, 'mean_word_length': 3.630630630630631, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5859335', 'n_tokens_mistral': 635, 'n_tokens_neox': 552, 'n_words': 127}