<commit_before>require 'jdbc/sqlite3' if jruby?

config = {
  :adapter => jruby? ? 'jdbcsqlite3' : 'sqlite3', 
  :dbfile  => 'test.sqlite3.db'
#  :url => 'jdbc:sqlite:test.sqlite3.db',
#  :driver => 'org.sqlite.JDBC'
}

ActiveRecord::Base.establish_connection(config)

at_exit {
  # Clean up sqlite3 db when done
  Dir['test.sqlite3*'].each {|f| File.delete(f)}
}<commit_msg>Add :database key for newer AR versions<commit_after>require 'jdbc/sqlite3' if jruby?

config = {
  :adapter => jruby? ? 'jdbcsqlite3' : 'sqlite3',
  :dbfile  => 'test.sqlite3.db',
  :database  => 'test.sqlite3.db'
#  :url => 'jdbc:sqlite:test.sqlite3.db',
#  :driver => 'org.sqlite.JDBC'
}

ActiveRecord::Base.establish_connection(config)

at_exit {
  # Clean up sqlite3 db when done
  Dir['test.sqlite3*'].each {|f| File.delete(f)}
}
{'fraction_non_alphanumeric': 0.1814814814814815, 'fraction_numerical': 0.018518518518518517, 'mean_word_length': 4.631944444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '2804062', 'n_tokens_mistral': 346, 'n_tokens_neox': 329, 'n_words': 60}