evaluate()’s substitutions are now global.

This commit is contained in:
Luka Vandervelden 2019-06-09 15:09:30 +02:00
parent 73abf06a65
commit 5b864dcb58

View File

@ -261,7 +261,7 @@ class Service
ENV["SERVICE_ENVIRONMENT_TYPE"] = @environment.type.to_s
end
private def evaluate(string)
string.sub /%{[a-zA-Z]+}/ do |match|
string.gsub /%{[a-zA-Z]+}/ do |match|
match = match[2..match.size-2]
if match.downcase == "environment"