lib/contrast/config/diagnostics/source_config_value.rb in contrast-agent-7.1.0 vs lib/contrast/config/diagnostics/source_config_value.rb in contrast-agent-7.2.0

- old
+ new

@@ -39,10 +39,14 @@ # and *.yml # # @param source [String] name of the source file yaml | yml # @return [Array<String>, nil] def assign_filename source - Contrast::Components::Config::Sources::APP_CONFIGURATION_FILE.each do |type| + Contrast::Components::Config::Sources::APP_CONFIGURATION_EXTENSIONS.each do |type| + # We use the source to transfer the file's name from the mapping of the extensions. + # This is done b/c the user_configuration file has a second field to be filled, + # and other sources don't. Transfer the source as filename and set the default value + # for it later when we find the sources. instance_variable_set(:@filename, source) if source.include?(".#{ type.downcase }") end end end end