<commit_before>module CacheDigests
  class Engine < ::Rails::Engine
    initializer 'cache_digests' do |app|
      require 'cache_digests'

      ActiveSupport.on_load :action_view do
        ActionView::Base.send :include, CacheDigests::FragmentHelper

        handler = ActionView::Template::Handlers::ERB
        tracker = DependencyTracker::ERBTracker
        DependencyTracker.register_tracker(handler, tracker)
      end

      ActiveSupport.on_load :action_controller do
        ActionController::Base.send :include, CacheDigests::ViewCacheDependency
      end

      config.to_prepare do
        CacheDigests::TemplateDigestor.logger = Rails.logger
      end
    end
  end
end<commit_msg>Properly register the ERB tracker<commit_after>module CacheDigests
  class Engine < ::Rails::Engine
    initializer 'cache_digests' do |app|
      require 'cache_digests'

      ActiveSupport.on_load :action_view do
        ActionView::Base.send :include, CacheDigests::FragmentHelper
      end

      ActiveSupport.on_load :action_controller do
        ActionController::Base.send :include, CacheDigests::ViewCacheDependency
      end

      config.to_prepare do
        CacheDigests::TemplateDigestor.logger = Rails.logger

        handler = ActionView::Template.handler_for_extension(:erb)
        tracker = DependencyTracker::ERBTracker
        DependencyTracker.register_tracker(handler, tracker)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.07298245614035087, 'fraction_numerical': 0.0, 'mean_word_length': 3.4842767295597485, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2732009', 'n_tokens_mistral': 405, 'n_tokens_neox': 385, 'n_words': 81}