airbrake-ruby 2.7.1 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/airbrake-ruby/config.rb +11 -4
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/notifier_spec/options_spec.rb +9 -0
- 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: 6917eacac7b378489a0cfe8989bb4db03d803934
|
4
|
+
data.tar.gz: 9326c2fb739a898a3111085ffeef6dac8a0f2872
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4028f0808c5203440b03e54f80d2be6f369751bb20b205e3d006b1a4417718d98b6cdf3ce224462522ea4ec42c234a71940dad3011b5f3219c0741aa80d7502c
|
7
|
+
data.tar.gz: 3d9b0b62eec1477f74ae2536c475ff77ef84d01f8b44da04aa228bdd240766bd07e0b35c3d4301d3ed044eb8aab46c595f1eb8e58ef7d3e429a2379a5eb8e667
|
data/lib/airbrake-ruby/config.rb
CHANGED
@@ -50,9 +50,9 @@ module Airbrake
|
|
50
50
|
attr_accessor :environment
|
51
51
|
|
52
52
|
##
|
53
|
-
# @return [Array<String,
|
54
|
-
# sending exceptions when the application is running in them.
|
55
|
-
# possible environments not listed in the array will allow sending
|
53
|
+
# @return [Array<String,Symbol,Regexp>] the array of environments that
|
54
|
+
# forbids sending exceptions when the application is running in them.
|
55
|
+
# Other possible environments not listed in the array will allow sending
|
56
56
|
# occurring exceptions.
|
57
57
|
attr_accessor :ignore_environments
|
58
58
|
|
@@ -168,7 +168,14 @@ module Airbrake
|
|
168
168
|
"'ignore_environments' has no effect")
|
169
169
|
end
|
170
170
|
|
171
|
-
|
171
|
+
env = environment.to_s
|
172
|
+
ignore_environments.any? do |pattern|
|
173
|
+
if pattern.is_a?(Regexp)
|
174
|
+
env.match(pattern)
|
175
|
+
else
|
176
|
+
env == pattern.to_s
|
177
|
+
end
|
178
|
+
end
|
172
179
|
end
|
173
180
|
|
174
181
|
private
|
@@ -225,6 +225,15 @@ RSpec.describe Airbrake::Notifier do
|
|
225
225
|
context "when the current env is set and notify envs aren't" do
|
226
226
|
include_examples 'sent notice', environment: :development
|
227
227
|
end
|
228
|
+
|
229
|
+
context "when ignore_environments specifies a Regexp pattern" do
|
230
|
+
params = {
|
231
|
+
environment: :testing,
|
232
|
+
ignore_environments: ['staging', /test.+/]
|
233
|
+
}
|
234
|
+
|
235
|
+
include_examples 'ignored notice', params
|
236
|
+
end
|
228
237
|
end
|
229
238
|
|
230
239
|
describe ":blacklist_keys" do
|
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.
|
4
|
+
version: 2.8.0
|
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: 2018-01-
|
11
|
+
date: 2018-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|