+
+ The server cannot process the request due to a client error (400 Bad Request)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.
+
+
+
+
+
+
diff --git a/public/404.html b/public/404.html
index 2be3af26..c0670bc8 100644
--- a/public/404.html
+++ b/public/404.html
@@ -1,67 +1,114 @@
-
-
-
- The page you were looking for doesn't exist (404)
-
-
-
-
-
-
-
-
-
The page you were looking for doesn't exist.
-
You may have mistyped the address or the page may have moved.
-
-
If you are the application owner check the logs for more information.
-
-
+
+
+
+
+
+
+ The page you were looking for doesn’t exist (404 Not found)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved. If you’re the application owner check the logs for more information.
+
+
+
+
+
diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html
index 7cf1e168..9532a9cc 100644
--- a/public/406-unsupported-browser.html
+++ b/public/406-unsupported-browser.html
@@ -1,66 +1,114 @@
-
-
-
- Your browser is not supported (406)
-
-
-
-
-
-
-
-
-
Your browser is not supported.
-
Please upgrade your browser to continue.
-
-
-
+
+
+
+
+
+
+ Your browser is not supported (406 Not Acceptable)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your browser is not supported. Please upgrade your browser to continue.
+
+
+
+
+
diff --git a/public/422.html b/public/422.html
index c08eac0d..8bcf0601 100644
--- a/public/422.html
+++ b/public/422.html
@@ -1,67 +1,114 @@
-
-
-
- The change you wanted was rejected (422)
-
-
-
-
-
-
-
-
-
The change you wanted was rejected.
-
Maybe you tried to change something you didn't have access to.
-
-
If you are the application owner check the logs for more information.
The change you wanted was rejected. Maybe you tried to change something you didn’t have access to. If you’re the application owner check the logs for more information.
We’re sorry, but something went wrong. If you’re the application owner check the logs for more information.
+
+
+
+
+
From 72b8be628d80e9e18d49f934800bfff0b5ab6fb3 Mon Sep 17 00:00:00 2001
From: jazairi <16103405+jazairi@users.noreply.github.com>
Date: Fri, 17 Jul 2026 09:33:25 -0700
Subject: [PATCH 04/13] Add rails health check
---
config/routes.rb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/config/routes.rb b/config/routes.rb
index 7aa7b2c3..6bedbe2c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,8 @@
Rails.application.routes.draw do
+ # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500.
+ # Can be used by load balancers and uptime monitors to verify that the app is live.
+ get "up" => "rails/health#show", as: :rails_health_check
+
mount Flipflop::Engine => "/flipflop"
# For details see http://guides.rubyonrails.org/routing.html
namespace :admin do
From af94d115dff39dc6a1e49aa70814642a72311f63 Mon Sep 17 00:00:00 2001
From: jazairi <16103405+jazairi@users.noreply.github.com>
Date: Fri, 17 Jul 2026 09:35:51 -0700
Subject: [PATCH 05/13] Remove 8.0 defaults initializer
---
.../new_framework_defaults_8_0.rb | 30 -------------------
1 file changed, 30 deletions(-)
delete mode 100644 config/initializers/new_framework_defaults_8_0.rb
diff --git a/config/initializers/new_framework_defaults_8_0.rb b/config/initializers/new_framework_defaults_8_0.rb
deleted file mode 100644
index 92efa951..00000000
--- a/config/initializers/new_framework_defaults_8_0.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# Be sure to restart your server when you modify this file.
-#
-# This file eases your Rails 8.0 framework defaults upgrade.
-#
-# Uncomment each configuration one by one to switch to the new default.
-# Once your application is ready to run with all new defaults, you can remove
-# this file and set the `config.load_defaults` to `8.0`.
-#
-# Read the Guide for Upgrading Ruby on Rails for more info on each option.
-# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
-
-###
-# Specifies whether `to_time` methods preserve the UTC offset of their receivers or preserves the timezone.
-# If set to `:zone`, `to_time` methods will use the timezone of their receivers.
-# If set to `:offset`, `to_time` methods will use the UTC offset.
-# If `false`, `to_time` methods will convert to the local system UTC offset instead.
-#++
-# Rails.application.config.active_support.to_time_preserves_timezone = :zone
-
-###
-# When both `If-Modified-Since` and `If-None-Match` are provided by the client
-# only consider `If-None-Match` as specified by RFC 7232 Section 6.
-# If set to `false` both conditions need to be satisfied.
-#++
-# Rails.application.config.action_dispatch.strict_freshness = true
-
-###
-# Set `Regexp.timeout` to `1`s by default to improve security over Regexp Denial-of-Service attacks.
-#++
-# Regexp.timeout = 1
From 2ddc9fb5409dfdb56d6e8a3a36abb82f079f8589 Mon Sep 17 00:00:00 2001
From: jazairi <16103405+jazairi@users.noreply.github.com>
Date: Fri, 17 Jul 2026 09:37:17 -0700
Subject: [PATCH 06/13] Update renovate.json to support Rails 8
---
renovate.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/renovate.json b/renovate.json
index f57cbf0b..59012a68 100644
--- a/renovate.json
+++ b/renovate.json
@@ -8,13 +8,13 @@
"matchPackageNames": [
"ruby"
],
- "allowedVersions": "<3.5"
+ "allowedVersions": "<4"
},
{
"matchPackageNames": [
"rails"
],
- "allowedVersions": "<8.0"
+ "allowedVersions": "<8.2"
}
]
}
From 171dfc2792d36da1933f278f0a9615bee1bcf214 Mon Sep 17 00:00:00 2001
From: jazairi <16103405+jazairi@users.noreply.github.com>
Date: Fri, 17 Jul 2026 12:08:04 -0700
Subject: [PATCH 07/13] Bundle update to Rails 8.1 and load 8.1 defaults
---
Gemfile | 2 +-
Gemfile.lock | 116 +++++++++++++++++++++---------------------
config/application.rb | 2 +-
3 files changed, 61 insertions(+), 59 deletions(-)
diff --git a/Gemfile b/Gemfile
index a0876963..90dd3a05 100644
--- a/Gemfile
+++ b/Gemfile
@@ -30,7 +30,7 @@ gem 'omniauth-rails_csrf_protection'
gem 'omniauth-saml'
gem 'paper_trail'
gem 'puma'
-gem 'rails', '~> 8.0.0'
+gem 'rails', '~> 8.1.0'
gem 'rubyzip'
gem 'sass-rails'
gem 'sentry-rails'
diff --git a/Gemfile.lock b/Gemfile.lock
index 89b5dbd2..40806512 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -10,29 +10,31 @@ GIT
GEM
remote: https://rubygems.org/
specs:
- actioncable (8.0.5)
- actionpack (= 8.0.5)
- activesupport (= 8.0.5)
+ action_text-trix (2.1.19)
+ railties
+ actioncable (8.1.3)
+ actionpack (= 8.1.3)
+ activesupport (= 8.1.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
- actionmailbox (8.0.5)
- actionpack (= 8.0.5)
- activejob (= 8.0.5)
- activerecord (= 8.0.5)
- activestorage (= 8.0.5)
- activesupport (= 8.0.5)
+ actionmailbox (8.1.3)
+ actionpack (= 8.1.3)
+ activejob (= 8.1.3)
+ activerecord (= 8.1.3)
+ activestorage (= 8.1.3)
+ activesupport (= 8.1.3)
mail (>= 2.8.0)
- actionmailer (8.0.5)
- actionpack (= 8.0.5)
- actionview (= 8.0.5)
- activejob (= 8.0.5)
- activesupport (= 8.0.5)
+ actionmailer (8.1.3)
+ actionpack (= 8.1.3)
+ actionview (= 8.1.3)
+ activejob (= 8.1.3)
+ activesupport (= 8.1.3)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
- actionpack (8.0.5)
- actionview (= 8.0.5)
- activesupport (= 8.0.5)
+ actionpack (8.1.3)
+ actionview (= 8.1.3)
+ activesupport (= 8.1.3)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
@@ -40,42 +42,43 @@ GEM
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
- actiontext (8.0.5)
- actionpack (= 8.0.5)
- activerecord (= 8.0.5)
- activestorage (= 8.0.5)
- activesupport (= 8.0.5)
+ actiontext (8.1.3)
+ action_text-trix (~> 2.1.15)
+ actionpack (= 8.1.3)
+ activerecord (= 8.1.3)
+ activestorage (= 8.1.3)
+ activesupport (= 8.1.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (8.0.5)
- activesupport (= 8.0.5)
+ actionview (8.1.3)
+ activesupport (= 8.1.3)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
- activejob (8.0.5)
- activesupport (= 8.0.5)
+ activejob (8.1.3)
+ activesupport (= 8.1.3)
globalid (>= 0.3.6)
- activemodel (8.0.5)
- activesupport (= 8.0.5)
- activerecord (8.0.5)
- activemodel (= 8.0.5)
- activesupport (= 8.0.5)
+ activemodel (8.1.3)
+ activesupport (= 8.1.3)
+ activerecord (8.1.3)
+ activemodel (= 8.1.3)
+ activesupport (= 8.1.3)
timeout (>= 0.4.0)
- activestorage (8.0.5)
- actionpack (= 8.0.5)
- activejob (= 8.0.5)
- activerecord (= 8.0.5)
- activesupport (= 8.0.5)
+ activestorage (8.1.3)
+ actionpack (= 8.1.3)
+ activejob (= 8.1.3)
+ activerecord (= 8.1.3)
+ activesupport (= 8.1.3)
marcel (~> 1.0)
- activesupport (8.0.5)
+ activesupport (8.1.3)
base64
- benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
+ json
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
@@ -117,7 +120,6 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.3.0)
bcrypt (3.1.22)
- benchmark (0.5.0)
bigdecimal (4.1.2)
bindex (0.8.1)
bootsnap (1.24.6)
@@ -166,7 +168,7 @@ GEM
dotenv (= 3.2.0)
railties (>= 6.1)
drb (2.2.3)
- erb (6.0.4)
+ erb (6.0.5)
erubi (1.13.1)
execjs (2.10.1)
ffi (1.17.3)
@@ -298,20 +300,20 @@ GEM
rack (>= 1.3)
rackup (2.3.1)
rack (>= 3)
- rails (8.0.5)
- actioncable (= 8.0.5)
- actionmailbox (= 8.0.5)
- actionmailer (= 8.0.5)
- actionpack (= 8.0.5)
- actiontext (= 8.0.5)
- actionview (= 8.0.5)
- activejob (= 8.0.5)
- activemodel (= 8.0.5)
- activerecord (= 8.0.5)
- activestorage (= 8.0.5)
- activesupport (= 8.0.5)
+ rails (8.1.3)
+ actioncable (= 8.1.3)
+ actionmailbox (= 8.1.3)
+ actionmailer (= 8.1.3)
+ actionpack (= 8.1.3)
+ actiontext (= 8.1.3)
+ actionview (= 8.1.3)
+ activejob (= 8.1.3)
+ activemodel (= 8.1.3)
+ activerecord (= 8.1.3)
+ activestorage (= 8.1.3)
+ activesupport (= 8.1.3)
bundler (>= 1.15.0)
- railties (= 8.0.5)
+ railties (= 8.1.3)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
@@ -321,9 +323,9 @@ GEM
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-mermaid_erd (0.8.0)
rails (>= 5.2)
- railties (8.0.5)
- actionpack (= 8.0.5)
- activesupport (= 8.0.5)
+ railties (8.1.3)
+ actionpack (= 8.1.3)
+ activesupport (= 8.1.3)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
@@ -498,7 +500,7 @@ DEPENDENCIES
paper_trail
pg
puma
- rails (~> 8.0.0)
+ rails (~> 8.1.0)
rails-mermaid_erd
rubocop
rubocop-rails
diff --git a/config/application.rb b/config/application.rb
index 3ac93dd4..3dedb81f 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -17,7 +17,7 @@ class Application < Rails::Application
config.flipflop.raise_strategy_errors = nil
# Initialize configuration defaults for originally generated Rails version.
- config.load_defaults 8.0
+ config.load_defaults 8.1
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
From eb212f591f5956284cd7175d92c960ea6b1b934c Mon Sep 17 00:00:00 2001
From: jazairi <16103405+jazairi@users.noreply.github.com>
Date: Fri, 17 Jul 2026 15:02:39 -0700
Subject: [PATCH 08/13] rails app:update to 8.1
---
bin/ci | 6 ++
bin/rubocop | 2 +-
bin/setup | 14 ++--
config/ci.rb | 22 ++++++
config/environments/development.rb | 37 ++++-----
config/environments/production.rb | 66 +++++-----------
config/initializers/assets.rb | 6 --
.../initializers/content_security_policy.rb | 4 +
.../initializers/filter_parameter_logging.rb | 2 +-
config/initializers/inflections.rb | 4 -
.../new_framework_defaults_8_1.rb | 74 ++++++++++++++++++
config/puma.rb | 12 ++-
public/400.html | 31 ++++++--
public/404.html | 33 ++++++--
public/406-unsupported-browser.html | 29 ++++++-
public/422.html | 31 ++++++--
public/500.html | 33 ++++++--
public/icon.png | Bin 5599 -> 4166 bytes
public/icon.svg | 4 +-
19 files changed, 294 insertions(+), 116 deletions(-)
create mode 100755 bin/ci
create mode 100644 config/ci.rb
create mode 100644 config/initializers/new_framework_defaults_8_1.rb
diff --git a/bin/ci b/bin/ci
new file mode 100755
index 00000000..4137ad5b
--- /dev/null
+++ b/bin/ci
@@ -0,0 +1,6 @@
+#!/usr/bin/env ruby
+require_relative "../config/boot"
+require "active_support/continuous_integration"
+
+CI = ActiveSupport::ContinuousIntegration
+require_relative "../config/ci.rb"
diff --git a/bin/rubocop b/bin/rubocop
index 40330c0f..5a205047 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -2,7 +2,7 @@
require "rubygems"
require "bundler/setup"
-# explicit rubocop config increases performance slightly while avoiding config confusion.
+# Explicit RuboCop config increases performance slightly while avoiding config confusion.
ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__))
load Gem.bin_path("rubocop", "rubocop")
diff --git a/bin/setup b/bin/setup
index 84c03f7d..81be011e 100755
--- a/bin/setup
+++ b/bin/setup
@@ -2,7 +2,6 @@
require "fileutils"
APP_ROOT = File.expand_path("..", __dir__)
-APP_NAME = "thing"
def system!(*args)
system(*args, exception: true)
@@ -14,7 +13,6 @@ FileUtils.chdir APP_ROOT do
# Add necessary setup steps to this file.
puts "== Installing dependencies =="
- system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")
# puts "\n== Copying sample files =="
@@ -24,14 +22,14 @@ FileUtils.chdir APP_ROOT do
puts "\n== Preparing database =="
system! "bin/rails db:prepare"
+ system! "bin/rails db:reset" if ARGV.include?("--reset")
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
- puts "\n== Restarting application server =="
- system! "bin/rails restart"
-
- # puts "\n== Configuring puma-dev =="
- # system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
- # system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
+ unless ARGV.include?("--skip-server")
+ puts "\n== Starting development server =="
+ STDOUT.flush # flush the output before exec(2) so that it displays
+ exec "bin/dev"
+ end
end
diff --git a/config/ci.rb b/config/ci.rb
new file mode 100644
index 00000000..7e3f04c4
--- /dev/null
+++ b/config/ci.rb
@@ -0,0 +1,22 @@
+# Run using bin/ci
+
+CI.run do
+ step "Setup", "bin/setup --skip-server"
+
+ step "Style: Ruby", "bin/rubocop"
+
+ step "Security: Importmap vulnerability audit", "bin/importmap audit"
+ step "Tests: Rails", "bin/rails test"
+ step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant"
+
+ # Optional: Run system tests
+ # step "Tests: System", "bin/rails test:system"
+
+ # Optional: set a green GitHub commit status to unblock PR merge.
+ # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`.
+ # if success?
+ # step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff"
+ # else
+ # failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again."
+ # end
+end
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 95c2be97..d9ccf12e 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -1,6 +1,8 @@
require "active_support/core_ext/integer/time"
Rails.application.configure do
+ # Settings specified here will take precedence over those in config/application.rb.
+
# Before filter for Flipflop dashboard. Replace with a lambda or method name
# defined in ApplicationController to implement access control.
config.flipflop.dashboard_access_filter = nil
@@ -18,11 +20,7 @@
Bullet.add_footer = true
end
- # Settings specified here will take precedence over those in config/application.rb.
-
- # In the development environment your application's code is reloaded any time
- # it changes. This slows down response time but is perfect for development
- # since you don't have to restart the web server when you make code changes.
+ # Make code changes take effect immediately without server restart.
config.enable_reloading = true
# Do not eager load code on boot.
@@ -34,20 +32,19 @@
# Enable server timing.
config.server_timing = true
- # Enable/disable caching. By default caching is disabled.
- # Run rails dev:cache to toggle caching.
+ # Enable/disable Action Controller caching. By default Action Controller caching is disabled.
+ # Run rails dev:cache to toggle Action Controller caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
config.action_controller.perform_caching = true
config.action_controller.enable_fragment_cache_logging = true
-
- config.cache_store = :memory_store
- config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" }
+ config.public_file_server.headers = { "cache-control" => "public, max-age=#{2.days.to_i}" }
else
config.action_controller.perform_caching = false
-
- config.cache_store = :null_store
end
+ # Change to :null_store to avoid any caching.
+ config.cache_store = :memory_store
+
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
@@ -59,30 +56,30 @@
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
- # Disable caching for Action Mailer templates even if Action Controller
- # caching is enabled.
+ # Make template changes take effect immediately.
config.action_mailer.perform_caching = false
+ # Set localhost to be used by links generated in mailer templates.
config.action_mailer.default_url_options = { host: "localhost", port: 3000 }
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
- # Raise exceptions for disallowed deprecations.
- config.active_support.disallowed_deprecation = :raise
-
- # Tell Active Support which deprecation messages to disallow.
- config.active_support.disallowed_deprecation_warnings = []
-
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
+ # Append comments with runtime information tags to SQL queries in logs.
+ config.active_record.query_log_tags_enabled = true
+
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true
+ # Highlight code that triggered redirect in logs.
+ config.action_dispatch.verbose_redirect_logs = true
+
# Suppress logger output for asset requests.
config.assets.quiet = true
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 22243e71..8d57e138 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -6,49 +6,26 @@
# 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.
+ # Eager load code on boot for better performance and memory savings (ignored by Rake tasks).
config.eager_load = true
- # Full error reports are disabled and caching is turned on.
+ # Full error reports are disabled.
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 = :terser
- # Compress CSS using a preprocessor.
- # config.assets.css_compressor = :sass
+ # Turn on fragment caching in view templates.
+ config.action_controller.perform_caching = true
- # Do not fall back to assets pipeline if a precompiled asset is missed.
- config.assets.compile = false
+ # 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}" }
# 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
-
- # Store uploaded files on the local file system (see config/storage.yml for options).
+ # Store uploaded files on Amazon S3.
config.active_storage.service = :amazon
- # 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
+ config.assume_ssl = true
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
@@ -56,25 +33,24 @@
# Skip http-to-https redirect for the default health check endpoint.
# config.ssl_options = { redirect: { exclude: ->(request) { request.path == "/up" } } }
- # Log to STDOUT by default
- config.logger = ActiveSupport::Logger.new(STDOUT)
- .tap { |logger| logger.formatter = ::Logger::Formatter.new }
- .then { |logger| ActiveSupport::TaggedLogging.new(logger) }
-
- # Prepend all log lines with the following tags.
+ # Log to STDOUT with the current request id as a default log tag.
config.log_tags = [ :request_id ]
+ config.logger = ActiveSupport::TaggedLogging.logger(STDOUT)
- # "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".
+ # Change to "debug" to log everything (including potentially personally-identifiable information!).
config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info")
- # Use a different cache store in production.
+ # Prevent health checks from clogging up the logs.
+ config.silence_healthcheck_path = "/up"
+
+ # Don't log any deprecations.
+ config.active_support.report_deprecations = false
+
+ # Replace the default in-process memory cache store with a durable alternative.
# config.cache_store = :mem_cache_store
- # Use a real queuing backend for Active Job (and separate queues per environment).
+ # Replace the default in-process and non-durable queuing backend for Active Job.
# config.active_job.queue_adapter = :resque
- # config.active_job.queue_name_prefix = "thing_production"
# Disable caching for Action Mailer templates even if Action Controller
# caching is enabled.
@@ -99,9 +75,6 @@
# the I18n.default_locale when a translation cannot be found).
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
@@ -113,6 +86,7 @@
# "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
diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb
index da303aef..48732442 100644
--- a/config/initializers/assets.rb
+++ b/config/initializers/assets.rb
@@ -5,9 +5,3 @@
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
-
-# Precompile additional assets.
-# application.js, application.css, and all non-JS/CSS in the app/assets
-# folder are already added.
-# Rails.application.config.assets.precompile += %w( admin.js admin.css )
-Rails.application.config.assets.precompile += %w( administrate.css )
diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb
index b3076b38..d51d7139 100644
--- a/config/initializers/content_security_policy.rb
+++ b/config/initializers/content_security_policy.rb
@@ -20,6 +20,10 @@
# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
# config.content_security_policy_nonce_directives = %w(script-src style-src)
#
+# # Automatically add `nonce` to `javascript_tag`, `javascript_include_tag`, and `stylesheet_link_tag`
+# # if the corresponding directives are specified in `content_security_policy_nonce_directives`.
+# # config.content_security_policy_nonce_auto = true
+#
# # Report violations without enforcing the policy.
# # config.content_security_policy_report_only = true
# end
diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb
index c010b83d..c0b717f7 100644
--- a/config/initializers/filter_parameter_logging.rb
+++ b/config/initializers/filter_parameter_logging.rb
@@ -4,5 +4,5 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
- :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
+ :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc
]
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
index a945b18d..3860f659 100644
--- a/config/initializers/inflections.rb
+++ b/config/initializers/inflections.rb
@@ -14,7 +14,3 @@
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym "RESTful"
# end
-
-ActiveSupport::Inflector.inflections(:en) do |inflect|
- inflect.irregular "has", "have"
-end
diff --git a/config/initializers/new_framework_defaults_8_1.rb b/config/initializers/new_framework_defaults_8_1.rb
new file mode 100644
index 00000000..8569b5b1
--- /dev/null
+++ b/config/initializers/new_framework_defaults_8_1.rb
@@ -0,0 +1,74 @@
+# Be sure to restart your server when you modify this file.
+#
+# This file eases your Rails 8.1 framework defaults upgrade.
+#
+# Uncomment each configuration one by one to switch to the new default.
+# Once your application is ready to run with all new defaults, you can remove
+# this file and set the `config.load_defaults` to `8.1`.
+#
+# Read the Guide for Upgrading Ruby on Rails for more info on each option.
+# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html
+
+###
+# Skips escaping HTML entities and line separators. When set to `false`, the
+# JSON renderer no longer escapes these to improve performance.
+#
+# Example:
+# class PostsController < ApplicationController
+# def index
+# render json: { key: "\u2028\u2029<>&" }
+# end
+# end
+#
+# Renders `{"key":"\u2028\u2029\u003c\u003e\u0026"}` with the previous default, but `{"key":" <>&"}` with the config
+# set to `false`.
+#
+# Applications that want to keep the escaping behavior can set the config to `true`.
+#++
+# Rails.configuration.action_controller.escape_json_responses = false
+
+###
+# Skips escaping LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029) in JSON.
+#
+# Historically these characters were not valid inside JavaScript literal strings but that changed in ECMAScript 2019.
+# As such it's no longer a concern in modern browsers: https://caniuse.com/mdn-javascript_builtins_json_json_superset.
+#++
+# Rails.configuration.active_support.escape_js_separators_in_json = false
+
+###
+# Raises an error when order dependent finder methods (e.g. `#first`, `#second`) are called without `order` values
+# on the relation, and the model does not have any order columns (`implicit_order_column`, `query_constraints`, or
+# `primary_key`) to fall back on.
+#
+# The current behavior of not raising an error has been deprecated, and this configuration option will be removed in
+# Rails 8.2.
+#++
+# Rails.configuration.active_record.raise_on_missing_required_finder_order_columns = true
+
+###
+# Controls how Rails handles path relative URL redirects.
+# When set to `:raise`, Rails will raise an `ActionController::Redirecting::UnsafeRedirectError`
+# for relative URLs without a leading slash, which can help prevent open redirect vulnerabilities.
+#
+# Example:
+# redirect_to "example.com" # Raises UnsafeRedirectError
+# redirect_to "@attacker.com" # Raises UnsafeRedirectError
+# redirect_to "/safe/path" # Works correctly
+#
+# Applications that want to allow these redirects can set the config to `:log` (previous default)
+# to only log warnings, or `:notify` to send ActiveSupport notifications.
+#++
+# Rails.configuration.action_controller.action_on_path_relative_redirect = :raise
+
+###
+# Use a Ruby parser to track dependencies between Action View templates
+#++
+# Rails.configuration.action_view.render_tracker = :ruby
+
+###
+# When enabled, hidden inputs generated by `form_tag`, `token_tag`, `method_tag`, and the hidden parameter fields
+# included in `button_to` forms will omit the `autocomplete="off"` attribute.
+#
+# Applications that want to keep generating the `autocomplete` attribute for those tags can set it to `false`.
+#++
+# Rails.configuration.action_view.remove_hidden_field_autocomplete = true
diff --git a/config/puma.rb b/config/puma.rb
index 03c166f4..38c4b865 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,13 +1,18 @@
# This configuration file will be evaluated by Puma. The top-level methods that
# are invoked here are part of Puma's configuration DSL. For more information
# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html.
-
+#
# Puma starts a configurable number of processes (workers) and each process
# serves each request in a thread from an internal thread pool.
#
+# You can control the number of workers using ENV["WEB_CONCURRENCY"]. You
+# should only set this value when you want to run 2 or more workers. The
+# default is already 1. You can set it to `auto` to automatically start a worker
+# for each available processor.
+#
# The ideal number of threads per worker depends both on how much time the
# application spends waiting for IO operations and on how much you wish to
-# to prioritize throughput over latency.
+# prioritize throughput over latency.
#
# As a rule of thumb, increasing the number of threads will increase how much
# traffic a given process can handle (throughput), but due to CRuby's
@@ -29,6 +34,9 @@
# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart
+# Run the Solid Queue supervisor inside of Puma for single-server deployments.
+plugin :solid_queue if ENV["SOLID_QUEUE_IN_PUMA"]
+
# Specify the PID file. Defaults to tmp/pids/server.pid in development.
# In other environments, only set the PID file if requested.
pidfile ENV["PIDFILE"] if ENV["PIDFILE"]
diff --git a/public/400.html b/public/400.html
index 282dbc8c..640de033 100644
--- a/public/400.html
+++ b/public/400.html
@@ -35,12 +35,35 @@
font-weight: 400;
letter-spacing: -0.0025em;
line-height: 1.4;
- min-height: 100vh;
+ min-height: 100dvh;
place-items: center;
text-rendering: optimizeLegibility;
-webkit-text-size-adjust: 100%;
}
+ #error-description {
+ fill: #d30001;
+ }
+
+ #error-id {
+ fill: #f0eff0;
+ }
+
+ @media (prefers-color-scheme: dark) {
+ body {
+ background: #101010;
+ color: #e0e0e0;
+ }
+
+ #error-description {
+ fill: #FF6161;
+ }
+
+ #error-id {
+ fill: #2c2c2c;
+ }
+ }
+
a {
color: inherit;
font-weight: 700;
@@ -83,13 +106,11 @@
}
main article br {
-
display: none;
@media(min-width: 48em) {
display: inline;
}
-
}
@@ -102,10 +123,10 @@
-
+
-
The server cannot process the request due to a client error. Please check the request and try again. If you’re the application owner check the logs for more information.
+
The server cannot process the request due to a client error. Please check the request and try again. If you're the application owner check the logs for more information.
The page you were looking for doesn’t exist. You may have mistyped the address or the page may have moved. If you’re the application owner check the logs for more information.
+
The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. If you're the application owner check the logs for more information.
The change you wanted was rejected. Maybe you tried to change something you didn’t have access to. If you’re the application owner check the logs for more information.
+
The change you wanted was rejected. Maybe you tried to change something you didn't have access to. If you're the application owner check the logs for more information.