Skip to content

Commit eae6037

Browse files
committed
Allow merging of configuration files
1 parent 31f63f5 commit eae6037

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/sfn-parameters/infrastructure.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ class ParametersInfrastructure < Callback
1111
# Valid file extensions for configuration file
1212
VALID_EXTENSIONS = ['.rb', '.xml', '.json', '.yaml', '.yml']
1313

14+
# @return [TrueClass] silence callback run notification
15+
def quiet
16+
config.fetch(:sfn_parameters, :quiet, false)
17+
end
18+
1419
# Update configuration after configuration is loaded
1520
#
1621
# @return [NilClass]
@@ -35,7 +40,7 @@ def load_file_for(stack_name)
3540
isolation_name = config.fetch(:sfn_parameters, :destination,
3641
ENV.fetch('SFN_PARAMETERS_DESTINATION', 'default')
3742
)
38-
unpack_file(parameters_directory, isolation_name)
43+
expand_config_file(unpack_file(parameters_directory, isolation_name))
3944
end
4045

4146
# Detect and expand defined definitions

lib/sfn-parameters/stacks.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ParametersStacks < ParametersInfrastructure
1010
# @param stack_name [String]
1111
# @return [Smash]
1212
def load_file_for(stack_name)
13-
unpack_file(parameters_directory, stack_name)
13+
expand_config_file(unpack_file(parameters_directory, stack_name))
1414
end
1515

1616
# Define parameters directory for stacks based files

0 commit comments

Comments
 (0)