<commit_before>$: << File.expand_path(File.join(__FILE__, '..', '..', '..', 'lib'))

require 'oculus'
require 'oculus/server'
require 'capybara/cucumber'

Capybara.app = Oculus::Server

Oculus.cache_path = 'tmp/test_cache'
Oculus.connection_options = {
  :host => 'localhost',
  :username => 'root',
  :database => 'test'
}

Before do
  Dir.mkdir('tmp/test_cache')
end

After do
  FileUtils.rm_r('tmp/test_cache')
end<commit_msg>Friendlier cache initializiation in acceptance tests<commit_after>$: << File.expand_path(File.join(__FILE__, '..', '..', '..', 'lib'))

require 'oculus'
require 'oculus/server'
require 'capybara/cucumber'

Capybara.app = Oculus::Server

Oculus.cache_path = 'tmp/test_cache'
Oculus.connection_options = {
  :host => 'localhost',
  :username => 'root',
  :database => 'test'
}

Before do
  FileUtils.mkdir_p('tmp/test_cache')
end

After do
  FileUtils.rm_r('tmp/test_cache')
end
{'fraction_non_alphanumeric': 0.17900552486187846, 'fraction_numerical': 0.0, 'mean_word_length': 5.04, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '4856846', 'n_tokens_mistral': 345, 'n_tokens_neox': 335, 'n_words': 60}