<commit_before>require 'formula'

class Phantomjs < Formula
  homepage 'http://www.phantomjs.org/'
  url 'https://phantomjs.googlecode.com/files/phantomjs-1.9.2-source.zip'
  sha1 '08559acdbbe04e963632bc35e94c1a9a082b6da1'

  bottle do
    cellar :any
    revision 3
    sha1 'eb1a54dc4a5e13f9fe83f83fc82c8b3429ff28eb' => :mavericks
    sha1 'f80e0ff497dafba134a1a29356aa7a4e5192ef6d' => :mountain_lion
    sha1 '07aefd1baff3a3a63e9d6a1385fe9e83f63eedba' => :lion
  end

  def patches
    [
      'https://github.com/ariya/phantomjs/commit/fe6a96.patch',
      'https://github.com/ariya/phantomjs/commit/b67866.patch',
    ]
  end

  def install
    inreplace 'src/qt/preconfig.sh', '-arch x86', '-arch x86_64' if MacOS.prefer_64_bit?
    args = ['--confirm', '--qt-config']
    # we have to disable these to avoid triggering Qt optimization code<commit_msg>phantomjs 1.9.6<commit_after>require 'formula'

class Phantomjs < Formula
  homepage 'http://www.phantomjs.org/'
  url 'https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.6-source.zip'
  sha1 '515844971dc4ffce54241f750ada52f537b34160'

  bottle do
    cellar :any
    revision 3
    sha1 'eb1a54dc4a5e13f9fe83f83fc82c8b3429ff28eb' => :mavericks
    sha1 'f80e0ff497dafba134a1a29356aa7a4e5192ef6d' => :mountain_lion
    sha1 '07aefd1baff3a3a63e9d6a1385fe9e83f63eedba' => :lion
  end

  def patches
    [
      'https://github.com/ariya/phantomjs/commit/fe6a96.patch'
    ]
  end

  def install
    inreplace 'src/qt/preconfig.sh', '-arch x86', '-arch x86_64' if MacOS.prefer_64_bit?
    args = ['--confirm', '--qt-config']
    # we have to disable these to avoid triggering Qt optimization code
{'fraction_non_alphanumeric': 0.11552346570397112, 'fraction_numerical': 0.13237063778580024, 'mean_word_length': 3.80635838150289, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3073899', 'n_tokens_mistral': 798, 'n_tokens_neox': 686, 'n_words': 111}