<commit_before>ENV['RACK_ENV'] = 'test'

require 'minitest/autorun'
require 'rack/test'

Oriental::Connection.connect(host: 'localhost', port: 2424, db: 'GratefulDeadConcerts', db_user: "admin", db_password: "<PASSWORD>", storage: "plocal")

class OUser < Struct.new(:parameters)
end<commit_msg>improve connection to test database<commit_after>ENV['RACK_ENV'] = 'test'

require 'minitest/autorun'
require 'rack/test'

module TestHelper
  SERVER        = { host: 'localhost', port: 2424 }
  SERVER_USER   = { user: 'root', password: '<PASSWORD>' }

  TEST_DB       = { db: 'oriental-test', storage: "memory" }
  TEST_DB_USER  = { user: 'admin', password: '<PASSWORD>' }
end

server = OrientdbBinary::Server.new(TestHelper::SERVER)
server.connect(TestHelper::SERVER_USER)

if server.db_exists? TestHelper::TEST_DB[:db]
  server.db_drop TestHelper::TEST_DB[:db], TestHelper::TEST_DB[:storage]
end
server.db_create(TestHelper::TEST_DB[:db], 'document', TestHelper::TEST_DB[:storage])
server.disconnect
Oriental::Connection.connect(host: 'localhost', port: 2424, db: 'oriental-test', db_user: "admin", db_password: "<PASSWORD>", storage: "memory")
  

class OUser < Struct.new(:parameters)
end
{'fraction_non_alphanumeric': 0.16161616161616163, 'fraction_numerical': 0.010101010101010102, 'mean_word_length': 6.670967741935484, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4697447', 'n_tokens_mistral': 419, 'n_tokens_neox': 403, 'n_words': 84}