Let App be aware of destination
This commit is contained in:
@@ -10,6 +10,7 @@ class Mrsk::Configuration
|
||||
delegate :argumentize, :argumentize_env_with_secrets, to: Mrsk::Utils
|
||||
|
||||
attr_accessor :version
|
||||
attr_accessor :destination
|
||||
attr_accessor :raw_config
|
||||
|
||||
class << self
|
||||
@@ -19,7 +20,7 @@ class Mrsk::Configuration
|
||||
config.deep_merge! \
|
||||
load_config_file destination_config_file(base_config_file, destination)
|
||||
end
|
||||
end, version: version)
|
||||
end, destination: destination, version: version)
|
||||
end
|
||||
|
||||
private
|
||||
@@ -37,8 +38,9 @@ class Mrsk::Configuration
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(raw_config, version: "missing", validate: true)
|
||||
def initialize(raw_config, destination: nil, version: "missing", validate: true)
|
||||
@raw_config = ActiveSupport::InheritableOptions.new(raw_config)
|
||||
@destination = destination
|
||||
@version = version
|
||||
valid? if validate
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user