<commit_before>require 'rails'

module Isimud
  class Railtie < Rails::Railtie
    initializer 'isimud.configure' do |app|
      
    end
  end
end<commit_msg>Configure using config/isimud.yml in railtie.<commit_after>require 'rails'

module Isimud
  class Railtie < Rails::Railtie
    initializer 'isimud.configure' do |app|
      require 'erb'
      configs = YAML::load(ERB.new(IO.read(Rails.root.join('config/isimud.yml'))).result).stringify_keys
      config = configs[Rails.env].stringify_keys
      app.config.isimud = case config['client']
      when 'bunny'
        Isimud::BunnyClient.new(config['broker_url'])
      when 'test'
        Isimud::TestClient.new
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.11461318051575932, 'fraction_numerical': 0.0, 'mean_word_length': 3.2883435582822087, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2091745', 'n_tokens_mistral': 256, 'n_tokens_neox': 240, 'n_words': 47}