<commit_before>require 'capybara/poltergeist'
# static.preview SSL certificate is causing errors in Cucumber tests, # so we're ignoring SSL errors for now.
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, { phantomjs_options: ['--ignore-ssl-errors=yes']})
end
Capybara.javascript_driver = :poltergeist

require "slimmer/test"

Before('@javascript') do
  ENV["USE_SLIMMER"] = "true"
end

After('@javascript') do
  ENV.delete("USE_SLIMMER")
end
<commit_msg>Fix SSL issue with phantomjs loading assets.<commit_after>require 'capybara/poltergeist'
# static.preview SSL certificate is causing errors in Cucumber tests, # so we're ignoring SSL errors for now.
Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, { phantomjs_options: ['--ssl-protocol=TLSv1', '--ignore-ssl-errors=yes']})
end
Capybara.javascript_driver = :poltergeist

require "slimmer/test"

Before('@javascript') do
  ENV["USE_SLIMMER"] = "true"
end

After('@javascript') do
  ENV.delete("USE_SLIMMER")
end

{'fraction_non_alphanumeric': 0.13039309683604985, 'fraction_numerical': 0.0009587727708533077, 'mean_word_length': 6.352112676056338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '642357', 'n_tokens_mistral': 370, 'n_tokens_neox': 355, 'n_words': 85}