Several changes to adapt Rails 8
This commit is contained in:
parent
7cb02d8a7d
commit
52777edb65
11 changed files with 112 additions and 83 deletions
|
|
@ -1,4 +1,4 @@
|
|||
require "active_support/core_ext/integer/time"
|
||||
require 'active_support/core_ext/integer/time'
|
||||
|
||||
Rails.application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb.
|
||||
|
|
@ -16,7 +16,7 @@ Rails.application.configure do
|
|||
config.action_controller.perform_caching = true
|
||||
|
||||
# Cache assets for far-future expiry since they are all digest stamped.
|
||||
config.public_file_server.headers = { "cache-control" => "public, max-age=#{1.year.to_i}" }
|
||||
config.public_file_server.headers = { 'cache-control' => "public, max-age=#{1.year.to_i}" }
|
||||
|
||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||
# config.asset_host = "http://assets.example.com"
|
||||
|
|
@ -34,14 +34,14 @@ Rails.application.configure do
|
|||
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
|
||||
|
||||
# Log to STDOUT with the current request id as a default log tag.
|
||||
config.log_tags = [ :request_id ]
|
||||
config.log_tags = [:request_id]
|
||||
config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
|
||||
|
||||
# Change to "debug" to log everything (including potentially personally-identifiable information!)
|
||||
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
|
||||
config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info')
|
||||
|
||||
# Prevent health checks from clogging up the logs.
|
||||
config.silence_healthcheck_path = "/up"
|
||||
config.silence_healthcheck_path = '/up'
|
||||
|
||||
# Don't log any deprecations.
|
||||
config.active_support.report_deprecations = false
|
||||
|
|
@ -53,13 +53,12 @@ Rails.application.configure do
|
|||
config.active_job.queue_adapter = :solid_queue
|
||||
config.solid_queue.connects_to = { database: { writing: :queue } }
|
||||
config.action_mailer.smtp_settings = {
|
||||
# TODO: make configurable through ENV variables
|
||||
address: 'dokku2.workaround.org',
|
||||
port: 25,
|
||||
address: Rails.application.credentials.smtp.server,
|
||||
port: 25,
|
||||
enable_starttls_auto: false
|
||||
}
|
||||
config.action_mailer.default_url_options = {
|
||||
host: "screenshots.debian.net",
|
||||
host: 'screenshots.debian.net',
|
||||
protocol: 'https'
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +67,7 @@ Rails.application.configure do
|
|||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Set host to be used by links generated in mailer templates.
|
||||
config.action_mailer.default_url_options = { host: "example.com" }
|
||||
config.action_mailer.default_url_options = { host: 'example.com' }
|
||||
|
||||
# Specify outgoing SMTP server. Remember to add smtp/* credentials via rails credentials:edit.
|
||||
# config.action_mailer.smtp_settings = {
|
||||
|
|
@ -89,8 +88,8 @@ Rails.application.configure do
|
|||
config.package_sources = [
|
||||
{
|
||||
description: 'Debian Unstable (Sid)', type: 'apt', url: 'http://ftp.de.debian.org/debian/dists/sid',
|
||||
architectures: ['i386' ,'amd64']
|
||||
#components: ['main','restricted','universe','multiverse']
|
||||
architectures: %w[i386 amd64]
|
||||
# components: ['main','restricted','universe','multiverse']
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -107,7 +106,7 @@ Rails.application.configure do
|
|||
# Only use :id for inspections in production.
|
||||
# Needed (at least) for devise.rb to determine the oauth2 callback URL
|
||||
config.base_url = ENV['DEBSHOTS_BASE_URL'] || 'http://localhost:3000'
|
||||
config.active_record.attributes_for_inspect = [ :id ]
|
||||
config.active_record.attributes_for_inspect = [:id]
|
||||
|
||||
# Enable DNS rebinding protection and other `Host` header attacks.
|
||||
# config.hosts = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue