airbrake-ruby 1.3.1 → 1.3.2

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: 14a1f47941cce7fb05a4606b830dad7d5021a808
4
- data.tar.gz: 0c3bfcea4c50a6bfe983e15432bab8fe966ed327
3
+ metadata.gz: 26dc2614a9b7f3853bf504c7bf59e87844c0d319
4
+ data.tar.gz: ab91d35ff054319c4c15b97f7286cb80748410b7
5
5
  SHA512:
6
- metadata.gz: 38deadf6ffea07e915398e08258766b86ab8b22a276622326c6ebd66b792da1f97beccaec485da2dc6edef81193b028926c539aac2966f2dffd436721fe6bac0
7
- data.tar.gz: 6fa74b32ceb3907eaf1e0173c3d78fca7fefe3b0e94d9cad44b092abfafb7d0d57c2d81ed861d7c833e0b46689c3b81b1de1a74ac54203e80f6e9318b1526f8e
6
+ metadata.gz: 8be384f5265c4232b4ef0f4239b41837ef9b5974bb95361a5d554a100d393a37314aa7fbe7e586953159f3ab7dc860a02938be41a9bc2cf4dd7c5ce015cd6400
7
+ data.tar.gz: 6b1086df37f5f2dbbf29f09caa4e3b1205bc41e323ec046868d528d1fa07f2e47a9de078f4878d6bf8d2bb085a3efbc9c401be3fba51d7de09de63c468ef39f4
@@ -33,10 +33,6 @@ module Airbrake
33
33
  def initialize(config)
34
34
  @filters = []
35
35
 
36
- if config.ignore_environments.any?
37
- add_filter(env_filter(config.environment, config.ignore_environments))
38
- end
39
-
40
36
  [SYSTEM_EXIT_FILTER, GEM_ROOT_FILTER].each do |filter|
41
37
  add_filter(filter)
42
38
  end
@@ -76,11 +72,5 @@ module Airbrake
76
72
  end
77
73
  end
78
74
  end
79
-
80
- def env_filter(environment, ignore_environments)
81
- proc do |notice|
82
- notice.ignore! if ignore_environments.include?(environment)
83
- end
84
- end
85
75
  end
86
76
  end
@@ -143,6 +143,10 @@ module Airbrake
143
143
  end
144
144
 
145
145
  def send_notice(exception, params, sender = default_sender)
146
+ if @config.ignore_environments.any?
147
+ return if @config.ignore_environments.include?(@config.environment)
148
+ end
149
+
146
150
  notice = build_notice(exception, params)
147
151
  @filter_chain.refine(notice)
148
152
  return if notice.ignored?
@@ -3,5 +3,5 @@
3
3
  module Airbrake
4
4
  ##
5
5
  # @return [String] the library version
6
- AIRBRAKE_RUBY_VERSION = '1.3.1'.freeze
6
+ AIRBRAKE_RUBY_VERSION = '1.3.2'.freeze
7
7
  end
@@ -205,6 +205,14 @@ RSpec.describe Airbrake::Notifier do
205
205
  }
206
206
 
207
207
  include_examples 'ignored notice', params
208
+
209
+ it "returns early and doesn't try to parse the given exception" do
210
+ airbrake = described_class.new(airbrake_params.merge(params))
211
+
212
+ expect(Airbrake::Notice).not_to receive(:new)
213
+ expect(airbrake.notify_sync(ex)).to be_nil
214
+ expect(a_request(:post, endpoint)).not_to have_been_made
215
+ end
208
216
  end
209
217
 
210
218
  context "when the current env is not set and notify envs are present" 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: 1.3.1
4
+ version: 1.3.2
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: 2016-05-13 00:00:00.000000000 Z
11
+ date: 2016-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec