From 4576fddc4326c2c73cf96bbd4208790c43b9b4b2 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 1 Jul 2026 20:18:02 -0500 Subject: [PATCH] Update to Rails 8.1 and Ruby 3.4 * Use ruby:3.4-slim for Docker base image. * Update configuration for Rails 8.1 changes. * Update Brakeman to 8.x for Rails 8.1 compatibility. * Skip Metrics/BlockLength Rubocop on RSpec examples. * Various minor edits for Rubocop conformance. Closes: AP-761 --- .idea/lost-and-found.iml | 152 ------------ .rubocop.yml | 6 +- Dockerfile | 4 +- Gemfile | 9 +- Gemfile.lock | 220 +++++++++--------- bin/bundler-audit | 6 + bin/ci | 6 + bin/rubocop | 2 +- bin/setup | 1 + config/application.rb | 2 +- config/bundler-audit.yml | 5 + config/ci.rb | 19 ++ config/environments/development.rb | 3 + config/environments/production.rb | 3 - config/environments/test.rb | 1 - .../initializers/content_security_policy.rb | 4 + .../initializers/filter_parameter_logging.rb | 2 +- public/400.html | 31 ++- public/406-unsupported-browser.html | 199 ++++++++++------ public/422.html | 200 ++++++++++------ public/icon.png | Bin 0 -> 4166 bytes public/icon.svg | 3 + spec/models/item_csv_import_spec.rb | 6 +- spec/system/admin_system_spec.rb | 4 +- 24 files changed, 476 insertions(+), 412 deletions(-) create mode 100755 bin/bundler-audit create mode 100755 bin/ci create mode 100644 config/bundler-audit.yml create mode 100644 config/ci.rb create mode 100644 public/icon.png create mode 100644 public/icon.svg diff --git a/.idea/lost-and-found.iml b/.idea/lost-and-found.iml index c1a748b..2c8f456 100644 --- a/.idea/lost-and-found.iml +++ b/.idea/lost-and-found.iml @@ -29,158 +29,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.rubocop.yml b/.rubocop.yml index d189505..782108a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -33,6 +33,10 @@ Layout/MultilineMethodCallIndentation: Layout/MultilineOperationIndentation: Enabled: false +Metrics/BlockLength: + Exclude: + - 'spec/**/*' + Metrics/MethodLength: Max: 25 @@ -370,4 +374,4 @@ Style/SuperArguments: # new in 1.64 Style/SuperWithArgsParentheses: # new in 1.58 Enabled: true Style/YAMLFileRead: # new in 1.53 - Enabled: true \ No newline at end of file + Enabled: true diff --git a/Dockerfile b/Dockerfile index 09c21f8..fb59ad3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # The base stage scaffolds elements which are common to building and running # the application, such as installing ca-certificates, creating the app user, # and installing runtime system dependencies. -FROM ruby:3.3-slim AS base +FROM ruby:3.4-slim AS base # This declares that the container intends to listen on port 3000. It doesn't # actually "expose" the port anywhere -- it is just metadata. It advises tools @@ -114,7 +114,7 @@ RUN apt-get install -y --no-install-recommends \ USER $APP_USER # Use a recent version of Bundler -RUN gem install bundler -v 2.5.23 +RUN gem install bundler -v 4.0.15 # Install gems. We don't enforce the validity of the Gemfile.lock until the # final (production) stage. diff --git a/Gemfile b/Gemfile index ced338d..1c7d672 100644 --- a/Gemfile +++ b/Gemfile @@ -3,31 +3,32 @@ source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby '~> 3.3.6' +ruby '~> 3.4' gem 'activerecord-import' gem 'berkeley_library-docker', '~> 0.2.0' gem 'berkeley_library-logging', '~> 0.2', '>= 0.2.5' gem 'bootsnap', '>= 1.4.2', require: false gem 'bootstrap' +gem 'csv' gem 'kaminari' gem 'lograge', '>=0.11.2' gem 'okcomputer', '~> 1.19' gem 'omniauth-cas', git: 'https://github.com/dlindahl/omniauth-cas.git', ref: '7087bda829e14c0f7cab2aece5045ad7015669b1' -gem 'paper_trail', '~> 16.0' +gem 'paper_trail', '~> 17.0' gem 'pg' gem 'pg_search' gem 'puma', '~> 7.2' gem 'puma-plugin-delayed_stop', '~> 0.1.2' -gem 'rails', '~> 8.0.5' +gem 'rails', '~> 8.1.3' gem 'sass-rails', '~> 6.0' gem 'typesafe_enum' gem 'webpacker', '~> 5.4' group :development, :test do - gem 'brakeman', '~> 4.8' + gem 'brakeman', '~> 8.0' gem 'bundler-audit' gem 'colorize' gem 'factory_bot_rails' diff --git a/Gemfile.lock b/Gemfile.lock index 30868cb..d979afa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,29 +11,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) @@ -41,44 +43,45 @@ 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) activerecord-import (1.2.0) activerecord (>= 3.2) - 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) @@ -99,17 +102,18 @@ GEM colorize (~> 0.8.1) lograge (~> 0.11) ougai (~> 1.8) - bigdecimal (3.3.1) + bigdecimal (4.1.2) bootsnap (1.9.1) msgpack (~> 1.0) bootstrap (5.1.0) autoprefixer-rails (>= 9.1.0) popper_js (>= 2.9.3, < 3) sassc-rails (>= 2.0.0) - brakeman (4.10.1) + brakeman (8.0.5) + racc builder (3.3.0) - bundler-audit (0.9.0.1) - bundler (>= 1.2.0, < 3) + bundler-audit (0.9.3) + bundler (>= 1.2.0) thor (~> 1.0) capybara (3.40.0) addressable @@ -121,16 +125,17 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) colorize (0.8.1) - concurrent-ruby (1.3.5) - connection_pool (2.5.4) + concurrent-ruby (1.3.7) + connection_pool (3.0.2) crack (0.4.5) rexml - crass (1.0.6) + crass (1.0.7) + csv (3.3.5) database_cleaner-active_record (2.2.1) activerecord (>= 5.a) database_cleaner-core (~> 2.0.0) database_cleaner-core (2.0.1) - date (3.5.0) + date (3.5.1) diff-lcs (1.4.4) docile (1.4.0) drb (2.2.3) @@ -143,16 +148,17 @@ GEM factory_bot (~> 6.5) railties (>= 6.1.0) ffi (1.15.4) - globalid (1.3.0) + globalid (1.4.0) activesupport (>= 6.1) hashdiff (1.0.1) hashie (5.1.0) logger - i18n (1.14.7) + i18n (1.15.2) concurrent-ruby (~> 1.0) - io-console (0.8.1) - irb (1.15.2) + io-console (0.8.2) + irb (1.18.0) pp (>= 0.6.0) + prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) json (2.9.0) @@ -175,10 +181,10 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.24.1) + loofah (2.25.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.9.0) + mail (2.9.1) logger mini_mime (>= 0.1.1) net-imap @@ -187,10 +193,11 @@ GEM marcel (1.2.1) matrix (0.4.2) mini_mime (1.1.5) - mini_portile2 (2.8.9) - minitest (5.26.0) + minitest (6.0.6) + drb (~> 2.0) + prism (~> 1.5) msgpack (1.7.5) - net-imap (0.6.4) + net-imap (0.6.4.1) date net-protocol net-pop (0.1.2) @@ -200,18 +207,17 @@ GEM net-smtp (0.5.1) net-protocol nio4r (2.7.5) - nokogiri (1.19.3) - mini_portile2 (~> 2.8.2) + nokogiri (1.19.4-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.19.3-aarch64-linux-gnu) + nokogiri (1.19.4-arm64-darwin) racc (~> 1.4) - nokogiri (1.19.3-arm64-darwin) + nokogiri (1.19.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.19.3-x86_64-darwin) + nokogiri (1.19.4-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.19.3-x86_64-linux-musl) + nokogiri (1.19.4-x86_64-linux-musl) racc (~> 1.4) - oj (3.16.8) + oj (3.17.3) bigdecimal (>= 3.0) ostruct (>= 0.2) okcomputer (1.19.1) @@ -219,11 +225,11 @@ GEM omniauth (1.9.2) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - ostruct (0.6.1) + ostruct (0.6.3) ougai (1.9.1) oj (~> 3.10) - paper_trail (16.0.0) - activerecord (>= 6.1) + paper_trail (17.0.0) + activerecord (>= 7.1) request_store (~> 1.4) parallel (1.26.3) parser (3.3.6.0) @@ -234,14 +240,12 @@ GEM activerecord (>= 6.1) activesupport (>= 6.1) popper_js (2.9.3) - pp (0.6.3) + pp (0.6.4) prettyprint prettyprint (0.2.0) - psych (5.2.6) - date - stringio + prism (1.9.0) public_suffix (7.0.5) - puma (7.2.0) + puma (7.2.1) nio4r (~> 2.0) puma-plugin-delayed_stop (0.1.2) puma (>= 5.0, < 8) @@ -256,30 +260,30 @@ GEM rackup (1.0.1) rack (< 3) webrick - 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 nokogiri (>= 1.6) - rails-html-sanitizer (1.6.2) - loofah (~> 2.21) + rails-html-sanitizer (1.7.0) + loofah (~> 2.25) 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) - 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) @@ -287,13 +291,18 @@ GEM tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.1) - rdoc (6.15.1) + rake (13.4.2) + rbs (4.0.3) + logger + prism (>= 1.6.0) + tsort + rdoc (8.0.0) erb - psych (>= 4.0.0) + prism (>= 1.6.0) + rbs (>= 4.0.0) tsort regexp_parser (2.9.3) - reline (0.6.2) + reline (0.6.3) io-console (~> 0.5) request_store (1.5.0) rack (>= 1.4) @@ -376,11 +385,10 @@ GEM actionpack (>= 6.1) activesupport (>= 6.1) sprockets (>= 3.0.0) - stringio (3.1.7) - thor (1.4.0) + thor (1.5.0) tilt (2.0.10) timecop (0.9.10) - timeout (0.4.4) + timeout (0.6.1) tsort (0.2.0) typesafe_enum (0.3.0) tzinfo (2.0.6) @@ -388,7 +396,7 @@ GEM unicode-display_width (3.1.2) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.1.0) + uri (1.1.1) useragent (0.16.11) webmock (3.14.0) addressable (>= 2.8.0) @@ -399,21 +407,22 @@ GEM rack-proxy (>= 0.6.1) railties (>= 5.2) semantic_range (>= 2.3.0) - webrick (1.9.1) + webrick (1.9.2) websocket (1.2.11) - websocket-driver (0.8.0) + websocket-driver (0.8.2) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.3) + zeitwerk (2.8.2) PLATFORMS aarch64-linux arm64-darwin-21 - ruby + arm64-darwin-24 x86_64-darwin-19 + x86_64-linux x86_64-linux-musl DEPENDENCIES @@ -422,22 +431,23 @@ DEPENDENCIES berkeley_library-logging (~> 0.2, >= 0.2.5) bootsnap (>= 1.4.2) bootstrap - brakeman (~> 4.8) + brakeman (~> 8.0) bundler-audit capybara (~> 3.36) colorize + csv database_cleaner-active_record (~> 2.1) factory_bot_rails kaminari lograge (>= 0.11.2) okcomputer (~> 1.19) omniauth-cas! - paper_trail (~> 16.0) + paper_trail (~> 17.0) pg pg_search puma (~> 7.2) puma-plugin-delayed_stop (~> 0.1.2) - rails (~> 8.0.5) + rails (~> 8.1.3) rspec (~> 3.10) rspec-rails (~> 6.1.0) rspec_junit_formatter (~> 0.4.1) @@ -454,7 +464,7 @@ DEPENDENCIES webpacker (~> 5.4) RUBY VERSION - ruby 3.3.6p108 + ruby 3.4.10 BUNDLED WITH - 2.5.23 + 4.0.15 diff --git a/bin/bundler-audit b/bin/bundler-audit new file mode 100755 index 0000000..e2ef226 --- /dev/null +++ b/bin/bundler-audit @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "bundler/audit/cli" + +ARGV.concat %w[ --config config/bundler-audit.yml ] if ARGV.empty? || ARGV.include?("check") +Bundler::Audit::CLI.start diff --git a/bin/ci b/bin/ci new file mode 100755 index 0000000..4137ad5 --- /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 40330c0..5a20504 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 1c6eb10..a27a762 100755 --- a/bin/setup +++ b/bin/setup @@ -23,6 +23,7 @@ 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' diff --git a/config/application.rb b/config/application.rb index 1f0ebc5..5a4cd5b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -20,7 +20,7 @@ module LostAndFound class Application < Rails::Application # 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. diff --git a/config/bundler-audit.yml b/config/bundler-audit.yml new file mode 100644 index 0000000..a75b11a --- /dev/null +++ b/config/bundler-audit.yml @@ -0,0 +1,5 @@ +# Audit all gems listed in the Gemfile for known security problems by running bin/bundler-audit. +# CVEs that are not relevant to the application can be enumerated on the ignore list below. + +ignore: + - CVE-2015-9284 diff --git a/config/ci.rb b/config/ci.rb new file mode 100644 index 0000000..f0bb2b8 --- /dev/null +++ b/config/ci.rb @@ -0,0 +1,19 @@ +# Run using bin/ci + +CI.run do + step 'Setup', 'bin/setup --skip-server' + + step 'Style: Ruby', 'bin/rubocop' + + step 'Security: Gem audit', 'bin/bundler-audit' + step 'Security: Importmap vulnerability audit', 'bin/importmap audit' + step 'Security: Brakeman code analysis', 'bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error' + + # 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 9c92cb2..77b9676 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -46,6 +46,9 @@ # 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 + # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true diff --git a/config/environments/production.rb b/config/environments/production.rb index cbecbd2..51ee9b3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,9 +22,6 @@ config.public_file_server.enabled = ActiveModel::Type::Boolean.new.cast(ENV.fetch('RAILS_SERVE_STATIC_FILES', 'false')) - # 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" diff --git a/config/environments/test.rb b/config/environments/test.rb index cab6665..bed8e82 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -18,7 +18,6 @@ config.eager_load = ActiveModel::Type::Boolean.new.cast(ENV.fetch('CI', 'false')) # Configure public file server for tests with Cache-Control for performance. - config.public_file_server.enabled = true config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' } # Show full error reports. diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 35ab3fd..74b18c5 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -22,6 +22,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 da3be91..9dba48e 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -5,4 +5,4 @@ # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. # Use this to limit dissemination of sensitive information. # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. -Rails.application.config.filter_parameters += %i[passw secret token _key crypt salt certificate otp ssn] +Rails.application.config.filter_parameters += %i[passw secret token _key crypt salt certificate otp ssn cvv cvc] diff --git a/public/400.html b/public/400.html index 282dbc8..640de03 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.

diff --git a/public/406-unsupported-browser.html b/public/406-unsupported-browser.html index 7cf1e16..43d2811 100644 --- a/public/406-unsupported-browser.html +++ b/public/406-unsupported-browser.html @@ -1,66 +1,135 @@ - - - - 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 c08eac0..f12fb4a 100644 --- a/public/422.html +++ b/public/422.html @@ -1,67 +1,135 @@ - - - - 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 (422 Unprocessable Entity) + + + + + + + + + + + + + +
+
+ +
+
+

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.

+
+
+ + + diff --git a/public/icon.png b/public/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c4c9dbfbbd2f7c1421ffd5727188146213abbcef GIT binary patch literal 4166 zcmd6qU;WFw?|v@m)Sk^&NvB8tcujdV-r1b=i(NJxn&7{KTb zX$3(M+3TP2o^#KAo{#tIjl&t~(8D-k004kqPglzn0HFG(Q~(I*AKsD#M*g7!XK0T7 zN6P7j>HcT8rZgKl$v!xr806dyN19Bd4C0x_R*I-a?#zsTvb_89cyhuC&T**i|Rc zq5b8M;+{8KvoJ~uj9`u~d_f6`V&3+&ZX9x5pc8s)d175;@pjm(?dapmBcm0&vl9+W zx1ZD2o^nuyUHWj|^A8r>lUorO`wFF;>9XL-Jy!P}UXC{(z!FO%SH~8k`#|9;Q|eue zqWL0^Bp(fg_+Pkm!fDKRSY;+^@BF?AJE zCUWpXPst~hi_~u)SzYBDZroR+Z4xeHIlm_3Yc_9nZ(o_gg!jDgVa=E}Y8uDgem9`b zf=mfJ_@(BXSkW53B)F2s!&?_R4ptb1fYXlF++@vPhd=marQgEGRZS@B4g1Mu?euknL= z67P~tZ?*>-Hmi7GwlisNHHJDku-dSm7g@!=a}9cSL6Pa^w^2?&?$Oi8ibrr>w)xqx zOH_EMU@m05)9kuNR>>4@H%|){U$^yvVQ(YgOlh;5oU_-vivG-p4=LrN-k7D?*?u1u zsWly%tfAzKd6Fb=`eU2un_uaTXmcT#tlOL+aRS=kZZf}A7qT8lvcTx~7j` z*b>=z)mwg7%B2_!D0!1IZ?Nq{^Y$uI4Qx*6T!E2Col&2{k?ImCO=dD~A&9f9diXy^$x{6CwkBimn|1E09 zAMSezYtiL?O6hS37KpvDM?22&d{l)7h-!F)C-d3j8Z`c@($?mfd{R82)H>Qe`h{~G z!I}(2j(|49{LR?w4Jspl_i!(4T{31|dqCOpI52r5NhxYV+cDAu(xp*4iqZ2e-$YP= zoFOPmm|u*7C?S{Fp43y+V;>~@FFR76bCl@pTtyB93vNWy5yf;HKr8^0d7&GVIslYm z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*Xgn9~3N literal 0 HcmV?d00001 diff --git a/public/icon.svg b/public/icon.svg new file mode 100644 index 0000000..04b34bf --- /dev/null +++ b/public/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/spec/models/item_csv_import_spec.rb b/spec/models/item_csv_import_spec.rb index 23447b9..2ad378b 100644 --- a/spec/models/item_csv_import_spec.rb +++ b/spec/models/item_csv_import_spec.rb @@ -41,7 +41,7 @@ end it 'omits perfect duplicates from the output' do - Item.create!(**dupe_opts, id: 9002) + Item.create!(**dupe_opts, id: 9_002) subject.import! @@ -59,8 +59,8 @@ end it 'identifies duplicates with alternate IDs' do - Item.create!(**dupe_opts, id: 90001) - Item.create!(**dupe_opts, id: 90002) + Item.create!(**dupe_opts, id: 90_001) + Item.create!(**dupe_opts, id: 90_002) subject.import! diff --git a/spec/system/admin_system_spec.rb b/spec/system/admin_system_spec.rb index de867c2..dace6c7 100644 --- a/spec/system/admin_system_spec.rb +++ b/spec/system/admin_system_spec.rb @@ -91,7 +91,7 @@ end it 'allows adding users' do - uid = 5551211 + uid = 5_551_211 name = 'Paige J. Poe' role = 'Staff' @@ -123,7 +123,7 @@ it 'requires a name' do user_count = User.count - uid = 5551211 + uid = 5_551_211 role = 'Staff' fill_in('uid', with: uid.to_s, fill_options: { clear: :backspace })