<commit_before>module RailsDevelopmentBoost
  ActiveSupport.on_load(:after_initialize) do
    ReferencePatch.apply!
    DependenciesPatch.apply!
    DescendantsTrackerPatch.apply!
  end
  
  ActiveSupport.on_load(:action_controller) do
    ActiveSupport.on_load(:after_initialize) do
      ViewHelpersPatch.apply!
      ActionDispatch::Callbacks.to_prepare { ActiveSupport::Dependencies.unload_modified_files! }
    end
  end
  
  autoload :DependenciesPatch,       'rails_development_boost/dependencies_patch'
  autoload :DescendantsTrackerPatch, 'rails_development_boost/descendants_tracker_patch'
  autoload :LoadedFile,              'rails_development_boost/loaded_file'
  autoload :ReferencePatch,          'rails_development_boost/reference_patch'
  autoload :ViewHelpersPatch,        'rails_development_boost/view_helpers_patch'
  
  def self.debug!
    DependenciesPatch.debug!
  end
end<commit_msg>Make sure we're using the same hooks as Rails.<commit_after>module RailsDevelopmentBoost
  ActiveSupport.on_load(:after_initialize) do
    ReferencePatch.apply!
    DependenciesPatch.apply!
    DescendantsTrackerPatch.apply!
  end
  
  ActiveSupport.on_load(:action_controller) do
    ActiveSupport.on_load(:after_initialize) do
      ViewHelpersPatch.apply!
      
      if defined?(ActionDispatch::Reloader) # post 0f7c970
        ActionDispatch::Reloader.to_prepare { ActiveSupport::Dependencies.unload_modified_files! }
      else
        ActionDispatch::Callbacks.before    { ActiveSupport::Dependencies.unload_modified_files! }
      end
    end
  end
  
  autoload :DependenciesPatch,       'rails_development_boost/dependencies_patch'
  autoload :DescendantsTrackerPatch, 'rails_development_boost/descendants_tracker_patch'
  autoload :LoadedFile,              'rails_development_boost/loaded_file'
  autoload :ReferencePatch,          'rails_development_boost/reference_patch'
  autoload :ViewHelpersPatch,        'rails_development_boost/view_helpers_patch'
  
  def self.debug!
    DependenciesPatch.debug!
  end
end
{'fraction_non_alphanumeric': 0.06833824975417896, 'fraction_numerical': 0.0024582104228121925, 'mean_word_length': 4.455764075067024, 'pattern_counts': {'":': 0, '<': 3, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2244043', 'n_tokens_mistral': 632, 'n_tokens_neox': 584, 'n_words': 89}