lib/contrast/components/config.rb in contrast-agent-3.10.2 vs lib/contrast/components/config.rb in contrast-agent-3.11.0

- old
+ new

@@ -21,12 +21,11 @@ # # 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 - LOG_CONFIGURATION_DISABLED = 'Contrast disabled by configuration. Continuing without instrumentation.' - CONTRAST_ENV_MARKER = 'CONTRAST__' + CONTRAST_ENV_MARKER = 'CONTRAST__' class Interface # :nodoc: def initialize build end @@ -49,22 +48,25 @@ def root raw.root end def enabled? - Contrast::Utils::BooleanUtil.true?(raw.enable) + @_enabled = !Contrast::Utils::BooleanUtil.false?(raw.enable) if @_enabled.nil? + @_enabled end def disabled? !enabled? end def protect? - Contrast::Utils::BooleanUtil.true?(raw.protect.enable) + @_protect = Contrast::Utils::BooleanUtil.true?(raw.protect.enable) if @_protect.nil? + @_protect end def assess? - Contrast::Utils::BooleanUtil.true?(raw.assess.enable) + @_assess = Contrast::Utils::BooleanUtil.true?(raw.assess.enable) if @_assess.nil? + @_assess end def session_id @_session_id ||= begin s = raw.application.session_id || ''