<commit_before>if defined?(Merb::Plugins)
  require 'rubygems'

  gem 'dm-core', '=0.9.3'
  require 'dm-core'

  if File.file?(Merb.root / "config" / "database.yml")
    require File.join(File.dirname(__FILE__) / "merb" / "orms" / "data_mapper" / "connection")

    Merb::Orms::DataMapper.connect
    Merb::Orms::DataMapper.register_session_type
  else
    Merb.logger.info "No database.yml file found in #{Merb.root}/config, assuming database connection(s) established in the environment file in #{Merb.root}/config/environments"
  end
<commit_msg>merb_datamapper now checks for database.yml in Merb.dir_for(:config)<commit_after>if defined?(Merb::Plugins)
  require 'rubygems'

  gem 'dm-core', '=0.9.3'
  require 'dm-core'

  if File.file?(Merb.dir_for(:config) / "database.yml")
    require File.join(File.dirname(__FILE__) / "merb" / "orms" / "data_mapper" / "connection")

    Merb::Orms::DataMapper.connect
    Merb::Orms::DataMapper.register_session_type
  else
    Merb.logger.info "No database.yml file found in #{Merb.root}/config, assuming database connection(s) established in the environment file in #{Merb.root}/config/environments"
  end

{'fraction_non_alphanumeric': 0.14471403812824957, 'fraction_numerical': 0.005199306759098787, 'mean_word_length': 4.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2218456', 'n_tokens_mistral': 407, 'n_tokens_neox': 395, 'n_words': 85}