From a6f8e3c59b61c6eb87e086b6fdc109d3ef931785 Mon Sep 17 00:00:00 2001 From: Sergio Bobillier Date: Fri, 24 Oct 2025 15:13:31 +0200 Subject: [PATCH] [ESRTEST-26799] Add ActiveSupport's blank methods to Configuration Adds a require statement for 'active_support/core_ext/object/blank' to the Configuration class. This will enable the use of ActiveSupport's blank-checking methods: #blank?, #present?, and #presence within ERB configuration files. This is a very useful feature, especially when working with environment variables. --- CHANGELOG.md | 4 ++++ lib/jay_api/configuration.rb | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cee0b5..e9ef4b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Please mark backwards incompatible changes with an exclamation mark at the start ## [Unreleased] +### Added +- ActiveSupport's `#present?`, `#presence` and `#blank?` methods can now be used + in ERB configuration files. + ## [29.1.0] - 2025-10-22 ### Added diff --git a/lib/jay_api/configuration.rb b/lib/jay_api/configuration.rb index cd2a6dd..6fb4389 100644 --- a/lib/jay_api/configuration.rb +++ b/lib/jay_api/configuration.rb @@ -3,6 +3,7 @@ require 'active_support' require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/hash/indifferent_access' +require 'active_support/core_ext/object/blank' require 'erb' require 'forwardable'