lib/contrast/components/config.rb in contrast-agent-3.14.0 vs lib/contrast/components/config.rb in contrast-agent-3.15.0

- old
+ new

@@ -32,12 +32,11 @@ end def build log: true @_valid = nil @config = Contrast::Configuration.new - defaults - overrides + env_overrides validate(log: log) end alias_method :rebuild, :build # Prefer abstraction, but use #raw if you need. @@ -68,15 +67,15 @@ @_assess = Contrast::Utils::BooleanUtil.true?(raw.assess.enable) if @_assess.nil? @_assess end def session_id - @_session_id ||= raw.application.session_id || Contrast::Utils::ObjectShare::EMPTY_STRING + @_session_id ||= raw.application.session_id end def session_metadata - @_session_metadata ||= raw.application.session_metadata || Contrast::Utils::ObjectShare::EMPTY_STRING + @_session_metadata ||= raw.application.session_metadata end def valid? @_valid = validate(log: false) if @_valid.nil? end @@ -101,18 +100,9 @@ end return false end true - end - - def defaults - raw.agent.service.host ||= Contrast::Configuration::DEFAULT_HOST - raw.agent.service.port ||= Contrast::Configuration::DEFAULT_PORT - end - - def overrides - env_overrides end def env_overrides # For env variables resembling CONTRAST__WHATEVER__NESTED_VALUE # override raw.whatever.nested_value