<commit_before>module Firebolt
  class Railtie < Rails::Railtie
    config.firebolt = ::ActiveSupport::OrderedOptions.new

    initializer "firebolt.rails.configuration" do |app|
      # Configure Firebolt
      ::Firebolt.configure do |config|
        app.config.firebolt.each do |config_key, config_value|
          config_setter = "#{config_key}="
          config.__send__(config_setter, config_value) if config.respond_to?(config_setter)
        end

        # Set defaults based on Rails
        config.cache ||= ::Rails.cache
        config.cache_file_path ||= ::File.join(::Rails.root, 'tmp')
      end
    end

    # Load Firebolt Rake tasks
    rake_tasks do
      # load 'firebolt/tasks/cache.rake'
      load ::File.join('firebolt', 'tasks', 'cache.rake')<commit_msg>Set the defaults before grabbing the user config.<commit_after>module Firebolt
  class Railtie < Rails::Railtie
    config.firebolt = ::ActiveSupport::OrderedOptions.new

    initializer "firebolt.rails.configuration" do |app|
      # Configure Firebolt
      ::Firebolt.configure do |config|
        # Set defaults based on Rails
        config.cache = ::Rails.cache
        config.cache_file_path = ::File.join(::Rails.root, 'tmp')

        app.config.firebolt.each do |config_key, config_value|
          config_setter = "#{config_key}="
          config.__send__(config_setter, config_value) if config.respond_to?(config_setter)
        end
      end
    end

    # Load Firebolt Rake tasks
    rake_tasks do
      # load 'firebolt/tasks/cache.rake'
      load ::File.join('firebolt', 'tasks', 'cache.rake')
{'fraction_non_alphanumeric': 0.11132075471698114, 'fraction_numerical': 0.0, 'mean_word_length': 3.0075566750629723, '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': '885980', 'n_tokens_mistral': 513, 'n_tokens_neox': 475, 'n_words': 108}