airbrake-ruby 2.2.7 → 2.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96c76e788dda3944e4a14360e4e48ba6864938f1
4
- data.tar.gz: 6c5f94654244971e4c44fa5db2754f09f7b2101a
3
+ metadata.gz: 34586e6d64f9dbd1c09349e410715f5cef0bdc8f
4
+ data.tar.gz: 1091c58db7f0ecd1102062ef55fa7126ffe3cca5
5
5
  SHA512:
6
- metadata.gz: 04a7f0ef3467e490d6d9ec2d53b0077cc40e5221196d69d7b5b8de6e621db0a192e88d60a59d28b8d336cf48110d03c3d5142c945e083a95e9a35daa526ed894
7
- data.tar.gz: f4162f400ada8aaf99203c4b973983010ea26c41591f9a7b7e55a6aac784ee6753207a0d875db27cf2a5215d4122133a7863825c0abad15e62649e8a8ba4398e
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
@@ -4,5 +4,5 @@
4
4
  module Airbrake
5
5
  ##
6
6
  # @return [String] the library version
7
- AIRBRAKE_RUBY_VERSION = '2.2.7'.freeze
7
+ AIRBRAKE_RUBY_VERSION = '2.3.0'.freeze
8
8
  end
@@ -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
 
@@ -600,4 +600,9 @@ RSpec.describe Airbrake::Notifier do
600
600
  end
601
601
  end
602
602
  end
603
+
604
+ describe "#configured?" do
605
+ subject { described_class.new(airbrake_params) }
606
+ it { is_expected.to be_configured }
607
+ end
603
608
  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.7
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-24 00:00:00.000000000 Z
11
+ date: 2017-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec