lib/contrast/components/config.rb in contrast-agent-7.3.0 vs lib/contrast/components/config.rb in contrast-agent-7.3.1
- old
+ new
@@ -22,11 +22,10 @@
#
# Config fails fast. if it's not valid, the agent should break, and
# it should break LOUDLY. Better to waste half an hour of the sysadmin's
# time than to silently fail to deliver functionality.
module Config
- CONTRAST_ENV_MARKER = 'CONTRAST__'
CONTRAST_LOG = 'contrast.log'
CONTRAST_NAME = 'Contrast Agent'
DATE_TIME = '%Y-%m-%dT%H:%M:%S.%L%z'
class Interface # :nodoc: # rubocop:disable Metrics/ClassLength
@@ -178,10 +177,11 @@
def env_overrides
# For env variables resembling CONTRAST__WHATEVER__NESTED_VALUE
# override raw.whatever.nested_value
ENV.each do |env_key, env_value|
- next unless env_key.to_s.start_with?(CONTRAST_ENV_MARKER)
+ next unless env_key.to_s.start_with?(Contrast::Configuration::CONTRAST_ENV_MARKER)
+ next if Contrast::Configuration::DEPRECATED_PROPERTIES.include?(env_key.to_s)
config_item = Contrast::Utils::EnvConfigurationItem.new(env_key, env_value)
assign_value_to_path_array(self, config_item.dot_path_array, config_item.value)
end
end