From f0c6ade3daf904e1ef76589035cd09d7aaa1d382 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 22 Oct 2025 18:32:22 +0100 Subject: [PATCH 01/39] chore: tweaks test logging defaults - Sets log level from environment with 'info' default - Initialises structured logger only when level is debug - Applies log level before logger setup for correctness - Removes duplicate log level configuration --- config/environments/test.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 6c9115c..7167ded 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -36,15 +36,18 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr + # Set the log level to the value of the LOG_LEVEL environment variable, or 'info' if not set + config.log_level = ENV.fetch('LOG_LEVEL', 'info').to_sym + # Tag rails logs with useful information config.log_tags = %i[subdomain request_id request_method] + # When sync mode is true, all output is immediately flushed to the underlying # operating system and is not buffered by Ruby internally. $stdout.sync = true + # Log the stdout output to the Epimorphics JSON logging gem - config.logger = JsonRailsLogger::Logger.new($stdout) - # Set the log level to the value of the LOG_LEVEL environment variable, or 'debug' by default - config.log_level = ENV.fetch('LOG_LEVEL', 'debug').to_sym + config.logger = JsonRailsLogger::Logger.new($stdout) if config.log_level == :debug # API location can be specified in the environment # But defaults to the dev service From 52e6e8b195f61f68bd032ed6008c50c399878973 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Wed, 22 Oct 2025 18:33:08 +0100 Subject: [PATCH 02/39] build: updates dependency manager version --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 476f44a..79fa178 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -572,4 +572,4 @@ DEPENDENCIES yajl-ruby BUNDLED WITH - 2.6.9 + 2.7.2 From 2f6833a4b7d72f52578dba2b693d7a7e5c25f476 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Thu, 23 Oct 2025 09:05:12 +0100 Subject: [PATCH 03/39] chore: update and reformat changelog document - Standardises release notes and version histories - Switches to a more structured markdown changelog format - Removes previous ad hoc notes in favour of consistent entries --- CHANGELOG.md | 152 ++++++++++++++++++++++++++++++++------------------- 1 file changed, 97 insertions(+), 55 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62f8ca0..19957da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,99 +1,141 @@ -# HMLR PPD explorer +# Changelog -This app allows the user to explore HMLR price-paid open linked data. +All notable changes to this project will be documented in this file. -## Changelog +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## [Unreleased] -## 2.2.2 - 2025-08 +## [2.2.2] - 2025-08 + +### Changed - Updated LR Common Styles gem to continue to address security issues -## 2.2.1 - 2025-08 +## [2.2.1] - 2025-08 + +### Changed + +- Adjusted dependencies to new versions including rails +- Updated gems like rexml, jbuilder, and puma +- Modified lockfile to reflect dependency changes +- Modified CSV handling to add newline after headers +- Updated styles for download option layout + +### Added + +- Added documentation for Git hook automation tasks -- Adjusts dependencies to new versions including rails -- Updates gems like rexml, jbuilder, and puma -- Modifies lockfile to reflect dependency changes -- Modify CSV handling to add newline after headers -- Update styles for download option layout -- Add documentation for Git hook automation tasks +## [2.2.0] - 2025-08 -### 2.2.0 - 2025-08 +### Changed -- Update several Ruby gems for better security and performance -- Fix Rubocop plugin configuration to resolve misconfiguration -- Enhance HTML with clickable footnotes and smooth scrolling -- Refactor Docker run commands to use Makefile targets -- Reorganise Makefile for clearer asset management +- Updated several Ruby gems for better security and performance +- Enhanced HTML with clickable footnotes and smooth scrolling +- Refactored Docker run commands to use Makefile targets +- Reorganised Makefile for clearer asset management -## 2.1.0 - 2025-07 +### Fixed + +- Fixed Rubocop plugin configuration to resolve misconfiguration + +## [2.1.0] - 2025-07 + +### Changed - Updated the Ruby version from 3.3.5 to 3.4.4 and the Alpine version from 3.20 - to 3.22. -- Introduced EnvironmentHelper module to standardise environment-specific UI - display. + to 3.22 - Enhanced Docker setup by incorporating a more organised building process and - additional dependencies. + additional dependencies - Adjusted HTML structure for modal presentation and cleaned up modal-related - markup. + markup -## 2.0.4 - 2025-06 - HOTFIX +### Added + +- Introduced EnvironmentHelper module to standardise environment-specific UI + display + +## [2.0.4] - 2025-06 + +### Security - Introduced new method sanitise for HTML input sanitisation and replaced occurrences of sanitize with strip_tags in views to prevent potential XSS - vulnerabilities. + vulnerabilities [GH-280](https://github.com/epimorphics/ppd-explorer/issues/280) -- Refactor error handling for consistent status processing -- Update configuration to align comment patterns and quotes use -- Add development gems for improved tooling, adjust gem strategy -## 2.0.3 - 2025-04 +### Changed + +- Refactored error handling for consistent status processing +- Updated configuration to align comment patterns and quotes use +- Added development gems for improved tooling, adjusted gem strategy + +## [2.0.3] - 2025-04 + +### Changed + +- Updated dependencies for enhanced performance and security +- Improved error handling with Sentry integration and clearer logging +- Enhanced semantic meaning in modal footer markup + +## [2.0.2] - 2025-03 -- Updates dependencies for enhanced performance and security. -- Improved error handling with Sentry integration and clearer logging. -- Enhanced semantic meaning in modal footer markup. +### Added -## 2.0.2 - 2025-03 +- Added `rubocop-rails` plugin to `.rubocop.yml` +- Added logging helper for API requests +- Added ability to set log level config from environment variable +- Added pre-commit and pre-push hooks + +### Changed - Enhanced `Sentry` configuration setup - Enhanced `load_query_result` with logging - Enhanced error handling in `save_results` method -- Added `rubocop-rails` plugin to `.rubocop.yml` - Improved logging level where applicable - Updated logging methods for better clarity -- Added logging helper for API requests - Updated Gemfile dependencies - Updated timezone handling in config - Updated boot info logging for Rails compatibility -- Added ability to set log level config from environment variable -- Removed sunset google plusone reference - Updated GitHub workflow versions to v2 -- Added pre-commit and pre-push hooks -## 2.0.1 - 2024-12 +### Removed + +- Removed sunset google plusone reference + +## [2.0.1] - 2024-12 + +### Fixed -- (Jon) Updated the error template path to use `Rails.public_path` as well as - contain the `html` extension to ensure the correct template is rendered -- (Jon) Improves error metrics reporting to ensure that logging always happens - with the appropriate severity depending on the exception status while reducing - the types of errors that can trigger a an error metric and therefore a +- Updated the error template path to use `Rails.public_path` as well as contain + the `html` extension to ensure the correct template is rendered +- Improved error metrics reporting to ensure that logging always happens with + the appropriate severity depending on the exception status while reducing the + types of errors that can trigger a an error metric and therefore a notification in slack [GH-149](https://github.com/epimorphics/hmlr-linked-data/issues/149) -- (Jon) Added catch for missing `SENTRY_API_KEY` env var to `entrypoint.sh` for - docker build -- (Jon) Updated target status level to trigger internal error metrics to 500 - status codes only in the `search_controller` -- (Jon) Added `message`, `status`, and `type` arguments to be logged by the +- Updated target status level to trigger internal error metrics to 500 status + codes only in the `search_controller` + +### Added + +- Added catch for missing `SENTRY_API_KEY` env var to `entrypoint.sh` for docker + build +- Added `message`, `status`, and `type` arguments to be logged by the `json_rails_logger` gem for respective error responses in the `search_controller` -## 2.0.0 - 2024-11 +## [2.0.0] - 2024-11 + +### Changed + +- Updated all gems by regenerating `Gemfile.lock` + - Upgraded alpine to `3.20` + - Upgraded rails to `7.2.2` + - Upgraded ruby to `3.3.5` -- (Bogdan) Updated all gems by regenerating `Gemfile.lock` -- (Bogdan) Upgraded alpine to `3.20` -- (Bogdan) Upgraded rails to `7.2.2` -- (Bogdan) Upgraded ruby to `3.3.5` +--- ## 1.8.0 - 2024-10 From fc2b9769b84ca792a7a28b0ab0f960c6239e890c Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Thu, 23 Oct 2025 09:51:10 +0100 Subject: [PATCH 04/39] chore: update test logging to respect log level - Adjusts test environment to display fewer logs unless debugging - Ensures test logging respects configured log level for clarity - Helps reduce noise during standard test runs --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19957da..068858a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Adjusted test logging to respect log level and reduce logs displayed unless debugging + ## [2.2.2] - 2025-08 ### Changed From 1f55e96b117c8ce8183705769c8515a660761533 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:22:52 +0000 Subject: [PATCH 05/39] chore: relax faraday gem version constraints - Change constrained versions to minimum versions - Update configuration to allow more flexible dependency selection --- Gemfile | 6 +++--- Gemfile.lock | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 21bb490..60c6892 100644 --- a/Gemfile +++ b/Gemfile @@ -23,9 +23,9 @@ gem 'rubocop' gem 'rubocop-rails' gem 'faraday', '~> 2.13' -gem 'faraday-encoding', '~> 0.0.6' -gem 'faraday-follow_redirects', '~> 0.3.0' -gem 'faraday-retry', '~> 2.0' +gem 'faraday-encoding', '>= 0.0.6' +gem 'faraday-follow_redirects', '>= 0.3.0' +gem 'faraday-retry', '>= 2.0' gem 'font-awesome-rails' gem 'get_process_mem' diff --git a/Gemfile.lock b/Gemfile.lock index 79fa178..af925a6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -529,9 +529,9 @@ DEPENDENCIES dotenv execjs faraday (~> 2.13) - faraday-encoding (~> 0.0.6) - faraday-follow_redirects (~> 0.3.0) - faraday-retry (~> 2.0) + faraday-encoding (>= 0.0.6) + faraday-follow_redirects (>= 0.3.0) + faraday-retry (>= 2.0) flamegraph font-awesome-rails get_process_mem From aa776bd9fd01c12c9f34ae0a0402f477c160d4c2 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:23:33 +0000 Subject: [PATCH 06/39] chore: upgrade major framework and related gems - Bump major and minor versions of the primary framework and its core dependencies - Update all direct and transitive dependencies to match new framework requirements - Add a new direct dependency in the stack as required by dependencies - Cover all parts of the framework: core, storage, job, view, text, and support - Update development tool versions for compatibility - Synchronise downstream dependency versions to prevent mismatches - Change compatibility constraints for testing gems to fit new versions --- Gemfile.lock | 117 +++++++++++++++++++++++++++------------------------ 1 file changed, 61 insertions(+), 56 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index af925a6..ced82c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,29 +10,31 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (8.0.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.1) + action_text-trix (2.1.15) + railties + actioncable (8.1.1) + actionpack (= 8.1.1) + activesupport (= 8.1.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionmailbox (8.1.1) + actionpack (= 8.1.1) + activejob (= 8.1.1) + activerecord (= 8.1.1) + activestorage (= 8.1.1) + activesupport (= 8.1.1) mail (>= 2.8.0) - actionmailer (8.0.2.1) - actionpack (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionmailer (8.1.1) + actionpack (= 8.1.1) + actionview (= 8.1.1) + activejob (= 8.1.1) + activesupport (= 8.1.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (8.0.2.1) - actionview (= 8.0.2.1) - activesupport (= 8.0.2.1) + actionpack (8.1.1) + actionview (= 8.1.1) + activesupport (= 8.1.1) 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.2.1) - actionpack (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + actiontext (8.1.1) + action_text-trix (~> 2.1.15) + actionpack (= 8.1.1) + activerecord (= 8.1.1) + activestorage (= 8.1.1) + activesupport (= 8.1.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (8.0.2.1) - activesupport (= 8.0.2.1) + actionview (8.1.1) + activesupport (= 8.1.1) builder (~> 3.1) erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - activejob (8.0.2.1) - activesupport (= 8.0.2.1) + activejob (8.1.1) + activesupport (= 8.1.1) globalid (>= 0.3.6) - activemodel (8.0.2.1) - activesupport (= 8.0.2.1) - activerecord (8.0.2.1) - activemodel (= 8.0.2.1) - activesupport (= 8.0.2.1) + activemodel (8.1.1) + activesupport (= 8.1.1) + activerecord (8.1.1) + activemodel (= 8.1.1) + activesupport (= 8.1.1) timeout (>= 0.4.0) - activestorage (8.0.2.1) - actionpack (= 8.0.2.1) - activejob (= 8.0.2.1) - activerecord (= 8.0.2.1) - activesupport (= 8.0.2.1) + activestorage (8.1.1) + actionpack (= 8.1.1) + activejob (= 8.1.1) + activerecord (= 8.1.1) + activesupport (= 8.1.1) marcel (~> 1.0) - activesupport (8.0.2.1) + activesupport (8.1.1) 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) @@ -306,20 +309,20 @@ GEM rack (>= 1.3) rackup (2.2.1) rack (>= 3) - rails (8.0.2.1) - actioncable (= 8.0.2.1) - actionmailbox (= 8.0.2.1) - actionmailer (= 8.0.2.1) - actionpack (= 8.0.2.1) - actiontext (= 8.0.2.1) - actionview (= 8.0.2.1) - activejob (= 8.0.2.1) - activemodel (= 8.0.2.1) - activerecord (= 8.0.2.1) - activestorage (= 8.0.2.1) - activesupport (= 8.0.2.1) + rails (8.1.1) + actioncable (= 8.1.1) + actionmailbox (= 8.1.1) + actionmailer (= 8.1.1) + actionpack (= 8.1.1) + actiontext (= 8.1.1) + actionview (= 8.1.1) + activejob (= 8.1.1) + activemodel (= 8.1.1) + activerecord (= 8.1.1) + activestorage (= 8.1.1) + activesupport (= 8.1.1) bundler (>= 1.15.0) - railties (= 8.0.2.1) + railties (= 8.1.1) rails-dom-testing (2.3.0) activesupport (>= 5.0.0) minitest @@ -327,25 +330,27 @@ GEM rails-html-sanitizer (1.6.2) loofah (~> 2.21) 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.2.1) - actionpack (= 8.0.2.1) - activesupport (= 8.0.2.1) + railties (8.1.1) + actionpack (= 8.1.1) + activesupport (= 8.1.1) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.3.0) + rake (13.3.1) rb-fsevent (0.11.2) rb-inotify (0.11.1) ffi (~> 1.0) rb-readline (0.5.5) rbs (3.6.1) logger - rdoc (6.14.2) + rdoc (6.15.1) erb psych (>= 4.0.0) + tsort regexp_parser (2.11.2) reline (0.6.2) io-console (~> 0.5) From 3a4a53838f70ffa59d8bdce281524a23fcda6578 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:23:34 +0000 Subject: [PATCH 07/39] chore: update general dependencies - Bump patch and minor versions for supporting libraries - Synchronise runtime, dev, and utility gems with upstream - Narrow compatibility range for styling and template packages - Lightly adjust the version of the core style library --- Gemfile.lock | 62 +++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ced82c8..be09324 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,8 +92,8 @@ GEM execjs (~> 2) backport (1.2.0) base64 (0.3.0) - benchmark (0.4.1) - bigdecimal (3.2.2) + benchmark (0.5.0) + bigdecimal (3.3.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) @@ -115,17 +115,17 @@ GEM capybara (>= 2) minitest (>= 4) concurrent-ruby (1.3.5) - connection_pool (2.5.3) + connection_pool (2.5.4) crack (1.0.0) bigdecimal rexml crass (1.0.6) - date (3.4.1) + date (3.5.0) diff-lcs (1.6.2) docile (1.4.1) dotenv (3.1.8) drb (2.2.3) - erb (5.0.2) + erb (5.1.3) erubi (1.13.1) execjs (2.10.0) faraday (2.13.4) @@ -154,7 +154,7 @@ GEM get_process_mem (1.0.0) bigdecimal (>= 2.0) ffi (~> 1.0) - globalid (1.2.1) + globalid (1.3.0) activesupport (>= 6.1) govuk_elements_rails (3.0.2) govuk_frontend_toolkit (>= 5.2.0) @@ -168,7 +168,7 @@ GEM temple (>= 0.8.2) thor tilt - haml-rails (2.1.0) + haml-rails (3.0.0) actionpack (>= 5.1) activesupport (>= 5.1) haml (>= 4.0.6) @@ -178,7 +178,7 @@ GEM i18n (1.14.7) concurrent-ruby (~> 1.0) io-console (0.8.1) - irb (1.15.2) + irb (1.15.3) pp (>= 0.6.0) rdoc (>= 4.0.0) reline (>= 0.4.2) @@ -217,21 +217,22 @@ GEM loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.8.1) + mail (2.9.0) + logger mini_mime (>= 0.1.1) net-imap net-pop net-smtp - marcel (1.0.4) + marcel (1.1.0) matrix (0.4.3) memory_profiler (1.1.0) mini_mime (1.1.5) minispec-metadata (2.0.0) minitest - minitest (5.25.5) - minitest-rails (8.0.0) + minitest (5.26.0) + minitest-rails (8.1.0) minitest (~> 5.20) - railties (>= 8.0.0, < 8.1.0) + railties (>= 8.1.0, < 8.2.0) minitest-reporters (1.7.1) ansi builder @@ -251,7 +252,7 @@ GEM railties (>= 4.0) net-http (0.6.0) uri - net-imap (0.5.9) + net-imap (0.5.12) date net-protocol net-pop (0.1.2) @@ -260,22 +261,22 @@ GEM timeout net-smtp (0.5.1) net-protocol - nio4r (2.7.4) - nokogiri (1.18.9-aarch64-linux-gnu) + nio4r (2.7.5) + nokogiri (1.18.10-aarch64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.9-aarch64-linux-musl) + nokogiri (1.18.10-aarch64-linux-musl) racc (~> 1.4) - nokogiri (1.18.9-arm-linux-gnu) + nokogiri (1.18.10-arm-linux-gnu) racc (~> 1.4) - nokogiri (1.18.9-arm-linux-musl) + nokogiri (1.18.10-arm-linux-musl) racc (~> 1.4) - nokogiri (1.18.9-arm64-darwin) + nokogiri (1.18.10-arm64-darwin) racc (~> 1.4) - nokogiri (1.18.9-x86_64-darwin) + nokogiri (1.18.10-x86_64-darwin) racc (~> 1.4) - nokogiri (1.18.9-x86_64-linux-gnu) + nokogiri (1.18.10-x86_64-linux-gnu) racc (~> 1.4) - nokogiri (1.18.9-x86_64-linux-musl) + nokogiri (1.18.10-x86_64-linux-musl) racc (~> 1.4) observer (0.1.2) ostruct (0.6.3) @@ -283,7 +284,7 @@ GEM parser (3.3.9.0) ast (~> 2.4.1) racc - pp (0.6.2) + pp (0.6.3) prettyprint prettyprint (0.2.0) prism (1.4.0) @@ -299,7 +300,7 @@ GEM prometheus-client (>= 0.10) puma (>= 6.0) racc (1.8.1) - rack (3.2.0) + rack (3.2.4) rack-contrib (2.5.0) rack (< 4) rack-session (2.1.1) @@ -453,13 +454,14 @@ GEM temple (0.10.4) thor (1.4.0) tilt (2.6.1) - timeout (0.4.3) + timeout (0.4.4) + tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (3.1.5) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) - uri (1.0.3) + uri (1.1.0) useragent (0.16.11) vcr (6.3.1) base64 @@ -498,18 +500,18 @@ GEM json lograge railties - lr_common_styles (2.3.0) + lr_common_styles (2.3.1) bootstrap-sass (~> 3.4.1) font-awesome-rails (~> 4.7.0) govuk_elements_rails (= 3.0.2) govuk_frontend_toolkit (~> 9.0) govuk_template (~> 0.26.0) - haml-rails (~> 2.1) + haml-rails (~> 3.0) jquery-rails (~> 4.6) lodash-rails (~> 4.17) modernizr-rails (~> 2.7) modulejs-rails (~> 2.2.0) - rails (~> 8.0.0) + rails (~> 8.0) sass-rails (~> 6.0) PLATFORMS From 4b094af2b9ef258426da8a6c510bc96b4e72f656 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:25:37 +0000 Subject: [PATCH 08/39] chore: bump faraday and dependencies - Update faraday to latest minor version - Ensure compatibility with updated faraday-net_http and logger - Keep deps current for improved functionality --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index be09324..4ba6907 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -128,7 +128,7 @@ GEM erb (5.1.3) erubi (1.13.1) execjs (2.10.0) - faraday (2.13.4) + faraday (2.14.0) faraday-net_http (>= 2.0, < 3.5) json logger From 9fd98148836b3149a4612e7cb4343a553207330d Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:25:37 +0000 Subject: [PATCH 09/39] chore: update json and net-http gems - Bump json gem to a newer version for nested data handling - Raise net-http gem version to latest patch - Follow security and performance improvements from upstream --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4ba6907..73b06b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -192,7 +192,7 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (8.0.0) railties (>= 3.2.16) - json (2.13.2) + json (2.15.2) json_expressions (0.9.0) kramdown (2.5.1) rexml (>= 3.3.9) @@ -250,7 +250,7 @@ GEM modernizr-rails (2.7.1) modulejs-rails (2.2.0.0) railties (>= 4.0) - net-http (0.6.0) + net-http (0.7.0) uri net-imap (0.5.12) date From 450ec69c8fe1f710321f29e984d0fd3afead93e7 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:28:26 +0000 Subject: [PATCH 10/39] chore: bump json_rails_logger version - Update logger dependency to the latest minor release - Improve compatibility and gain recent fixes - Prepare for potential new features from upstream --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 73b06b7..53f7443 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -496,7 +496,7 @@ GEM faraday-retry (~> 2.0) json (~> 2.0) yajl-ruby (~> 1.4) - json_rails_logger (2.0.6) + json_rails_logger (2.2.0) json lograge railties From 57def8951e5683765b036ef623ca9d77d0aea6fa Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:45:26 +0000 Subject: [PATCH 11/39] chore: remove unused minitest-capybara gem - Cleans up testing dependencies by dropping unnecessary gem - Simplifies test setup and reduces maintenance overhead --- Gemfile | 4 ++-- Gemfile.lock | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 60c6892..9757eb9 100644 --- a/Gemfile +++ b/Gemfile @@ -60,13 +60,13 @@ gem 'dotenv', groups: %i[development test] group :test do gem 'capybara' - gem 'capybara_minitest_spec' gem 'capybara-selenium' + gem 'csv' gem 'json_expressions' gem 'minitest-rails' gem 'minitest-reporters' gem 'minitest-spec-rails' - gem 'minitest-vcr' + gem 'minitest-vcr', require: false gem 'mocha' gem 'simplecov', require: false gem 'vcr' diff --git a/Gemfile.lock b/Gemfile.lock index 53f7443..65213e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -111,9 +111,6 @@ GEM capybara-selenium (0.0.6) capybara selenium-webdriver - capybara_minitest_spec (1.0.7) - capybara (>= 2) - minitest (>= 4) concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.0) @@ -531,7 +528,6 @@ DEPENDENCIES byebug capybara capybara-selenium - capybara_minitest_spec data_services_api! dotenv execjs From 48b65da5295d2e58ba982cd43dd4970e9b032a2f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:46:15 +0000 Subject: [PATCH 12/39] chore: add csv gem to dependencies - Include csv in the dependencies list - Update lockfile to reflect csv addition --- Gemfile.lock | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 65213e6..9ddeeae 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -117,6 +117,7 @@ GEM bigdecimal rexml crass (1.0.6) + csv (3.3.5) date (3.5.0) diff-lcs (1.6.2) docile (1.4.1) @@ -528,6 +529,7 @@ DEPENDENCIES byebug capybara capybara-selenium + csv data_services_api! dotenv execjs From 9b55c65d82ae42227aed2217f8076c305ee70497 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:46:16 +0000 Subject: [PATCH 13/39] test: use correct test superclass - Switch superclass to appropriate integration test base --- test/controllers/ppd_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/controllers/ppd_controller_test.rb b/test/controllers/ppd_controller_test.rb index 5cce613..19ea95f 100644 --- a/test/controllers/ppd_controller_test.rb +++ b/test/controllers/ppd_controller_test.rb @@ -2,7 +2,7 @@ require 'test_helper' -class PpdControllerTest < ActionController::IntegrationTest +class PpdControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end From 22223ec278ab36307a200157da0bc5a062d1641d Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:46:16 +0000 Subject: [PATCH 14/39] test: improve minitest and capybara integration - Restore MiniTest constant for compatibility - Explicitly require related support gem - Integrate capybara dsl into test base - Ensure capybara sessions reset after each test --- test/test_helper.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index d3fe0df..eec061a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -15,6 +15,13 @@ require 'minitest/rails' +# Fix compatibility with gems that expect the old MiniTest constant +# This needs to be set before requiring gems like minitest-vcr +MiniTest = Minitest unless defined?(MiniTest) + +# Now manually require minitest-vcr after setting up compatibility +require 'minitest-vcr' + require 'mocha/minitest' require 'json_expressions/minitest' require 'download_helpers' @@ -26,6 +33,18 @@ require 'minitest/reporters' Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new +# Include Capybara DSL in test classes +class ActionDispatch::IntegrationTest + include Capybara::DSL + include Capybara::Minitest::Assertions + + def teardown + super + Capybara.reset_sessions! + Capybara.use_default_driver + end +end + def params_object(params) ActionController::Parameters.new(params) end From 36071ad080a8a4373355c0b024e595724b0d4528 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:59:36 +0000 Subject: [PATCH 15/39] test: swap deprecated assertion for refute - Replace legacy negative assertions with standard refute - Use modern assertion syntax in specs for better consistency - Improve readability and future compatibility of tests --- test/lib/auto_extend_hash_test.rb | 16 ++++++++-------- test/models/aspect_test.rb | 4 ++-- test/models/user_preferences_test.rb | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/lib/auto_extend_hash_test.rb b/test/lib/auto_extend_hash_test.rb index e9f5874..b86de4e 100644 --- a/test/lib/auto_extend_hash_test.rb +++ b/test/lib/auto_extend_hash_test.rb @@ -12,7 +12,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase it 'should create a hash that auto-extends' do auto_hash = AutoExtendHash.new - assert_not auto_hash.key?(:foo) + refute auto_hash.key?(:foo) _(auto_hash[:foo]).wont_be_nil assert auto_hash.key?(:foo) end @@ -22,7 +22,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase it 'should allow assignment to a new key like a normal hash' do auto_hash = AutoExtendHash.new - assert_not auto_hash.key?(:foo) + refute auto_hash.key?(:foo) auto_hash[:foo] = :bar assert auto_hash.key?(:foo) _(auto_hash[:foo]).must_equal :bar @@ -40,12 +40,12 @@ class AutoExtendHashTest < ActiveSupport::TestCase it 'should allow an existing hash to be converted to auto-extend behaviour' do orig = {} - assert_not orig.key?(:foo) + refute orig.key?(:foo) orig[:foo] - assert_not orig.key?(:foo) + refute orig.key?(:foo) AutoExtendHash.auto_extend(orig) - assert_not orig.key?(:foo) + refute orig.key?(:foo) orig[:foo] assert orig.key?(:foo) end @@ -54,7 +54,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase orig = {} AutoExtendHash.auto_extend(orig) - assert_not orig.key?(:foo) + refute orig.key?(:foo) orig[:foo][:bar] = 'wombles' _(orig[:foo][:bar]).must_equal 'wombles' end @@ -63,7 +63,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase orig = { foo: {} } AutoExtendHash.auto_extend(orig) - assert_not orig[:foo].key?(:bar) + refute orig[:foo].key?(:bar) orig[:foo][:bar][:fubar] = 'wombles' _(orig[:foo][:bar][:fubar]).must_equal 'wombles' end @@ -72,7 +72,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase orig = Hash.new { |hash, key| hash[key] = :chewbacca } AutoExtendHash.auto_extend(orig) - assert_not orig.key?(:foo) + refute orig.key?(:foo) _(orig[:foo]).must_equal :chewbacca end end diff --git a/test/models/aspect_test.rb b/test/models/aspect_test.rb index c7bcfbf..ee77265 100644 --- a/test/models/aspect_test.rb +++ b/test/models/aspect_test.rb @@ -20,12 +20,12 @@ it 'should check just the key for presence in the parameters' do aspect = Aspect.new(:street, 'foo:bar') assert aspect.present?(UserPreferences.new(params_object('street' => 'bar'))) - assert_not aspect.present?(UserPreferences.new(params_object('town' => 'bar'))) + refute aspect.present?(UserPreferences.new(params_object('town' => 'bar'))) end it 'should not be present if all values are given' do aspect = Aspect.new(:street, 'foo:bar', values: %w[a b c]) - assert_not aspect.present?(UserPreferences.new(params_object('street' => %w[a b c]))) + refute aspect.present?(UserPreferences.new(params_object('street' => %w[a b c]))) end it 'should return a preference value' do diff --git a/test/models/user_preferences_test.rb b/test/models/user_preferences_test.rb index 568c040..ea73445 100644 --- a/test/models/user_preferences_test.rb +++ b/test/models/user_preferences_test.rb @@ -17,19 +17,19 @@ it 'should report a parameter as present, or not' do prefs = UserPreferences.new(params_object('street' => 'bar')) assert prefs.present?(:street) - assert_not prefs.present?(:town) + refute prefs.present?(:town) end it 'should report a parameter as present with a given value, or not' do prefs = UserPreferences.new(params_object('street' => 'bar')) assert prefs.present?(:street, 'bar') - assert_not prefs.present?(:street, 'blam') + refute prefs.present?(:street, 'blam') end it 'should report a parameter as present, with a list of values, or not' do prefs = UserPreferences.new(params_object('nb' => %w[true false])) assert prefs.present?(:nb, 'true') assert prefs.present?(:nb, 'false') - assert_not prefs.present?(:nb, 'flimflam') + refute prefs.present?(:nb, 'flimflam') end end From 007e0813cd936bec249428bf54b4ca3434e5f16b Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 11:59:36 +0000 Subject: [PATCH 16/39] test: update gem requires and helper setup - Defer require for select test gems for flexibility - Set up rails env and environment file loading earlier - Add compatibility alias for legacy minitest constant use - Add comments explaining ordering and intent in helpers - Require minitest-vcr and minitest/spec in setup --- Gemfile | 4 ++-- test/test_helper.rb | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 9757eb9..db4fe54 100644 --- a/Gemfile +++ b/Gemfile @@ -63,9 +63,9 @@ group :test do gem 'capybara-selenium' gem 'csv' gem 'json_expressions' - gem 'minitest-rails' + gem 'minitest-rails', require: false gem 'minitest-reporters' - gem 'minitest-spec-rails' + gem 'minitest-spec-rails', require: false gem 'minitest-vcr', require: false gem 'mocha' gem 'simplecov', require: false diff --git a/test/test_helper.rb b/test/test_helper.rb index eec061a..492eb8c 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,6 +2,8 @@ # ActiveSupport::TestCase < Minitest::Test # In your test_helper.rb you must have require "rails/test_help" +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../config/environment', __dir__) require 'rails/test_help' require 'simplecov' @@ -10,10 +12,16 @@ add_filter '/config/' end -ENV['RAILS_ENV'] ||= 'test' -require File.expand_path('../config/environment', __dir__) +# Fix compatibility with gems that expect the old MiniTest constant +# This needs to be set before requiring any minitest gems +MiniTest = Minitest unless defined?(MiniTest) +# Require minitest gems carefully to avoid conflicts require 'minitest/rails' +require 'minitest-vcr' + +# Load spec functionality without conflicting parallelize support +require 'minitest/spec' # Fix compatibility with gems that expect the old MiniTest constant # This needs to be set before requiring gems like minitest-vcr From c43c6d40f3be1c566ae8cbde0e46c2655996e25a Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:04:21 +0000 Subject: [PATCH 17/39] test: refactor array assertion style in controller tests - Switches from specialised assertion helpers to standard assertion macros - Updates CSV array type and length checks to use assert_kind_of and assert_operator - Makes assertions more consistent and less reliant on framework-specific syntax --- test/controllers/ppd_data_controller_test.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/controllers/ppd_data_controller_test.rb b/test/controllers/ppd_data_controller_test.rb index 952f8dd..8a4a75d 100644 --- a/test/controllers/ppd_data_controller_test.rb +++ b/test/controllers/ppd_data_controller_test.rb @@ -36,9 +36,9 @@ class PpdDataControllerTest < ActionDispatch::IntegrationTest download_file = File.new(DownloadHelpers.download) assert File.exist?(download_file) csv = CSV.read(download_file) - _(csv).must_be_kind_of Array - _(csv.first).must_be_kind_of Array - _(csv.length).must_be :>, 10 + assert_kind_of Array, csv + assert_kind_of Array, csv.first + assert_operator csv.length, :>, 10 end end @@ -53,12 +53,12 @@ class PpdDataControllerTest < ActionDispatch::IntegrationTest download_file = File.new(DownloadHelpers.download) assert File.exist?(download_file) csv = CSV.read(download_file) - _(csv).must_be_kind_of Array - _(csv.first).must_be_kind_of Array - _(csv.length).must_be :>, 10 + assert_kind_of Array, csv + assert_kind_of Array, csv.first + assert_operator csv.length, :>, 10 headers = csv.first - _(headers.first).must_equal 'unique_id' + assert_equal 'unique_id', headers.first end end @@ -76,9 +76,9 @@ class PpdDataControllerTest < ActionDispatch::IntegrationTest download_file = File.new(DownloadHelpers.download) csv = CSV.read(download_file) - _(csv).must_be_kind_of Array - _(csv.first).must_be_kind_of Array - _(csv.length).must_be :>, 1000 + assert_kind_of Array, csv + assert_kind_of Array, csv.first + assert_operator csv.length, :>, 1000 end end end From 97e5a9461c5f876e7b6c00b23d323f54c1d7c01d Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:04:21 +0000 Subject: [PATCH 18/39] test: unify expectation syntax in search feature tests - Changes expected values to argument-first order in equality assertions - Replaces 'must_equal' and 'must_be' helpers with assert_equal and assert_operator - Standardises core assertion approach --- test/controllers/search_controller_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/controllers/search_controller_test.rb b/test/controllers/search_controller_test.rb index 8746227..ec6a20f 100644 --- a/test/controllers/search_controller_test.rb +++ b/test/controllers/search_controller_test.rb @@ -22,12 +22,12 @@ class SearchControllerTest < ActionDispatch::IntegrationTest .summarise .match(/Showing (\d+) transactions \(from (\d*) or more matching transactions\) for (\d+) properties/) - _(query_command.size).must_equal 10 + assert_equal 10, query_command.size assert match - _(match[1].to_i).must_equal 10 - _(match[2].to_i).must_be(:>, 0) - _(match[3].to_i).must_be(:>, 0) + assert_equal 10, match[1].to_i + assert_operator match[2].to_i, :>, 0 + assert_operator match[3].to_i, :>, 0 end end end From a4191a6c0e57a151e973ff1e4bf77556e0c1d4df Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:04:21 +0000 Subject: [PATCH 19/39] test: modernise expectation syntax in hash extension tests - Updates all equality and nil assertions to standard macros - Changes from old-style helpers to assert_equal and refute_nil - Applies changes throughout multiple nested and default hash behaviour tests --- test/lib/auto_extend_hash_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/lib/auto_extend_hash_test.rb b/test/lib/auto_extend_hash_test.rb index b86de4e..4cf50b7 100644 --- a/test/lib/auto_extend_hash_test.rb +++ b/test/lib/auto_extend_hash_test.rb @@ -13,7 +13,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase auto_hash = AutoExtendHash.new refute auto_hash.key?(:foo) - _(auto_hash[:foo]).wont_be_nil + refute_nil auto_hash[:foo] assert auto_hash.key?(:foo) end end @@ -25,14 +25,14 @@ class AutoExtendHashTest < ActiveSupport::TestCase refute auto_hash.key?(:foo) auto_hash[:foo] = :bar assert auto_hash.key?(:foo) - _(auto_hash[:foo]).must_equal :bar + assert_equal :bar, auto_hash[:foo] end it 'should support nested accesses' do auto_hash = AutoExtendHash.new auto_hash[:foo][:fubar][:rabuf] = :bar - _(auto_hash[:foo][:fubar][:rabuf]).must_equal :bar + assert_equal :bar, auto_hash[:foo][:fubar][:rabuf] end end @@ -56,7 +56,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase refute orig.key?(:foo) orig[:foo][:bar] = 'wombles' - _(orig[:foo][:bar]).must_equal 'wombles' + assert_equal 'wombles', orig[:foo][:bar] end it 'should convert nested hashes to auto-extend' do @@ -65,7 +65,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase refute orig[:foo].key?(:bar) orig[:foo][:bar][:fubar] = 'wombles' - _(orig[:foo][:bar][:fubar]).must_equal 'wombles' + assert_equal 'wombles', orig[:foo][:bar][:fubar] end it 'should not change existing default_proc behaviour' do @@ -73,7 +73,7 @@ class AutoExtendHashTest < ActiveSupport::TestCase AutoExtendHash.auto_extend(orig) refute orig.key?(:foo) - _(orig[:foo]).must_equal :chewbacca + assert_equal :chewbacca, orig[:foo] end end end From b7027e9e5b465ad3d06876df3fc52722db8a42e7 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:08:15 +0000 Subject: [PATCH 20/39] chore: update puma server and metrics - Bump versions for performance and security - Increase version for puma to latest release - Update puma-metrics to match new dependency requirements - Ensure compatibility in requirements for both packages --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9ddeeae..6c6f742 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -292,11 +292,11 @@ GEM date stringio public_suffix (6.0.2) - puma (6.6.1) + puma (7.1.0) nio4r (~> 2.0) - puma-metrics (1.4.0) + puma-metrics (1.4.2) prometheus-client (>= 0.10) - puma (>= 6.0) + puma (>= 6, != 7.0.0) racc (1.8.1) rack (3.2.4) rack-contrib (2.5.0) From cc8fcb581ebbb7a2bf4ba60c73b3303ff51fd09c Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:30:10 +0000 Subject: [PATCH 21/39] chore: bump jquery-rails dependency for minor update - Updates a frontend library to the latest patch version - Ensures compatibility and includes minor bug fixes from upstream --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6c6f742..9e44613 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -184,7 +184,7 @@ GEM jbuilder (2.14.1) actionview (>= 7.0.0) activesupport (>= 7.0.0) - jquery-rails (4.6.0) + jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) From d1d6e193e5c375bd58e6780cee7110dd2badc816 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:31:37 +0000 Subject: [PATCH 22/39] chore: update Sentry library to latest version - Upgrades monitoring tools to address compatibility and security - Ensures better integration with current dependencies - Prepares for upcoming platform and library changes --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9e44613..65a1f44 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -407,10 +407,10 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sentry-rails (5.26.0) - railties (>= 5.0) - sentry-ruby (~> 5.26.0) - sentry-ruby (5.26.0) + sentry-rails (6.0.0) + railties (>= 5.2.0) + sentry-ruby (~> 6.0.0) + sentry-ruby (6.0.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) simplecov (0.22.0) From f9ad01e48c7b2e4bb1b30c17a323d4781fffd1fd Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:32:44 +0000 Subject: [PATCH 23/39] chore: update linting dependencies to resolve vulnerabilities - Updates several packages to newer versions for improved security - Addresses known vulnerabilities for compliance and stability - Enhances compatibility with latest dependency versions - Keeps development tools current and up to date --- Gemfile.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 65a1f44..d5971e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -279,13 +279,13 @@ GEM observer (0.1.2) ostruct (0.6.3) parallel (1.27.0) - parser (3.3.9.0) + parser (3.3.10.0) ast (~> 2.4.1) racc pp (0.6.3) prettyprint prettyprint (0.2.0) - prism (1.4.0) + prism (1.6.0) prometheus-client (4.2.5) base64 psych (5.2.6) @@ -350,7 +350,7 @@ GEM erb psych (>= 4.0.0) tsort - regexp_parser (2.11.2) + regexp_parser (2.11.3) reline (0.6.2) io-console (~> 0.5) request_store (1.7.0) @@ -358,7 +358,7 @@ GEM reverse_markdown (3.0.0) nokogiri rexml (3.4.2) - rubocop (1.80.0) + rubocop (1.81.7) json (~> 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -366,13 +366,13 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.9.3, < 3.0) - rubocop-ast (>= 1.46.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.46.0) + rubocop-ast (1.47.1) parser (>= 3.3.7.2) prism (~> 1.4) - rubocop-rails (2.33.3) + rubocop-rails (2.33.4) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) @@ -456,9 +456,9 @@ GEM tsort (0.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (3.1.5) - unicode-emoji (~> 4.0, >= 4.0.4) - unicode-emoji (4.0.4) + unicode-display_width (3.2.0) + unicode-emoji (~> 4.1) + unicode-emoji (4.1.0) uri (1.1.0) useragent (0.16.11) vcr (6.3.1) From 8eb509ff8c5c11ccebe6f49169b06a39808d1b97 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:34:32 +0000 Subject: [PATCH 24/39] chore: update test dependencies to address security issues - Bumps several dependencies to include latest security patches - Improves overall reliability by resolving known vulnerabilities - Keeps components in sync with supported upstream versions --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d5971e6..4f67486 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -113,7 +113,7 @@ GEM selenium-webdriver concurrent-ruby (1.3.5) connection_pool (2.5.4) - crack (1.0.0) + crack (1.0.1) bigdecimal rexml crass (1.0.6) @@ -171,7 +171,7 @@ GEM activesupport (>= 5.1) haml (>= 4.0.6) railties (>= 5.1) - hashdiff (1.2.0) + hashdiff (1.2.1) htmlbeautifier (1.4.3) i18n (1.14.7) concurrent-ruby (~> 1.0) @@ -357,7 +357,7 @@ GEM rack (>= 1.4) reverse_markdown (3.0.0) nokogiri - rexml (3.4.2) + rexml (3.4.4) rubocop (1.81.7) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -467,7 +467,7 @@ GEM nokogiri (~> 1.6) rubyzip (>= 1.3.0) selenium-webdriver (~> 4.0, < 4.11) - webmock (3.25.1) + webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) From a7c86d8b4feb1d39042635c5f89c858fc344be9b Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:35:56 +0000 Subject: [PATCH 25/39] chore: update lsp and tooling dependencies - Bumps language server and code analysis tool versions for latest features and fixes - Relaxes version constraint on type signature tool to enhance compatibility - Adds support utility for documentation - Prepares for improved compatibility and potential vulnerability fixes --- Gemfile.lock | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4f67486..3e0e678 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -344,7 +344,7 @@ GEM rb-inotify (0.11.1) ffi (~> 1.0) rb-readline (0.5.5) - rbs (3.6.1) + rbs (3.9.5) logger rdoc (6.15.1) erb @@ -378,7 +378,7 @@ GEM rack (>= 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0) - ruby-lsp (0.26.1) + ruby-lsp (0.26.2) language_server-protocol (~> 3.17.0) prism (>= 1.2, < 2.0) rbs (>= 3, < 5) @@ -419,7 +419,7 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - solargraph (0.56.2) + solargraph (0.57.0) backport (~> 1.2) benchmark (~> 0.4) bundler (~> 2.0) @@ -432,12 +432,13 @@ GEM ostruct (~> 0.6) parser (~> 3.0) prism (~> 1.4) - rbs (~> 3.6.1) + rbs (>= 3.6.1, <= 4.0.0.dev.4) reverse_markdown (~> 3.0) - rubocop (~> 1.38) + rubocop (~> 1.76) thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) + yard-activesupport-concern (~> 0.0) yard-solargraph (~> 0.1) sprockets (4.2.2) concurrent-ruby (~> 1.0) @@ -480,6 +481,8 @@ GEM nokogiri (~> 1.8) yajl-ruby (1.4.3) yard (0.9.37) + yard-activesupport-concern (0.0.1) + yard (>= 0.8) yard-solargraph (0.1.0) yard (~> 0.9) zeitwerk (2.7.3) From fee16331e413336a0852332992caddcd6a6636a8 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 12:37:30 +0000 Subject: [PATCH 26/39] chore: update dependency for improved compatibility - Bumps component version to ensure compatibility with other libraries - Addresses potential issues with outdated dependency - Prepares project for future updates and security patches --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e0e678..0af1d7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -162,7 +162,7 @@ GEM railties (>= 3.1.0) govuk_template (0.26.0) rails (>= 3.1) - haml (6.3.0) + haml (7.0.1) temple (>= 0.8.2) thor tilt From 4b2e1d5f5b3843dbcbecc2c46c4ff36559ab8b7f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 13:16:13 +0000 Subject: [PATCH 27/39] chore: update test dependencies and remove unused gems - Removes unused browser test and driver dependencies - Updates browser driver gems to latest versions - Streamlines test group for more reliable dependency management --- Gemfile | 3 +-- Gemfile.lock | 18 ++++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index db4fe54..0f3e692 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,6 @@ gem 'dotenv', groups: %i[development test] group :test do gem 'capybara' - gem 'capybara-selenium' gem 'csv' gem 'json_expressions' gem 'minitest-rails', require: false @@ -68,9 +67,9 @@ group :test do gem 'minitest-spec-rails', require: false gem 'minitest-vcr', require: false gem 'mocha' + gem 'selenium-webdriver' gem 'simplecov', require: false gem 'vcr' - gem 'webdrivers' gem 'webmock' end diff --git a/Gemfile.lock b/Gemfile.lock index 0af1d7c..952c67b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,9 +108,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-selenium (0.0.6) - capybara - selenium-webdriver concurrent-ruby (1.3.5) connection_pool (2.5.4) crack (1.0.1) @@ -384,7 +381,7 @@ GEM rbs (>= 3, < 5) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) - rubyzip (2.4.1) + rubyzip (3.2.2) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -403,9 +400,11 @@ GEM sdoc (2.6.1) rdoc (>= 5.0) securerandom (0.4.1) - selenium-webdriver (4.10.0) + selenium-webdriver (4.38.0) + base64 (~> 0.2) + logger (~> 1.4) rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) + rubyzip (>= 1.2.2, < 4.0) websocket (~> 1.0) sentry-rails (6.0.0) railties (>= 5.2.0) @@ -464,10 +463,6 @@ GEM useragent (0.16.11) vcr (6.3.1) base64 - webdrivers (5.3.1) - nokogiri (~> 1.6) - rubyzip (>= 1.3.0) - selenium-webdriver (~> 4.0, < 4.11) webmock (3.26.1) addressable (>= 2.8.0) crack (>= 0.3.2) @@ -531,7 +526,6 @@ DEPENDENCIES bootstrap-sass byebug capybara - capybara-selenium csv data_services_api! dotenv @@ -570,12 +564,12 @@ DEPENDENCIES ruby-lsp sass-rails sdoc + selenium-webdriver sentry-rails simplecov solargraph stackprof vcr - webdrivers webmock yajl-ruby From ea6a8a42e9de47a8e9ccf9704ba4e944d755a942 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 13:21:51 +0000 Subject: [PATCH 28/39] chore: remove test dependency on vcr integration - Remove test gem for vcr integration and its dependencies - Clean up references to vcr integration in dependency config - Update gem group for tests - Simplify dependency lock entries for fewer test deps --- Gemfile | 1 - Gemfile.lock | 7 ------- 2 files changed, 8 deletions(-) diff --git a/Gemfile b/Gemfile index 0f3e692..dc2faba 100644 --- a/Gemfile +++ b/Gemfile @@ -65,7 +65,6 @@ group :test do gem 'minitest-rails', require: false gem 'minitest-reporters' gem 'minitest-spec-rails', require: false - gem 'minitest-vcr', require: false gem 'mocha' gem 'selenium-webdriver' gem 'simplecov', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 952c67b..b541932 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -222,8 +222,6 @@ GEM matrix (0.4.3) memory_profiler (1.1.0) mini_mime (1.1.5) - minispec-metadata (2.0.0) - minitest minitest (5.26.0) minitest-rails (8.1.0) minitest (~> 5.20) @@ -236,10 +234,6 @@ GEM minitest-spec-rails (7.4.1) minitest (>= 5.0) railties (>= 4.1) - minitest-vcr (1.4.0) - minispec-metadata (~> 2.0) - minitest (>= 4.7.5) - vcr (>= 2.9) mocha (2.7.1) ruby2_keywords (>= 0.0.5) modernizr-rails (2.7.1) @@ -551,7 +545,6 @@ DEPENDENCIES minitest-rails minitest-reporters minitest-spec-rails - minitest-vcr mocha ostruct prometheus-client From 685e00aa86ebb9b9a7755020afac11be842fc9b2 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 13:21:51 +0000 Subject: [PATCH 29/39] chore: clean up test helper vcr setup - Remove direct loading of removed test support lib - Simplify initialisation of test helper for spec usage - Drop compatibility code for removed integration --- test/test_helper.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 492eb8c..26c4278 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -18,18 +18,10 @@ # Require minitest gems carefully to avoid conflicts require 'minitest/rails' -require 'minitest-vcr' # Load spec functionality without conflicting parallelize support require 'minitest/spec' -# Fix compatibility with gems that expect the old MiniTest constant -# This needs to be set before requiring gems like minitest-vcr -MiniTest = Minitest unless defined?(MiniTest) - -# Now manually require minitest-vcr after setting up compatibility -require 'minitest-vcr' - require 'mocha/minitest' require 'json_expressions/minitest' require 'download_helpers' From 4d2203310c3baf72af3cd7048222d5db7cc43689 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 13:43:43 +0000 Subject: [PATCH 30/39] chore: update documentation dependency version - Bumps documentation library version to address minor issues - Ensures compatibility and improved developer experience --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b541932..1307fe8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -391,7 +391,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sdoc (2.6.1) + sdoc (2.6.5) rdoc (>= 5.0) securerandom (0.4.1) selenium-webdriver (4.38.0) From f49051032d9f9da7d12dbb9c9744f558aa483f8a Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 14:50:05 +0000 Subject: [PATCH 31/39] refactor: remove deprecated timezone config option - Removes setting for legacy time zone preservation to clean up config - Prepares for compatibility with future framework versions --- config/application.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/application.rb b/config/application.rb index e25b24e..5c3d813 100644 --- a/config/application.rb +++ b/config/application.rb @@ -31,12 +31,6 @@ class Application < Rails::Application # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' - # !DEPRECATION WARNING: `to_time` will always preserve the full system - # ! timezone offset rather than offset of the receiver in Rails 8.1. - # * To opt in to the new behavior and maintain system timezone, - # * set the value to :zone; otherwise, set to false - config.active_support.to_time_preserves_timezone = :zone - # 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 From e8f1f8b1a7b05f51fb413ea125d0669673daed98 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 14:52:29 +0000 Subject: [PATCH 32/39] docs: Updated CHANGELOG - Update framework and core dependencies to address security issues - Modernise test suite for improved compatibility and maintainability - Remove unused test and integration dependencies - Fix deprecation warnings and compatibility with latest versions - Improve test logging for better clarity - Add missing dependency for compatibility with newer language versions --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 068858a..2aaa366 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -- Adjusted test logging to respect log level and reduce logs displayed unless debugging +### Changed + +- Updated Ruby on Rails framework to latest version for improved security and + performance +- Modernised test suite assertions from deprecated spec-style to standard + Minitest patterns +- Upgraded Selenium WebDriver from 4.1.0 to 4.38.0 for better browser + compatibility +- Updated multiple dependencies including Puma, Faraday, JSON, and Sentry for + security fixes +- Improved test framework compatibility and removed legacy assertion helpers +- Adjusted test logging to respect log level and reduce logs displayed unless + debugging + +### Removed + +- Removed unused gems: `capybara-selenium`, `webdrivers`, `minitest-vcr`, and + `minitest-capybara` +- Cleaned up redundant test dependencies and VCR integration setup + +### Fixed + +- Resolved MiniTest compatibility issues with Capybara integration +- Fixed deprecated assertion syntax throughout test suite (replaced `assert_not` + with `refute`) +- Added explicit CSV gem dependency for Ruby 3.4.0 compatibility +- Improved test helper setup and gem loading order +- Removed deprecated `to_time_preserves_timezone` configuration for Rails 8.1+ + compatibility + +### Security + +- Updated dependencies to address security vulnerabilities in linting and + testing frameworks +- Upgraded core framework dependencies to resolve known security issues ## [2.2.2] - 2025-08 From b999e2654f1c02fe260ab88eca9d4607f7e4cca0 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 3 Nov 2025 16:29:51 +0000 Subject: [PATCH 33/39] chore: clean up changelog entries - Reorganises mention of deprecated configuration removal --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aaa366..1d7fcb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed unused gems: `capybara-selenium`, `webdrivers`, `minitest-vcr`, and `minitest-capybara` - Cleaned up redundant test dependencies and VCR integration setup +- Removed deprecated `to_time_preserves_timezone` configuration for Rails 8.1+ + compatibility ### Fixed @@ -34,8 +36,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 with `refute`) - Added explicit CSV gem dependency for Ruby 3.4.0 compatibility - Improved test helper setup and gem loading order -- Removed deprecated `to_time_preserves_timezone` configuration for Rails 8.1+ - compatibility ### Security From 5f6d0f33740a34b674acf768be184a08da24c362 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Tue, 4 Nov 2025 09:37:23 +0000 Subject: [PATCH 34/39] fix: update sentry logger config for sdk compatibility - Switches logger level setting to align with the new sdk requirements - Prevents logging level misconfiguration due to recent sdk changes - Supports smoother upgrade to the latest sentry integration --- config/initializers/sentry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 8a1e68f..4e86bde 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -20,7 +20,7 @@ # * Set the environment name from the SENTRY_ENVIRONMENT instance configuration value config.environment = ENV.fetch('SENTRY_ENVIRONMENT', Rails.env) # ^ Default to only reporting info, warnings and errors to Sentry - config.logger.level = Rails.application.config.log_level || :info + config.sdk_logger.level = Rails.application.config.log_level || :info # * Set the release version to the current version config.release = Version::VERSION # * Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. From 9e96ee8e3f34d98efb97df9a3c14d705785b3aa7 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Tue, 4 Nov 2025 10:33:55 +0000 Subject: [PATCH 35/39] refactor: always initialise sentry error reporting - Remove environment variable guard to always initialise error reporting - Update comments to clarify behaviour and config expectations - Ensure extra tags setup outside of previous conditional block - Adjust documentation for config variable naming - Keep config signature and exclusions unchanged --- config/initializers/sentry.rb | 77 ++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 4e86bde..d041c99 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -3,43 +3,44 @@ require 'version' Rails.application.reloader.to_prepare do - if ENV['SENTRY_API_KEY'] - Sentry.init do |config| - # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs-logger - config.breadcrumbs_logger = %i[sentry_logger monotonic_active_support_logger http_logger] - # * The DSN tells the SDK where to send events. - config.dsn = ENV['SENTRY_API_KEY'] - # ! Only report errors in these environments: - config.enabled_environments = %w[production prod preprod dev] - # ! Ignore exceptions that are not useful to us - config.excluded_exceptions += [ - 'ActionController::BadRequest', - 'ActionController::RoutingError', - 'ActiveRecord::RecordNotFound' - ] - # * Set the environment name from the SENTRY_ENVIRONMENT instance configuration value - config.environment = ENV.fetch('SENTRY_ENVIRONMENT', Rails.env) - # ^ Default to only reporting info, warnings and errors to Sentry - config.sdk_logger.level = Rails.application.config.log_level || :info - # * Set the release version to the current version - config.release = Version::VERSION - # * Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. - config.traces_sample_rate = Rails.env.development? ? 1.0 : 0.1 - # ! Sentry recommends adjusting this value in production hence the ternary operator. - # * Set profiles_sample_rate to profile 100% of sampled transactions. - config.profiles_sample_rate = Rails.env.production? ? 1.0 : 0.1 - # ! Sentry recommends adjusting this value in production hence the ternary operator. - end - - # * Set additional tags for the Sentry event to allow for better filtering in the Sentry UI - # ? These tags are set in either a local .env file or the instance configuration - # ! `.compact!` removes any nil values from the sentry_tags hash before setting the tags - sentry_tags = { - 'band' => ENV.fetch('SENTRY_BAND', nil), - 'enabled' => ENV.fetch('SENTRY_ENABLED', nil), - 'hostname' => ENV.fetch('SENTRY_HOSTNAME', nil) - }.compact! - # * Set the tags in the Sentry event with remaining values but only if there are any - sentry_tags&.each { |k, v| Sentry.set_tags(k.to_s => v) } + Sentry.init do |config| + # https://docs.sentry.io/platforms/ruby/configuration/options/#breadcrumbs-logger + config.breadcrumbs_logger = %i[sentry_logger monotonic_active_support_logger http_logger] + # * The DSN tells the SDK where to send events. + # ! By default, events will be sent to Sentry in all environments. + #! If you don't want to send events in a specific environment, + #! you can unset the SENTRY_DSN [SENTRY_API_KEY] variable in that environment. + config.dsn = ENV['SENTRY_API_KEY'] + # ! Only report errors in these environments: + config.enabled_environments = %w[production prod preprod dev] + # ! Ignore exceptions that are not useful to us + config.excluded_exceptions += [ + 'ActionController::BadRequest', + 'ActionController::RoutingError', + 'ActiveRecord::RecordNotFound' + ] + # * Set the environment name from the SENTRY_ENVIRONMENT instance configuration value + config.environment = ENV.fetch('SENTRY_ENVIRONMENT', Rails.env) + # ^ Default to only reporting info, warnings and errors to Sentry + config.sdk_logger.level = Rails.application.config.log_level || :info + # * Set the release version to the current version + config.release = Version::VERSION + # * Set traces_sample_rate to 1.0 to capture 100% of transactions for tracing. + config.traces_sample_rate = Rails.env.development? ? 1.0 : 0.1 + # ! Sentry recommends adjusting this value in production hence the ternary operator. + # * Set profiles_sample_rate to profile 100% of sampled transactions. + config.profiles_sample_rate = Rails.env.production? ? 1.0 : 0.1 + # ! Sentry recommends adjusting this value in production hence the ternary operator. end + + # * Set additional tags for the Sentry event to allow for better filtering in the Sentry UI + # ? These tags are set in either a local .env file or the instance configuration + # ! `.compact!` removes any nil values from the sentry_tags hash before setting the tags + sentry_tags = { + 'band' => ENV.fetch('SENTRY_BAND', nil), + 'enabled' => ENV.fetch('SENTRY_ENABLED', nil), + 'hostname' => ENV.fetch('SENTRY_HOSTNAME', nil) + }.compact! + # * Set the tags in the Sentry event with remaining values but only if there are any + sentry_tags&.each { |k, v| Sentry.set_tags(k.to_s => v) } end From 93f45864869a33fd60e9a5749639afacb9bd8d3b Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Tue, 4 Nov 2025 10:42:13 +0000 Subject: [PATCH 36/39] chore: update changelog for sentry v6 config changes - Simplifies error reporting setup to always configure when available - Updates logger configuration for new sdk standards - Refactors settings for improved compatibility with sdk v6 --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7fcb7..8ad5523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved test framework compatibility and removed legacy assertion helpers - Adjusted test logging to respect log level and reduce logs displayed unless debugging +- Simplified Sentry initialisation to always configure when DSN is available ### Removed @@ -36,12 +37,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 with `refute`) - Added explicit CSV gem dependency for Ruby 3.4.0 compatibility - Improved test helper setup and gem loading order +- Updated Sentry logger configuration from `config.logger.level` to `config.sdk_logger.level` ### Security - Updated dependencies to address security vulnerabilities in linting and testing frameworks - Upgraded core framework dependencies to resolve known security issues +- Refactored Sentry error reporting configuration for SDK v6 compatibility ## [2.2.2] - 2025-08 From b9574d6fa662ea4229801d5805e5c04be478fffd Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 10 Nov 2025 11:54:27 +0000 Subject: [PATCH 37/39] chore: bump version to 2.2.3 - Update version number to reflect new release - Prepare for upcoming changes and improvements --- app/lib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/version.rb b/app/lib/version.rb index 033a607..c7fdb88 100644 --- a/app/lib/version.rb +++ b/app/lib/version.rb @@ -3,7 +3,7 @@ module Version MAJOR = 2 MINOR = 2 - PATCH = 2 + PATCH = 3 SUFFIX = nil VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}".freeze end From 27c7cfbb8ce3d9949b15636f47b4331ae684d276 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 10 Nov 2025 11:54:27 +0000 Subject: [PATCH 38/39] docs: update release notes for 2.2.3 - Add new release version entry with date - Improve release tracking in documentation --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ad5523..f2caf9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [2.2.3] - 2025-11 + ### Changed - Updated Ruby on Rails framework to latest version for improved security and From 626bfcdd08fa6d52dc5a8470ae65f43c02993661 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 10 Nov 2025 12:13:55 +0000 Subject: [PATCH 39/39] chore: remove commented-out placeholder rule - Cleans up unused CSS by deleting commented placeholder - Simplifies the stylesheet to reduce clutter Resolves #294 --- app/assets/stylesheets/ppd.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/stylesheets/ppd.scss b/app/assets/stylesheets/ppd.scss index e0d20ae..b11af3e 100644 --- a/app/assets/stylesheets/ppd.scss +++ b/app/assets/stylesheets/ppd.scss @@ -196,8 +196,7 @@ $lr-logo-grey: #a7a5a6; height: 20px; min-width: 30px; } - // .twitter { - // } + .facebook { margin-right: 20px; }