diff --git a/lib/datadog/appsec/contrib/rack/gateway/watcher.rb b/lib/datadog/appsec/contrib/rack/gateway/watcher.rb index 460fdec70a..01b476eb3b 100644 --- a/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +++ b/lib/datadog/appsec/contrib/rack/gateway/watcher.rb @@ -16,6 +16,8 @@ module Gateway module Watcher # rubocop:disable Metrics/AbcSize # rubocop:disable Metrics/MethodLength + # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Metrics/PerceivedComplexity def self.watch Instrumentation.gateway.watch('rack.request', :appsec) do |stack, request| block = false @@ -143,6 +145,8 @@ def self.watch [ret, res] end end + # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Metrics/PerceivedComplexity # rubocop:enable Metrics/MethodLength # rubocop:enable Metrics/AbcSize diff --git a/lib/datadog/appsec/event.rb b/lib/datadog/appsec/event.rb index e23c06290d..82b08f2c75 100644 --- a/lib/datadog/appsec/event.rb +++ b/lib/datadog/appsec/event.rb @@ -51,8 +51,6 @@ def self.record(*events) end end - # rubocop:disable Metrics/AbcSize - # rubocop:disable Metrics/MethodLength def self.record_via_span(*events) events.group_by { |e| e[:trace] }.each do |trace, event_group| unless trace @@ -110,8 +108,6 @@ def self.record_via_span(*events) end end end - # rubocop:enable Metrics/MethodLength - # rubocop:enable Metrics/AbcSize end end end diff --git a/spec/datadog/appsec/processor_spec.rb b/spec/datadog/appsec/processor_spec.rb index 3b850ff1e9..db1b3797d1 100644 --- a/spec/datadog/appsec/processor_spec.rb +++ b/spec/datadog/appsec/processor_spec.rb @@ -102,16 +102,6 @@ } end - context 'when ruleset is default' do - let(:ruleset) { :recommended } - - before do - expect(Datadog::AppSec::Assets).to receive(:waf_rules).with(:recommended).and_call_original.twice - end - - it { expect(described_class.new.send(:load_ruleset)).to be true } - end - context 'when ruleset is :recommended' do let(:ruleset) { :recommended }