Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.71.2 to 1.75.8. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.71.2...v1.75.8) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.75.8 dependency-type: direct:development update-type: version-update:semver-minor ... Notes: This commit also includes several style and lint fixes required after updating RuboCop: - Removed redundant parentheses now detected by improved 'Style/RedundantParentheses' (1.72 and 1.75.3). - Replaced ternary expressions with logical OR when the ternary was returning 'true', as flagged by 'Style/RedundantCondition' (1.73). - Adjusted block variables to resolve new 'Lint/ShadowingOuterLocalVariable' offenses (1.75), helping avoid future conflicts during upgrades with 'rails app:updates' Signed-off-by: dependabot[bot] <support@github.com>
117 lines
5.2 KiB
Ruby
117 lines
5.2 KiB
Ruby
require "active_support/core_ext/integer/time"
|
|
|
|
Rails.application.configure do
|
|
# Settings specified here will take precedence over those in config/application.rb.
|
|
|
|
# Code is not reloaded between requests.
|
|
config.enable_reloading = false
|
|
|
|
# Eager load code on boot. This eager loads most of Rails and
|
|
# your application in memory, allowing both threaded web servers
|
|
# and those relying on copy on write to perform better.
|
|
# Rake tasks automatically ignore this option for performance.
|
|
config.eager_load = true
|
|
|
|
# Full error reports are disabled and caching is turned on.
|
|
config.consider_all_requests_local = false
|
|
config.action_controller.perform_caching = true
|
|
|
|
# Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment
|
|
# key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files).
|
|
# config.require_master_key = true
|
|
|
|
# Disable serving static files from `public/`, relying on NGINX/Apache to do so instead.
|
|
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
|
|
|
|
# Compress JavaScripts and CSS.
|
|
config.assets.js_compressor = Uglifier.new(harmony: true)
|
|
# config.assets.css_compressor = :sass
|
|
|
|
# Do not fall back to assets pipeline if a precompiled asset is missed.
|
|
config.assets.compile = false
|
|
|
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
|
# config.asset_host = "http://assets.example.com"
|
|
|
|
# Specifies the header that your server uses for sending files.
|
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
|
|
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX
|
|
|
|
# Mount Action Cable outside main process or domain.
|
|
# config.action_cable.mount_path = nil
|
|
# config.action_cable.url = "wss://example.com/cable"
|
|
# config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ]
|
|
|
|
# Assume all access to the app is happening through a SSL-terminating reverse proxy.
|
|
# Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies.
|
|
# config.assume_ssl = true
|
|
|
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
|
# Configure force_ssl in secrets.yml
|
|
config.force_ssl = Rails.application.secrets.force_ssl
|
|
|
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
|
config.log_formatter = ::Logger::Formatter.new
|
|
|
|
# Log to STDOUT if enabled
|
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
|
config.logger = ActiveSupport::Logger.new(STDOUT)
|
|
.tap { |logger| logger.formatter = ::Logger::Formatter.new }
|
|
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
|
else
|
|
# Rotate logger
|
|
config.logger = ActiveSupport::Logger.new(config.default_log_file, "daily")
|
|
.tap { |logger| logger.formatter = config.log_formatter }
|
|
.then { |logger| ActiveSupport::TaggedLogging.new(logger) }
|
|
end
|
|
|
|
# Prepend all log lines with the following tags.
|
|
config.log_tags = [:request_id]
|
|
|
|
# "info" includes generic and useful information about system operation, but avoids logging too much
|
|
# information to avoid inadvertent exposure of personally identifiable information (PII). If you
|
|
# want to log everything, set the level to "debug".
|
|
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "warn")
|
|
|
|
# Use a different cache store in production.
|
|
config.cache_store = :mem_cache_store, { namespace: proc { Tenant.current_schema }}
|
|
|
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
|
# config.active_job.queue_adapter = :resque
|
|
# config.active_job.queue_name_prefix = "consul_#{Rails.env}"
|
|
|
|
config.action_mailer.perform_caching = false
|
|
|
|
# Ignore bad email addresses and do not raise email delivery errors.
|
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
|
config.action_mailer.raise_delivery_errors = true
|
|
config.action_mailer.default_url_options = { host: Rails.application.secrets.server_name }
|
|
|
|
# Configure your SMTP service credentials in secrets.yml
|
|
if Rails.application.secrets.smtp_settings
|
|
config.action_mailer.delivery_method = Rails.application.secrets.mailer_delivery_method || :smtp
|
|
config.action_mailer.smtp_settings = Rails.application.secrets.smtp_settings
|
|
end
|
|
|
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
|
# the I18n.default_locale when a translation cannot be found).
|
|
# (commented because it prevents using fallback locales set in application.rb).
|
|
# config.i18n.fallbacks = true
|
|
|
|
# Don't log any deprecations.
|
|
config.active_support.report_deprecations = false
|
|
|
|
# Do not dump schema after migrations.
|
|
config.active_record.dump_schema_after_migration = false
|
|
|
|
# Enable DNS rebinding protection and other `Host` header attacks.
|
|
# config.hosts = [
|
|
# "example.com", # Allow requests from example.com
|
|
# /.*\.example\.com/ # Allow requests from subdomains like `www.example.com`
|
|
# ]
|
|
# Skip DNS rebinding protection for the default health check endpoint.
|
|
# config.host_authorization = { exclude: ->(request) { request.path == "/up" } }
|
|
end
|
|
|
|
require Rails.root.join("config", "environments", "custom", "production")
|