<commit_before>require File.expand_path('../boot', __FILE__)

require "rails"
require 'active_record'

require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"

Bundler.require(*Rails.groups)

module Whitehall
  class Application < Rails::Application
    require 'whitehall'

    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    config.autoload_paths += %W(
      #{config.root}/app/presenters
      #{config.root}/app/services
      #{config.root}/app/uploaders
      #{config.root}/app/validators
      #{config.root}/app/workers
      #{config.root}/lib
      #{config.root}/app/concerns
    )

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    config.active_record.observers = [
      :ministerial_role_search_index_observer,
      :corporate_information_page_search_index_observer
    ]

    # Opt in to new transaction callback error handling behaviour to get rid of
    # deprecation warnings.
    #
    # See http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#error-handling-in-transaction-callbacks
    config.active_record.raise_in_transactional_callbacks = true

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.<commit_msg>Solve circular dependency errors in Sidekiq workers<commit_after>require File.expand_path('../boot', __FILE__)

require "rails"
require 'active_record'

require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"

Bundler.require(*Rails.groups)

module Whitehall
  class Application < Rails::Application
    require 'whitehall'

    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Custom directories with classes and modules you want to be autoloadable.
    config.autoload_paths += %W(
      #{config.root}/app/presenters
      #{config.root}/app/services
      #{config.root}/app/uploaders
      #{config.root}/app/validators
      #{config.root}/app/workers
      #{config.root}/lib
      #{config.root}/app/concerns
    )

    # In the context of Sidekiq workers in production mode, autoloading is
    # disabled and instead Sidekiq uses eager loading. By default, eager
    # loading only includes directories under app/ and not lib/. Therefore
    # Sidkiq workers are (sometimes) unable to autoload constants which we've
    # defined in files in lib/.
    #
    # https://github.com/mperham/sidekiq/wiki/FAQ#why-doesnt-sidekiq-autoload-my-rails-application-code
    config.eager_load_paths += config.autoload_paths

    # Only load the plugins named here, in the order given (default is alphabetical).
    # :all can be used as a placeholder for all plugins not explicitly named.
    # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

    config.active_record.observers = [
      :ministerial_role_search_index_observer,
      :corporate_information_page_search_index_observer
    ]

    # Opt in to new transaction callback error handling behaviour to get rid of
    # deprecation warnings.
    #
    # See http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#error-handling-in-transaction-callbacks
    config.active_record.raise_in_transactional_callbacks = true

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
{'fraction_non_alphanumeric': 0.08529630547979172, 'fraction_numerical': 0.0, 'mean_word_length': 3.7966706302021405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3998199', 'n_tokens_mistral': 1178, 'n_tokens_neox': 1147, 'n_words': 330}