<commit_before>require 'bcsec/rails'

require 'rails/railtie'

module Bcsec::Rails
  class Railtie < ::Rails::Railtie
    initializer 'Bcsec::Rails initialization' do |app|
      Rails.logger.debug "Initializing bcsec-rails"

      Bcsec.configure do
        logger Rails.logger
      end

      Bcsec::Rack.use_in(app.middleware)
    end

    initializer 'Bcsec::Rails development support' do |app|
      app.config.to_prepare do
        ApplicationController.send(:include, Bcsec::Rails::Application)
      end
    end
  end
end
<commit_msg>Enable bcsec's Rack::Request extensions.  #5021.<commit_after>require 'bcsec/rails'

require 'rails/railtie'

module Bcsec::Rails
  class Railtie < ::Rails::Railtie
    initializer 'Bcsec::Rails initialization' do |app|
      Rails.logger.debug "Initializing bcsec-rails"

      Bcsec.configure do
        logger Rails.logger
      end

      Bcsec::Rack.use_in(app.middleware)

      Rack::Request.send(:include, Bcsec::Rack::RequestExtensions)
    end

    initializer 'Bcsec::Rails development support' do |app|
      app.config.to_prepare do
        ApplicationController.send(:include, Bcsec::Rails::Application)
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.10176619007569386, 'fraction_numerical': 0.00336417157275021, 'mean_word_length': 3.343065693430657, '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': '1848950', 'n_tokens_mistral': 409, 'n_tokens_neox': 384, 'n_words': 82}