From 44d5263fb91eae8737aa7fc2ad2b5cfe4e1fad49 Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Tue, 14 Nov 2023 16:27:57 -0500 Subject: [PATCH] Update safe_load calls to work with psych 3/4 Part of https://github.com/ManageIQ/manageiq/issues/22696 Keep compatibility with psych 3.1+ since permitted_classes and aliases were added as keyword arguments to safe_load. Note, psych 4 changed the interface to drop support with positional arguments for the permitted_classes. Now, we must explicitly specify them using kwargs. --- .../providers/amazon/cloud_manager/orchestration_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/amazon/cloud_manager/orchestration_template.rb b/app/models/manageiq/providers/amazon/cloud_manager/orchestration_template.rb index 3f2635a76..c3c830f3e 100644 --- a/app/models/manageiq/providers/amazon/cloud_manager/orchestration_template.rb +++ b/app/models/manageiq/providers/amazon/cloud_manager/orchestration_template.rb @@ -70,7 +70,7 @@ def self.display_name(number = 1) def parse return JSON.parse(content) if format == :json - YAML.safe_load(content, [Date]) + YAML.safe_load(content, :permitted_classes => [Date]) end def validate_format_yaml