<commit_before>$:.unshift(File.dirname(__FILE__))
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

require "mongo_browser"

require "rspec"
require "capybara"
require "capybara/rspec"
require "socket"

require "simplecov"
SimpleCov.start

def find_available_port
  server = TCPServer.new("127.0.0.1", 0)
  server.addr[1]
ensure
  server.close if server
end

MongoBrowser.mongodb_host = "localhost"
MongoBrowser.mongodb_port = find_available_port

Capybara.app = MongoBrowser::Application

require "support/mongod"

RSpec.configure do |config|
  config.before do
    Mongod.start_server
    Mongod.load_fixtures
  end
end

at_exit do
  Mongod.clean_up
end
<commit_msg>Require debugger in spec_helper.rb<commit_after>$:.unshift(File.dirname(__FILE__))
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))

require "mongo_browser"

require "debugger"
require "rspec"
require "capybara"
require "capybara/rspec"
require "socket"

require "simplecov"
SimpleCov.start

def find_available_port
  server = TCPServer.new("127.0.0.1", 0)
  server.addr[1]
ensure
  server.close if server
end

MongoBrowser.mongodb_host = "localhost"
MongoBrowser.mongodb_port = find_available_port

Capybara.app = MongoBrowser::Application

require "support/mongod"

RSpec.configure do |config|
  config.before do
    Mongod.start_server
    Mongod.load_fixtures
  end
end

at_exit do
  Mongod.clean_up
end

{'fraction_non_alphanumeric': 0.11389684813753581, 'fraction_numerical': 0.011461318051575931, 'mean_word_length': 5.378995433789954, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1314021', 'n_tokens_mistral': 517, 'n_tokens_neox': 510, 'n_words': 101}