From 83415ada257292c61b19be11f36705d241bc44e1 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 14 Oct 2024 17:57:56 +0100 Subject: [PATCH 1/4] fix: set the casing for the expected header Fixed casing on the `X-Request-Id` header for SAPINT requests to match the header received from the apps using the gem. --- lib/data_services_api/service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/data_services_api/service.rb b/lib/data_services_api/service.rb index fb91fce..bb9215f 100644 --- a/lib/data_services_api/service.rb +++ b/lib/data_services_api/service.rb @@ -47,7 +47,7 @@ def get_from_api(http_url, accept_headers, params, options) # rubocop:disable Me conn = set_connection_timeout(create_http_connection(http_url)) response = conn.get do |req| - req.headers['X-Request-ID'] = Thread.current[:request_id] if Thread.current[:request_id] + req.headers['X-Request-Id'] = Thread.current[:request_id] if Thread.current[:request_id] req.headers['Accept'] = accept_headers req.options.params_encoder = Faraday::FlatParamsEncoder req.params = params.merge(options) @@ -91,7 +91,7 @@ def post_to_api(http_url, json) conn = set_connection_timeout(create_http_connection(http_url)) response = conn.post do |req| - req.headers['X-Request-ID'] = Thread.current[:request_id] if Thread.current[:request_id] + req.headers['X-Request-Id'] = Thread.current[:request_id] if Thread.current[:request_id] req.headers['Accept'] = 'application/json' req.headers['Content-Type'] = 'application/json' req.body = json From 2b5a731cdf36e8a5396fd36eca391e265c7d0cdf Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 14 Oct 2024 18:00:08 +0100 Subject: [PATCH 2/4] build: incremented version patch cadence from 1.5.0 ~> 1.5.1 --- 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 6ceb7fc..02c9829 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 = 0 + PATCH = 1 SUFFIX = 0 VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}" end From 7323921f16d9f48592e4177ef9cadb65d2349a27 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 14 Oct 2024 18:00:46 +0100 Subject: [PATCH 3/4] build: reset the version suffix cadence to 'nil' Updated the `version.rb` `SUFFIX` entry to be `nil` by default to ensure the version number is correctly formatted. --- 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 02c9829..1b2f803 100644 --- a/lib/data_services_api/version.rb +++ b/lib/data_services_api/version.rb @@ -5,6 +5,6 @@ module DataServicesApi MAJOR = 1 MINOR = 5 PATCH = 1 - SUFFIX = 0 + SUFFIX = nil VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}" end From b7cf650a07382d939e5c98867e5bc7ba6c475c39 Mon Sep 17 00:00:00 2001 From: "Jon R. Humphrey" Date: Mon, 14 Oct 2024 18:01:01 +0100 Subject: [PATCH 4/4] docs: updated CHANGELOG --- CHANGELOG.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1978148..eb542b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,25 @@ # Changelog for DS API rubygem -## 1.5.0 - 2023-06-23 +## 1.5.1 - 2024-10-14 + +- (Jon) Fixed casing on the `X-Request-Id` header for SAPINT requests to match + the header received from the apps using the gem. + [GH-189](https://github.com/epimorphics/hmlr-ansible-deployment/issues/189) +- (Jon) Updated the previously supplied release date in the `v1.5.0` entry to + match the actual release date. +- (Jon) Updated the `version.rb` `SUFFIX` entry to be `nil` by default to ensure + the version number is correctly formatted. + +## 1.5.0 - 2024-10-09 - (Dan) Updates ruby to 2.7.8 and version cadence to 1.5.0 ## 1.4.1 - 2023-06-23 -- (Jon) Now handles matching the message flag while ignoring the casing of the message -- (Jon) Better handling of reporting different logging levels using DRY principles +- (Jon) Now handles matching the message flag while ignoring the casing of the + message +- (Jon) Better handling of reporting different logging levels using DRY + principles - (Jon) Resolves failing test for duration as integer ## 1.4.0 - 2023-06-21 @@ -40,7 +52,8 @@ to the system logs. - (Jon) As part of the better logging updates the error message returned to the requesting app has been refactored to be more concise as well the failed - connection error status has been set specifically to `503 Service Unavailable`. + connection error status has been set specifically to `503 Service + Unavailable`. ## 1.3.2 - 2022-04-01