Top Level Namespace

Defined Under Namespace

Modules: SmartMachine Classes: Logtailer, Services

Instance Method Summary collapse

Instance Method Details

#update_envkeys_in(filepaths, envkeys) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/smart_machine/templates/dotsmartmachine/config/emailer/docker/entrypoint.rb', line 10

def update_envkeys_in(filepaths, envkeys)
  filepaths.each do |filepath|
    str = File.read(filepath)
    str = str.gsub(/%(?!<)/, '%%')
    str = format(str, envkeys)
    File.open(filepath, "w") { |file| file << str }
  end
end