<commit_before>require "active_support/configurable"
require "samfundet_auth/engine"

module SamfundetAuth
  include ActiveSupport::Configurable

  class << self
    def setup
      yield config

      database_path = "#{Rails.root}/config/database.yml"

      if File.exists? database_path
        database_config = YAML.load_file database_path

        if config.domain_database
          [Role, MembersRole].each do |model|
            model.establish_connection database_config[config.domain_database.to_s]
          end
        end

        if config.member_database
          Member.establish_connection database_config[config.member_database.to_s]
        end

        if config.member_table
          Member.set_table_name config.member_table.to_s
        end
      end
    end
  end
end<commit_msg>Removed deprecated call to set_table_name.<commit_after>require "active_support/configurable"
require "samfundet_auth/engine"

module SamfundetAuth
  include ActiveSupport::Configurable

  class << self
    def setup
      yield config

      database_path = "#{Rails.root}/config/database.yml"

      if File.exists? database_path
        database_config = YAML.load_file database_path

        if config.domain_database
          [Role, MembersRole].each do |model|
            model.establish_connection database_config[config.domain_database.to_s]
          end
        end

        if config.member_database
          Member.establish_connection database_config[config.member_database.to_s]
        end

        if config.member_table
          Member.table_name = config.member_table.to_s
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06093845216331505, 'fraction_numerical': 0.0, 'mean_word_length': 2.6407982261640797, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3060504', 'n_tokens_mistral': 470, 'n_tokens_neox': 448, 'n_words': 95}