Add ERB eval so we can use credentials
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
require "active_support/ordered_options"
|
||||
require "erb"
|
||||
|
||||
class Mrsk::Configuration
|
||||
delegate :service, :image, :env, :registry, :ssh_user, to: :config, allow_nil: true
|
||||
|
||||
def self.load_file(file)
|
||||
if file.exist?
|
||||
new YAML.load_file(file).symbolize_keys
|
||||
new YAML.load(ERB.new(IO.read(file)).result).symbolize_keys
|
||||
else
|
||||
raise "Configuration file not found in #{file}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user