From 97a9b4f7f08e2424866d96f001fc159208578b81 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Thu, 13 Nov 2025 16:37:32 +0000 Subject: [PATCH 1/9] chore: bump api package version to address issues - Updates the internal api package to the latest patch release --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb399c1..da048fd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - data_services_api (1.6.0) + data_services_api (1.6.1) faraday (~> 2.13, >= 2.13.0) faraday-encoding (~> 0.0, >= 0.0.6) faraday-follow_redirects (~> 0.3, >= 0.3.0) From 642e483638b9e641e0d9bcfa9d54453d48ad3a26 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Thu, 13 Nov 2025 17:36:07 +0000 Subject: [PATCH 2/9] refactor: tweak logger config for debugging - Disable logging of headers in responses - Turn off logging of errors in responses - Set log level to debug regardless of environment - Remove production/debug environment-based log level logic --- lib/data_services_api/service.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/data_services_api/service.rb b/lib/data_services_api/service.rb index 492acbe..908cef4 100644 --- a/lib/data_services_api/service.rb +++ b/lib/data_services_api/service.rb @@ -280,13 +280,11 @@ def in_rails? def with_logger_in_rails(config) return config.response :logger unless in_rails? - level = Rails.env.production? ? :info : :debug - config.response :logger, Rails.logger, { - headers: true, + headers: false, bodies: false, - errors: true, - log_level: level.to_sym + errors: false, + log_level: :debug } end From d75df86f1cd7f385df709f292e08b5a3e7ce8380 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Thu, 13 Nov 2025 17:43:01 +0000 Subject: [PATCH 3/9] chore: update changelog for log changes - Mention refined logger configuration and improved debugging - Highlight changes to log level and debug settings - List disabling of headers and errors in log output --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 561f979..abcbc85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Overhauled Makefile with comprehensive build automation - Upgraded Bundler version for improved dependency management - Refined file packaging configuration for better gem distribution +- Refined logger configuration for improved debugging: + - Disabled logging of headers in HTTP responses + - Turned off logging of errors in HTTP responses + - Set log level to debug consistently across all environments + - Removed production/debug environment-based log level logic ### Fixed From d41c06133580eb60ebb40ccac76b1638ee2b0dbd Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 09:30:54 +0000 Subject: [PATCH 4/9] docs: switch rake usage to make - Update instructions to use make instead of rake - Change rubocop and test command examples for clarity - Include guidance on setting environment variable for make - Improve consistency in usage documentation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fbdce57..897276b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ order for the gem to work._ Rubocop should not report any warnings: ```sh -$ rubocop +$ make lint Inspecting 21 files ..................... @@ -81,14 +81,14 @@ Once the API is started you can invoke the tests with the simple command below[^1]: ```sh -rake test +make test ``` You can also set the environment variable `API_URL` to point to a running instance of the HMLR Data API from a non-default port: ```sh -API_URL=http://localhost:8080 rake test +API_URL=http://localhost:8080 make test ``` _N.B If `API_URL` environment variable is not set it will default to From 34d9da8cd25fc9f7d782804e11ee6c9b48ce4d7e Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 09:30:54 +0000 Subject: [PATCH 5/9] docs: fix typo in notifications reference - Correct mistake in notification class name - Improve accuracy in prometheus monitoring section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 897276b..b1aadab 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ At present, publishing is a manual step for Gem maintainers. The process is: ### Prometheus monitoring This gem integrates with Prometheus monitoring by emitting the following -`ActiveSupport::Notificaion`s: +`ActiveSupport::Notification`s: - `response.api` - API response, including status code and duration - `connection_failure.api` - failure to connect to the API, with exception From 6d32bab02ed3a642b009fe9320a125639af08b08 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 09:33:32 +0000 Subject: [PATCH 6/9] docs: update readme and monitoring docs - Switched build and test instructions from rake to make - Fixed a typo in monitoring configuration reference --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abcbc85..de77c1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Turned off logging of errors in HTTP responses - Set log level to debug consistently across all environments - Removed production/debug environment-based log level logic +- Updated README documentation: + - Switched build and test instructions from rake to make commands + - Fixed typo in notifications reference for Prometheus monitoring section ### Fixed From faca8b548feff05af01fb1ddbf3314c810d9a06f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 13:40:17 +0000 Subject: [PATCH 7/9] chore(deps): bump faraday-follow_redirects version - Update peer dependencies to require newer minor version - Ensure API clients use compatible redirect implementation --- Gemfile.lock | 2 +- data_services_api.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index da048fd..5b6f6f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,7 +4,7 @@ PATH data_services_api (1.6.1) faraday (~> 2.13, >= 2.13.0) faraday-encoding (~> 0.0, >= 0.0.6) - faraday-follow_redirects (~> 0.3, >= 0.3.0) + faraday-follow_redirects (~> 0.4, >= 0.4.0) faraday-retry (~> 2.0, >= 2.0) json (~> 2.0) yajl-ruby (~> 1.4) diff --git a/data_services_api.gemspec b/data_services_api.gemspec index deaa05a..c52e3db 100644 --- a/data_services_api.gemspec +++ b/data_services_api.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'faraday', '~> 2.13', '>= 2.13.0' spec.add_dependency 'faraday-encoding', '~> 0.0', '>= 0.0.6' - spec.add_dependency 'faraday-follow_redirects', '~> 0.3', '>= 0.3.0' + spec.add_dependency 'faraday-follow_redirects', '~> 0.4', '>= 0.4.0' spec.add_dependency 'faraday-retry', '~> 2.0', '>= 2.0' spec.add_dependency 'json', '~> 2.0' spec.add_dependency 'yajl-ruby', '~> 1.4' From 2e770212f6211753baa3f720ed3dee7c90c61213 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 13:40:17 +0000 Subject: [PATCH 8/9] chore(deps): update net-http to 0.8.0 - Upgrade net-http to align with minimum requirements - Specify required uri version for dependency resolution --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5b6f6f2..b28cb1b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,8 +54,8 @@ GEM mocha (2.8.0) ruby2_keywords (>= 0.0.5) mutex_m (0.3.0) - net-http (0.7.0) - uri + net-http (0.8.0) + uri (>= 0.11.1) ostruct (0.6.3) parallel (1.27.0) parser (3.3.10.0) From a8a64f1ebd44800f2718dfe213af6ca3c7b1e127 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 14 Nov 2025 13:42:38 +0000 Subject: [PATCH 9/9] chore: update dependency notes in changelog - Upgraded http library for improved compatibility - Required a newer minor version of redirect-follow plugin --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de77c1c..6e3b9da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated README documentation: - Switched build and test instructions from rake to make commands - Fixed typo in notifications reference for Prometheus monitoring section +- Updated additional dependencies: + - Upgraded net-http to version 0.8.0 for improved compatibility + - Bumped faraday-follow_redirects to require newer minor version ### Fixed