<commit_before>if __FILE__ == $0

  SSL_KEY = 'spec/fixtures/certificates/key.pem'
  SSL_CERT = 'spec/fixtures/certificates/cert.pem'

  trap(:INT) do
    @server.shutdown
    exit
  end

  def webrick_opts port
    certificate = OpenSSL::X509::Certificate.new(File.read(SSL_CERT))
    cert_name = certificate.subject.to_a.collect{|a| a[0..1] }
    {
      Port: port,
      Host: "0.0.0.0",
      AccessLog: [],
      SSLCertificate: certificate,
      SSLPrivateKey: OpenSSL::PKey::RSA.new(File.read(SSL_KEY)),
      SSLEnable: true,
      SSLCertName: cert_name
    }
  end

  app = ->(env) { puts "hello"; [200, {}, ['Hello world' + "\n"]] }

  require 'webrick'
  require 'webrick/https'<commit_msg>chore: remove webrick logs from test output<commit_after>if __FILE__ == $0

  SSL_KEY = 'spec/fixtures/certificates/key.pem'
  SSL_CERT = 'spec/fixtures/certificates/cert.pem'

  trap(:INT) do
    @server.shutdown
    exit
  end

  def webrick_opts port
    certificate = OpenSSL::X509::Certificate.new(File.read(SSL_CERT))
    cert_name = certificate.subject.to_a.collect{|a| a[0..1] }
    logger_stream = ENV['DEBUG'] ? $stderr : StringIO.new
    {
      Port: port,
      Host: "0.0.0.0",
      AccessLog: [],
      Logger: WEBrick::Log.new(logger_stream,WEBrick::Log::INFO),
      SSLCertificate: certificate,
      SSLPrivateKey: OpenSSL::PKey::RSA.new(File.read(SSL_KEY)),
      SSLEnable: true,
      SSLCertName: cert_name
    }
  end

  app = ->(env) { puts "hello"; [200, {}, ['Hello world' + "\n"]] }

  require 'webrick'
  require 'webrick/https'
{'fraction_non_alphanumeric': 0.15364916773367476, 'fraction_numerical': 0.016645326504481434, 'mean_word_length': 3.2016129032258065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1667816', 'n_tokens_mistral': 598, 'n_tokens_neox': 580, 'n_words': 103}