<commit_before>require 'formula'

class HttpLoad < Formula
  homepage 'http://www.acme.com/software/http_load/'
  url 'http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz'
  version '20060312'
  sha1 'a989253cf32f9ef038dfaa2c254773ea9912137f'

  def install
    bin.mkpath
    man1.mkpath
    args = %W[
      BINDIR=#{bin}
      LIBDIR=#{lib}
      MANDIR=#{man1}
      CC=#{ENV.cc}
      CFLAGS=#{ENV.cflags}
    ]
    system "make", *args
    system "make", "install", *args
  end<commit_msg>http_load 20140814<commit_after>class HttpLoad < Formula
  homepage "http://www.acme.com/software/http_load/"
  url "http://www.acme.com/software/http_load/http_load-14aug2014.tar.gz"
  version "20140814"
  sha256 "538a19cf1a45b1c0ca9be2a5f421b0a3f8d1989c24657d08bc139144b6e14622"

  # HTTPS support
  depends_on "openssl" => :optional

  def install
    bin.mkpath
    man1.mkpath

    args = %W[
      BINDIR=#{bin}
      LIBDIR=#{lib}
      MANDIR=#{man1}
      CC=#{ENV.cc}
    ]

    if build.with? "openssl"
      inreplace "Makefile", "#SSL_", "SSL_"
      args << "SSL_TREE=#{Formula["openssl"].prefix}"
    end

    system "make", "install", *args
  end

  test do
    (testpath/"urls").write "http://brew.sh"
    system "#{bin}/http_load", "-rate", "1", "-fetches", "1", "urls"
  end
{'fraction_non_alphanumeric': 0.15360983102918588, 'fraction_numerical': 0.08755760368663594, 'mean_word_length': 3.189710610932476, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '941175', 'n_tokens_mistral': 593, 'n_tokens_neox': 516, 'n_words': 85}