<commit_before>class AwesomeTranslations::Handlers
  @handlers = []

  Dir.foreach("#{File.dirname(__FILE__)}/handlers") do |file|
    match = file.match(/\A(.+)_handler\.rb\Z/)
    next unless match

    const_name_snake = "#{match[1]}_handler"
    const_name_camel = StringCases.snake_to_camel(const_name_snake)

    autoload const_name_camel.to_sym, "#{File.dirname(__FILE__)}/handlers/#{const_name_snake}"

    unless const_name_snake == "base_handler"
      handler = AwesomeTranslations::Handler.new(
        id: const_name_snake,
        const_name: const_name_camel,
        name: const_name_camel
      )

      @handlers << handler if handler.instance.enabled?
    end
  end

  def self.list<commit_msg>First sort handlers after base handler has been autoloaded<commit_after>class AwesomeTranslations::Handlers
  @handlers = []

  Dir.foreach("#{File.dirname(__FILE__)}/handlers") do |file|
    match = file.match(/\A(.+)_handler\.rb\Z/)
    next unless match

    const_name_snake = "#{match[1]}_handler"
    const_name_camel = StringCases.snake_to_camel(const_name_snake)

    autoload const_name_camel.to_sym, "#{File.dirname(__FILE__)}/handlers/#{const_name_snake}"

    unless const_name_snake == "base_handler"
      @handlers << AwesomeTranslations::Handler.new(
        id: const_name_snake,
        const_name: const_name_camel,
        name: const_name_camel
      )
    end
  end

  @handlers = @handlers.select { |handler| handler.instance.enabled? }

  def self.list
{'fraction_non_alphanumeric': 0.12021490933512424, 'fraction_numerical': 0.001343183344526528, 'mean_word_length': 3.869281045751634, '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': '6629126', 'n_tokens_mistral': 529, 'n_tokens_neox': 507, 'n_words': 81}