<commit_before># frozen_string_literal: true

require "dry/system/container"
require "dry/system/loader/autoloading"
require "hanami/configuration"
require "pathname"
require "rack"
require "zeitwerk"
require_relative "slice"

module Hanami
  # Hanami application class
  #
  # @since 2.0.0
  class Application
    @_mutex = Mutex.new

    class << self
      def inherited(klass)
        @_mutex.synchronize do
          klass.class_eval do
            @_mutex         = Mutex.new
            @_configuration = Hanami::Configuration.new(application_name: name, env: Hanami.env)

            extend ClassMethods
          end

          klass.send :prepare_base_load_path

          Hanami.application = klass
        end
      end
    end

    # Application class interface<commit_msg>Call super in Application's inherited hook<commit_after># frozen_string_literal: true

require "dry/system/container"
require "dry/system/loader/autoloading"
require "hanami/configuration"
require "pathname"
require "rack"
require "zeitwerk"
require_relative "slice"

module Hanami
  # Hanami application class
  #
  # @since 2.0.0
  class Application
    @_mutex = Mutex.new

    class << self
      def inherited(klass)
        super
        @_mutex.synchronize do
          klass.class_eval do
            @_mutex         = Mutex.new
            @_configuration = Hanami::Configuration.new(application_name: name, env: Hanami.env)

            extend ClassMethods
          end

          klass.send :prepare_base_load_path

          Hanami.application = klass
        end
      end
    end

    # Application class interface
{'fraction_non_alphanumeric': 0.07492260061919505, 'fraction_numerical': 0.0037151702786377707, 'mean_word_length': 2.5054229934924077, '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': '5492517', 'n_tokens_mistral': 473, 'n_tokens_neox': 463, 'n_words': 117}