<commit_before># Generated by cucumber-sinatra. (2013-12-03 12:11:29 +0000)

require 'coveralls'
Coveralls.wear_merged!

require 'dotenv'
Dotenv.load

ENV['RACK_ENV'] = 'test'
ENV['METRICS_API_USERNAME'] = 'foo'
ENV['METRICS_API_PASSWORD'] = '<PASSWORD>'

require File.join(File.dirname(__FILE__), '..', '..', 'lib/bothan.rb')

require 'capybara'
require 'capybara/cucumber'
require 'rspec'
require 'cucumber/api_steps'
require 'cucumber/rspec/doubles'
require 'database_cleaner'
require 'database_cleaner/cucumber'
require 'timecop'
require 'launchy'

DatabaseCleaner.strategy = :truncation

Capybara.app = Bothan::App

class Bothan::AppWorld
  include Capybara::DSL
  include RSpec::Expectations
  include RSpec::Matchers

  def app
    Bothan::App
  end
end

World do
  Bothan::AppWorld.new
end<commit_msg>Configure env to use capybara-webkit<commit_after># Generated by cucumber-sinatra. (2013-12-03 12:11:29 +0000)

require 'coveralls'
Coveralls.wear_merged!

require 'dotenv'
Dotenv.load

ENV['RACK_ENV'] = 'test'
ENV['METRICS_API_USERNAME'] = 'foo'
ENV['METRICS_API_PASSWORD'] = '<PASSWORD>'

require File.join(File.dirname(__FILE__), '..', '..', 'lib/bothan.rb')

require 'capybara'
require 'capybara/cucumber'
require 'capybara-webkit'
require 'rspec'
require 'cucumber/api_steps'
require 'cucumber/rspec/doubles'
require 'database_cleaner'
require 'database_cleaner/cucumber'
require 'timecop'
require 'launchy'
require 'byebug'

DatabaseCleaner.strategy = :truncation

Capybara.javascript_driver = :webkit # not sure why this isn't enabled, doesnt impede existing features
Capybara::Webkit.configure do |config|
  config.allow_url("0.0.0.0")
end

Capybara.app = Bothan::App
Capybara.app_host = "http://0.0.0.0:3000"
Capybara.server_port = 3000

class Bothan::AppWorld
  include Capybara::DSL
  include RSpec::Expectations
  include RSpec::Matchers

  def app
    Bothan::App
  end
end

World do
  Bothan::AppWorld.new
end
{'fraction_non_alphanumeric': 0.13043478260869565, 'fraction_numerical': 0.026915113871635612, 'mean_word_length': 5.8546099290780145, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7623721', 'n_tokens_mistral': 766, 'n_tokens_neox': 714, 'n_words': 150}