class KuberKit::EnvFileReader::EnvFileTempfileCreator

Public Instance Methods

call(shell, env_file) click to toggle source
# File lib/kuber_kit/env_file_reader/env_file_tempfile_creator.rb, line 8
def call(shell, env_file)
  env_file_hash = reader.read(shell, env_file)
  env_file_raw  = env_file_hash.to_a.map{|k,v| "#{k}=#{v}"}.join("\r\n")
  temp_file_path = File.join(configs.env_file_compile_dir, env_file.uniq_name)

  shell.write(temp_file_path, env_file_raw)

  temp_file_path
end