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

# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module DefenceSolicitor
  class Application < Rails::Application
    # 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.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    config.generators do |generate|
      generate.helper false
      generate.javascript_engine false
      generate.request_specs false
      generate.routing_specs false
      generate.stylesheets false
      generate.test_framework :rspec
      generate.view_specs false
    end

    config.relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] || ""
    # Do not swallow errors in after_commit/after_rollback callbacks.
    config.active_record.raise_in_transactional_callbacks = true
    config.use_govuk_elements_form_builder = false
    # app title appears in the header bar
    config.proposition_title = "Defence request service"
    # phase governs text indicators and highlight colours
    # presumed values: alpha, beta, live
    config.phase = "alpha"
    # product type may also govern highlight colours
    # known values: information, service
    config.product_type = "service"
    # Feedback URL (URL for feedback link in phase banner)
    # Use 'auto_add_path' for it to add a path link to the new_feedback route
    config.feedback_url = config.relative_url_root + "/feedback/new"

    config.action_mailer.default_url_options = Settings.action_mailer.default_url_options.to_h
    config.action_mailer.smtp_settings = Settings.action_mailer.smtp_settings.to_h

    config.action_controller.action_on_unpermitted_parameters = :raise
    config.active_record.raise_in_transactional_callbacks = true
  end
end<commit_msg>Disable default error proc<commit_after>require File.expand_path("../boot", __FILE__)

# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module DefenceSolicitor
  class Application < Rails::Application
    # 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.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de

    config.generators do |generate|
      generate.helper false
      generate.javascript_engine false
      generate.request_specs false
      generate.routing_specs false
      generate.stylesheets false
      generate.test_framework :rspec
      generate.view_specs false
    end

    config.relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] || ""
    # Do not swallow errors in after_commit/after_rollback callbacks.
    config.active_record.raise_in_transactional_callbacks = true
    config.use_govuk_elements_form_builder = false
    # app title appears in the header bar
    config.proposition_title = "Defence request service"
    # phase governs text indicators and highlight colours
    # presumed values: alpha, beta, live
    config.phase = "alpha"
    # product type may also govern highlight colours
    # known values: information, service
    config.product_type = "service"
    # Feedback URL (URL for feedback link in phase banner)
    # Use 'auto_add_path' for it to add a path link to the new_feedback route
    config.feedback_url = config.relative_url_root + "/feedback/new"

    config.action_mailer.default_url_options = Settings.action_mailer.default_url_options.to_h
    config.action_mailer.smtp_settings = Settings.action_mailer.smtp_settings.to_h

    config.action_controller.action_on_unpermitted_parameters = :raise
    config.active_record.raise_in_transactional_callbacks = true

     # disable default <div class="field_with_errors"> wrapping idiocy
    config.action_view.field_error_proc = Proc.new { |html_tag| html_tag }
  end
end
{'fraction_non_alphanumeric': 0.0781981981981982, 'fraction_numerical': 0.0014414414414414415, 'mean_word_length': 4.135060129509713, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '5409159', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1596, 'n_words': 476}