diff --git a/lib/appsignal.rb b/lib/appsignal.rb index 2ce169ee8..4200aa3bf 100644 --- a/lib/appsignal.rb +++ b/lib/appsignal.rb @@ -279,21 +279,6 @@ def active? config && config.active? && extension_loaded? end - # @deprecated No replacement - def is_ignored_error?(error) # rubocop:disable Naming/PredicateName - deprecation_message "Appsignal.is_ignored_error? is deprecated " \ - "with no replacement and will be removed in version 3.0." - Appsignal.config[:ignore_errors].include?(error.class.name) - end - alias :is_ignored_exception? :is_ignored_error? - - # @deprecated No replacement - def is_ignored_action?(action) # rubocop:disable Naming/PredicateName - deprecation_message "Appsignal.is_ignored_action? is deprecated " \ - "with no replacement and will be removed in version 3.0." - Appsignal.config[:ignore_actions].include?(action) - end - private def start_stdout_logger diff --git a/spec/lib/appsignal_spec.rb b/spec/lib/appsignal_spec.rb index 488b3054c..8aabbe526 100644 --- a/spec/lib/appsignal_spec.rb +++ b/spec/lib/appsignal_spec.rb @@ -950,70 +950,6 @@ end end end - - describe ".is_ignored_error?" do - let(:error) { StandardError.new } - let(:err_stream) { std_stream } - let(:stderr) { err_stream.read } - before do - allow(Appsignal).to receive(:config).and_return(:ignore_errors => ["StandardError"]) - end - - subject do - capture_std_streams(std_stream, err_stream) do - Appsignal.is_ignored_error?(error) - end - end - - it "should return true if it's in the ignored list" do - is_expected.to be_truthy - end - - it "outputs deprecated warning" do - subject - expect(stderr).to include("Appsignal.is_ignored_error? is deprecated with no replacement") - end - - context "when error is not in the ignored list" do - let(:error) { Object.new } - - it "should return false" do - is_expected.to be_falsy - end - end - end - - describe ".is_ignored_action?" do - let(:action) { "TestController#isup" } - let(:err_stream) { std_stream } - let(:stderr) { err_stream.read } - before do - allow(Appsignal).to receive(:config).and_return(:ignore_actions => "TestController#isup") - end - - subject do - capture_std_streams(std_stream, err_stream) do - Appsignal.is_ignored_action?(action) - end - end - - it "should return true if it's in the ignored list" do - is_expected.to be_truthy - end - - it "outputs deprecated warning" do - subject - expect(stderr).to include("Appsignal.is_ignored_action? is deprecated with no replacement") - end - - context "when action is not in the ingore list" do - let(:action) { "TestController#other_action" } - - it "should return false" do - is_expected.to be_falsy - end - end - end end describe ".start_logger" do