airbrake-ruby 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/notifier.rb +1 -1
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/notifier_spec.rb +23 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6bcda11cc4df213ee240b89afd624859204780
|
4
|
+
data.tar.gz: 50f609e5e47c2129750b43f7f98bebf13794ef52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daa0b464c5ca8818a006e0a10cec1ff185ffbf2b3602b0b57f1fda4b69032e17d3dbb512054b5a89a15ef0571d698526570c4a8c538c2d7ee1120b1b58158b9c
|
7
|
+
data.tar.gz: 845cd20d7caf62ab809db418cc38178e4dbf257e3436181250ffc14af851087be444315cd0af26830f0b3223e09df8d7a99aeaacc386d13b408766d62f621768
|
@@ -118,7 +118,7 @@ module Airbrake
|
|
118
118
|
|
119
119
|
notice = build_notice(exception, params)
|
120
120
|
@filter_chain.refine(notice)
|
121
|
-
yield notice if block_given?
|
121
|
+
yield notice if block_given? && !notice.ignored?
|
122
122
|
|
123
123
|
if notice.ignored?
|
124
124
|
return promise.reject("#{notice} was marked as ignored")
|
data/spec/notifier_spec.rb
CHANGED
@@ -380,9 +380,29 @@ RSpec.describe Airbrake::Notifier do
|
|
380
380
|
end
|
381
381
|
|
382
382
|
describe "block argument" do
|
383
|
-
|
384
|
-
|
385
|
-
|
383
|
+
context "when a notice is not ignored" do
|
384
|
+
it "yields the notice" do
|
385
|
+
@airbrake.notify_sync(ex) { |notice| notice[:params][:bingo] = :bango }
|
386
|
+
expect_a_request_with_body(/params":{.*"bingo":"bango".*}/)
|
387
|
+
end
|
388
|
+
end
|
389
|
+
|
390
|
+
context "when a notice is ignored before entering the block" do
|
391
|
+
it "doesn't call the given block" do
|
392
|
+
@airbrake.add_filter(&:ignore!)
|
393
|
+
@airbrake.notify_sync(ex) { |n| n[:params][:bingo] = :bango }
|
394
|
+
expect(
|
395
|
+
a_request(:post, endpoint).
|
396
|
+
with(body: /params":{.*"bingo":"bango".*}/)
|
397
|
+
).not_to have_been_made
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
context "and when a notice is ignored inside the block" do
|
402
|
+
it "doesn't send the notice" do
|
403
|
+
@airbrake.notify_sync(ex, &:ignore!)
|
404
|
+
expect(a_request(:post, endpoint)).not_to have_been_made
|
405
|
+
end
|
386
406
|
end
|
387
407
|
end
|
388
408
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake Technologies, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|