lib/contrast/config/assess_configuration.rb in contrast-agent-6.5.0 vs lib/contrast/config/assess_configuration.rb in contrast-agent-6.5.1
- old
+ new
@@ -1,8 +1,10 @@
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true
+require 'contrast/components/sampling'
+
module Contrast
module Config
# Common Configuration settings. Those in this section pertain to the
# assess functionality of the Agent.
class AssessConfiguration
@@ -26,11 +28,11 @@
@enable = hsh[:enable]
@tags = hsh[:tags]
@enable_scan_response = hsh[:enable_scan_response]
@enable_dynamic_sources = hsh[:enable_dynamic_sources]
@enable_original_object = hsh[:enable_original_object]
- @sampling = Contrast::Config::SamplingConfiguration.new(hsh[:sampling])
+ @sampling = Contrast::Components::Sampling::Interface.new(hsh[:sampling])
@rules = Contrast::Config::AssessRulesConfiguration.new(hsh[:rules])
@stacktraces = hsh[:stacktraces]
@max_context_source_events = hsh[:max_context_source_events]
@max_propagation_events = hsh[:max_propagation_events]
@max_rule_reported = hsh[:max_rule_reported]
@@ -50,12 +52,12 @@
# @return [Boolean, true]
def enable_original_object
@enable_original_object.nil? ? true : @enable_original_object
end
- # @return [Contrast::Config::SamplingConfiguration]
+ # @return [Contrast::Components::Sampling::Interface]
def sampling
- @sampling ||= Contrast::Config::SamplingConfiguration.new
+ @sampling ||= Contrast::Components::Sampling::Interface.new
end
# @return [Contrast::Config::AssessRulesConfiguration]
def rules
@rules ||= Contrast::Config::AssessRulesConfiguration.new