From bb0e72fd3db334819debd414b9926d9c598ab488 Mon Sep 17 00:00:00 2001 From: Sarah Proctor <sarah.proctor@scientist.com> Date: Thu, 7 Nov 2024 16:36:22 -0800 Subject: [PATCH] Permits ERB syntax in `downloads.yml` file This commit fixes the `malformed format string - %=` error that occurs when ERB syntax is used in the `downloads.yml` file. --- app/models/arclight/document_downloads.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/arclight/document_downloads.rb b/app/models/arclight/document_downloads.rb index 5095ff4b1..f70396b2b 100644 --- a/app/models/arclight/document_downloads.rb +++ b/app/models/arclight/document_downloads.rb @@ -33,7 +33,8 @@ def files class << self def config @config ||= begin - YAML.safe_load(::File.read(config_filename)) + content = ERB.new(::File.read(config_filename)).result + YAML.safe_load(content) rescue Errno::ENOENT {} end