airbrake-ruby 2.2.7 → 2.3.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.rb +7 -0
- data/lib/airbrake-ruby/notifier.rb +10 -0
- data/lib/airbrake-ruby/version.rb +1 -1
- data/spec/airbrake_spec.rb +13 -0
- data/spec/notifier_spec.rb +5 -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: 34586e6d64f9dbd1c09349e410715f5cef0bdc8f
|
4
|
+
data.tar.gz: 1091c58db7f0ecd1102062ef55fa7126ffe3cca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a12047f38b1213c1fd0e61acc87933f5b858d961fa9d47b1922cc222b30d35648f5b99bce9932efa12553c4156b39b45ceaedfbc1cea9be3adaa68b832bad51
|
7
|
+
data.tar.gz: e80a12b9aae780e23d8b8b98ad4564ce05bfe9abe91c0640c5384857576e67b038667699ba20b5a7a8883ba56f9570ccef5dbc55c1407a2bc2972441f8efcabd
|
data/lib/airbrake-ruby.rb
CHANGED
@@ -135,6 +135,13 @@ module Airbrake
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
##
|
139
|
+
# @return [Boolean] true if the notifier was configured, false otherwise
|
140
|
+
# @since 2.3.0
|
141
|
+
def configured?
|
142
|
+
@notifiers[:default].configured?
|
143
|
+
end
|
144
|
+
|
138
145
|
##
|
139
146
|
# Sends an exception to Airbrake asynchronously.
|
140
147
|
#
|
@@ -94,6 +94,12 @@ module Airbrake
|
|
94
94
|
promise
|
95
95
|
end
|
96
96
|
|
97
|
+
##
|
98
|
+
# @macro see_public_api_method
|
99
|
+
def configured?
|
100
|
+
@config.valid?
|
101
|
+
end
|
102
|
+
|
97
103
|
private
|
98
104
|
|
99
105
|
def convert_to_exception(ex)
|
@@ -184,5 +190,9 @@ module Airbrake
|
|
184
190
|
def close; end
|
185
191
|
|
186
192
|
def create_deploy(_deploy_params); end
|
193
|
+
|
194
|
+
def configured?
|
195
|
+
false
|
196
|
+
end
|
187
197
|
end
|
188
198
|
end
|
data/spec/airbrake_spec.rb
CHANGED
@@ -145,6 +145,19 @@ RSpec.describe Airbrake do
|
|
145
145
|
end
|
146
146
|
end
|
147
147
|
|
148
|
+
describe ".configured?" do
|
149
|
+
before do
|
150
|
+
described_class.instance_variable_set(
|
151
|
+
:@notifiers,
|
152
|
+
Hash.new(Airbrake::NilNotifier.new)
|
153
|
+
)
|
154
|
+
end
|
155
|
+
|
156
|
+
it "returns false" do
|
157
|
+
expect(described_class).not_to be_configured
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
148
161
|
describe ".add_filter" do
|
149
162
|
include_examples 'non-configured notifier handling', :add_filter
|
150
163
|
|
data/spec/notifier_spec.rb
CHANGED
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.3.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: 2017-06
|
11
|
+
date: 2017-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|