<commit_before>module EffectiveRoles
  class Engine < ::Rails::Engine
    engine_name 'effective_roles'

    config.autoload_paths += Dir["#{config.root}/app/models/concerns", "#{config.root}/lib/"]

    # Include acts_as_addressable concern and allow any ActiveRecord object to call it
    initializer 'effective_roles.active_record' do |app|
      ActiveSupport.on_load :active_record do
        ActiveRecord::Base.extend(ActsAsRoleRestricted::Base)
      end
    end

    # Register the log_page_views concern so that it can be called in ActionController or elsewhere
    initializer 'effective_logging.log_changes_action_controller' do |app|
      Rails.application.config.to_prepare do
        ActiveSupport.on_load :action_controller do
          require 'effective_roles/set_current_user'
          ActionController::Base.include(EffectiveRoles::SetCurrentUser::ActionController)
        end
      end
    end

    # Set up our default configuration options.
    initializer "effective_roles.defaults", :before => :load_config_initializers do |app|
      eval File.read("#{config.root}/config/effective_roles.rb")
    end
<commit_msg>zeitwerk fix<commit_after>require 'effective_roles/set_current_user'

module EffectiveRoles
  class Engine < ::Rails::Engine
    engine_name 'effective_roles'

    # Include acts_as_addressable concern and allow any ActiveRecord object to call it
    initializer 'effective_roles.active_record' do |app|
      ActiveSupport.on_load :active_record do
        ActiveRecord::Base.extend(ActsAsRoleRestricted::Base)
      end
    end

    # Register the log_page_views concern so that it can be called in ActionController or elsewhere
    initializer 'effective_logging.log_changes_action_controller' do |app|
      Rails.application.config.to_prepare do
        ActiveSupport.on_load :action_controller do
          require 'effective_roles/set_current_user'
          ActionController::Base.include(EffectiveRoles::SetCurrentUser::ActionController)
        end
      end
    end

    # Set up our default configuration options.
    initializer "effective_roles.defaults", :before => :load_config_initializers do |app|
      eval File.read("#{config.root}/config/effective_roles.rb")
    end

{'fraction_non_alphanumeric': 0.07623318385650224, 'fraction_numerical': 0.0, 'mean_word_length': 3.9688195991091315, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6692862', 'n_tokens_mistral': 631, 'n_tokens_neox': 619, 'n_words': 150}