From dc1280ba7afb862050e2a922e382236aa700c35f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 25 Apr 2025 09:40:08 +0100 Subject: [PATCH 1/3] feat: Logs returned row count if positive - Adds returned row count to logs when the count is a positive integer. - Improves debugging by providing the number of rows returned from data service calls. --- lib/data_services_api/service.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/data_services_api/service.rb b/lib/data_services_api/service.rb index bde2d24..f5842de 100644 --- a/lib/data_services_api/service.rb +++ b/lib/data_services_api/service.rb @@ -77,6 +77,7 @@ def get_json(http_url, params, options) # rubocop:disable Metrics/MethodLength, ) logged_fields[:method] = response.env.method.upcase + logged_fields[:returned_rows] = returned_rows if returned_rows.positive? logged_fields[:request_status] = 'processing' logged_fields[:request_time] = elapsed_time logged_fields[:status] = response.status From 0a8228c628887d280afd70a4dd7461e601eb054f Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 25 Apr 2025 09:40:49 +0100 Subject: [PATCH 2/3] build: Updates gem version to patch release 4 - Bumps the patch version of the gem. --- lib/data_services_api/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/data_services_api/version.rb b/lib/data_services_api/version.rb index 9c4d4eb..931f421 100644 --- a/lib/data_services_api/version.rb +++ b/lib/data_services_api/version.rb @@ -4,7 +4,7 @@ module DataServicesApi MAJOR = 1 MINOR = 5 - PATCH = 3 + PATCH = 4 SUFFIX = nil VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}" end From a806238fb9d63eca591bfd9e6d33e21a6c5c55b8 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Fri, 25 Apr 2025 10:59:54 +0100 Subject: [PATCH 3/3] docs: updated CHANGELOG - Adds returned row count to logs when the count is a positive integer. Applies to https://github.com/epimorphics/ppd-explorer/issues/272 --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a8e4e..9c57458 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog for DS API rubygem +## 1.5.4 - 2025-04 + +- (Jon) Adds returned row count to logs when the count is a positive integer. + [GH-272](https://github.com/epimorphics/ppd-explorer/issues/272) + ## 1.5.3 - 2025-04 - (Jon) Improved API request logging with query string information, which can