sentry-raven 0.15.5 → 0.15.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7bf4fa0f5648bc799d41aedaf83dba7cdf04d8ff
4
- data.tar.gz: 8038cd249f6f681f9827d2de3bb2c1614d63efa9
3
+ metadata.gz: 1fff666c279a1df213e55db40a43a92d1d56e191
4
+ data.tar.gz: 6a14c52214fb0bcd5d17cd1cc34b97da444e8a39
5
5
  SHA512:
6
- metadata.gz: 824ad2ff4ca99cdb7a8b693d0fa0f764b4b9025f37394564e706dc425ddf44220689381922075267c53da1da2f33d1573ba95923c495e2e90379e8530c341484
7
- data.tar.gz: 73715706e1ebda37bbe70a3045def94b2a0716149bc6275ee53a0e1a4dfcde260a4af33c9e7967cd9f27f0a6f3aa8ef947677c6c57c4b3f7953187ce10438629
6
+ metadata.gz: ff2ac5a67aa7ce889707f05080aae60b6cceda1e2d16d4371b5da717727f91c542408887b83eadc9d41aff9746d336de7d640ba9d0d4caa5997f918d0467bd84
7
+ data.tar.gz: 405cf1e14b2b10e0a7c2fbc7ec114532e5de28fd0a95a16d69d64694f80517ca3bef012624c554f0b100aebd69263f3b819714195341b3a553ad7f98d1dc3a72
@@ -19,14 +19,22 @@ module Raven
19
19
  config.project_root ||= ::Rails.root
20
20
  config.release = config.detect_release # if project_root has changed, need to re-check
21
21
  end
22
+ end
22
23
 
24
+ config.after_initialize do
23
25
  if Raven.configuration.catch_debugged_exceptions
26
+ require 'raven/integrations/rails/middleware/debug_exceptions_catcher'
24
27
  if defined?(::ActionDispatch::DebugExceptions)
25
- require 'raven/integrations/rails/middleware/debug_exceptions_catcher'
26
- ::ActionDispatch::DebugExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher)
28
+ exceptions_class = ::ActionDispatch::DebugExceptions
27
29
  elsif defined?(::ActionDispatch::ShowExceptions)
28
- require 'raven/integrations/rails/middleware/debug_exceptions_catcher'
29
- ::ActionDispatch::ShowExceptions.send(:include, Raven::Rails::Middleware::DebugExceptionsCatcher)
30
+ exceptions_class = ::ActionDispatch::ShowExceptions
31
+ end
32
+ unless exceptions_class.nil?
33
+ if RUBY_VERSION.to_f < 2.0
34
+ exceptions_class.send(:include, Raven::Rails::Middleware::OldDebugExceptionsCatcher)
35
+ else
36
+ exceptions_class.send(:prepend, Raven::Rails::Middleware::DebugExceptionsCatcher)
37
+ end
30
38
  end
31
39
  end
32
40
  end
@@ -2,14 +2,27 @@ module Raven
2
2
  class Rails
3
3
  module Middleware
4
4
  module DebugExceptionsCatcher
5
+ def render_exception(env_or_request, exception)
6
+ begin
7
+ env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
8
+ Raven::Rack.capture_exception(exception, env)
9
+ rescue # rubocop:disable Lint/HandleExceptions
10
+ end
11
+ super
12
+ end
13
+ end
14
+
15
+ module OldDebugExceptionsCatcher
5
16
  def self.included(base)
6
17
  base.send(:alias_method_chain, :render_exception, :raven)
7
18
  end
8
19
 
9
20
  def render_exception_with_raven(env_or_request, exception)
10
- env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
11
- Raven::Rack.capture_exception(exception, env)
12
- ensure
21
+ begin
22
+ env = env_or_request.respond_to?(:env) ? env_or_request.env : env_or_request
23
+ Raven::Rack.capture_exception(exception, env)
24
+ rescue # rubocop:disable Lint/HandleExceptions
25
+ end
13
26
  render_exception_without_raven(env_or_request, exception)
14
27
  end
15
28
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Raven
3
- VERSION = "0.15.5".freeze
3
+ VERSION = "0.15.6".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.5
4
+ version: 0.15.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sentry Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-10 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday