sentry-raven 0.9.2 → 0.9.3

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.

Potentially problematic release.


This version of sentry-raven might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZWYzMjMzNTdjYzgxNTAxZDFlMjY1NTlhZTliNmIwYThmYmRkNTFlYQ==
4
+ NzIzNTdmZTFhMzczN2Y0N2FmYzI2MzU3NDNlYzAyNzQzYTZlYjNjNQ==
5
5
  data.tar.gz: !binary |-
6
- YzczYzg4OTM1OGM0MzRkNGRmN2Y4MDE3NjRlOTA4MzVhZGYzODQ1MQ==
6
+ YzY2NzdmMGUyMTFjNzE5ODNhOGYxYWUzNGIyMDZmYjdjYTZkOWJiMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzYwZThkYWEwNGIwYzg4ZjY3ZTkzMjUyYmJkZTA2ZmVhMzEwNzk4OTBhMmY0
10
- YjdjYzM3MWQxYzUwYmY1Yzk5MjZlZTQ1ZTViZDVhZTk3MTgyZWU5NjM3YTVh
11
- NmI1Nzc3N2NiZTBjNjM0N2FlOGNjZThiMGQ1OWJkNzhlOGRhYTc=
9
+ NmM5NjIzYWM0MjMwNWMyMWU5M2E0NjdiZTViOGY4OTM5YzA2ODVmZjBkYjM1
10
+ NTYzZDA0ZmI2OGU4N2IxZGU1NDJkZTM1YmFlYWViOTgxMTViZDc0ODE4ZTU1
11
+ MWU1NmRkZmUzYzNkMmQ2ZmU3MTRmZWMwMWE4ZmUzYTVmYTNlOGE=
12
12
  data.tar.gz: !binary |-
13
- ZDVhMDEwNjJkZTUwOTM3NmQ1N2RhYTgxMjFmZDQ3ODU0ZDA5Y2NiZjQzMDRi
14
- YWQ1ZWE5NDVlNWJjNzNkMTY0MDJmNTAxMWFlNDcwMWExOGNiZTg5YWRlZGU3
15
- MDZkZjUzZmJmMzQyODdkNWJlNTZlMGE3NWFiZWUyZWFhMzBmODM=
13
+ YTM3NDJkZjEzMDg3NWI2MTgzZmMzNGY3ZDQzZmRkODM2ZDZkZWE1NjUyZmU2
14
+ ZThjZjc1ODQ1NWY3OTQzNTdhZjMzYjA3YTgwMWI2ZGVhNzVlYmYxNjk5ZDA0
15
+ Zjc5NWJhNmYyM2ZlZjhiMWU5YjMzNmZkYTAzMmI3Zjg1YmVmMjE=
@@ -11,7 +11,6 @@ require 'raven/interfaces/exception'
11
11
  require 'raven/interfaces/stack_trace'
12
12
  require 'raven/interfaces/http'
13
13
  require 'raven/processors/sanitizedata'
14
- require 'raven/integrations/delayed_job'
15
14
 
16
15
  module Raven
17
16
  class << self
@@ -197,9 +196,11 @@ module Raven
197
196
  self.context.rack_env = env
198
197
  end
199
198
 
200
- # Injects rails
199
+ # Injects various integrations
201
200
  def inject
202
- require 'raven/railtie' if defined?(Rails::Railtie)
201
+ # TODO(dcramer): integrations should have a way to opt-out
202
+ require 'raven/integrations/delayed_job' if defined?(::Delayed::Plugin)
203
+ require 'raven/railtie' if defined?(::Rails::Railtie)
203
204
  require 'raven/sidekiq' if defined?(Sidekiq)
204
205
  require 'raven/tasks' if defined?(Rake)
205
206
  end
@@ -1,51 +1,49 @@
1
- if defined?(Delayed)
2
- require 'delayed_job'
1
+ require 'delayed_job'
3
2
 
4
- module Delayed
5
- module Plugins
3
+ module Delayed
4
+ module Plugins
6
5
 
7
- class Raven < ::Delayed::Plugin
8
- callbacks do |lifecycle|
9
- lifecycle.around(:invoke_job) do |job, *args, &block|
10
- begin
11
- # Forward the call to the next callback in the callback chain
12
- block.call(job, *args)
6
+ class Raven < ::Delayed::Plugin
7
+ callbacks do |lifecycle|
8
+ lifecycle.around(:invoke_job) do |job, *args, &block|
9
+ begin
10
+ # Forward the call to the next callback in the callback chain
11
+ block.call(job, *args)
13
12
 
14
- rescue Exception => exception
15
- # Log error to Sentry
16
- ::Raven.capture_exception(exception,
17
- :logger => 'delayed_job',
18
- :tags => {
19
- :delayed_job_queue => job.queue
20
- },
21
- :extra => {
22
- :delayed_job => {
23
- :id => job.id,
24
- :priority => job.priority,
25
- :attempts => job.attempts,
26
- :handler => job.handler,
27
- :last_error => job.last_error,
28
- :run_at => job.run_at,
29
- :locked_at => job.locked_at,
30
- #failed_at => job.failed_at,
31
- :locked_by => job.locked_by,
32
- :queue => job.queue,
33
- :created_at => job.created_at
34
- }
35
- })
13
+ rescue Exception => exception
14
+ # Log error to Sentry
15
+ ::Raven.capture_exception(exception,
16
+ :logger => 'delayed_job',
17
+ :tags => {
18
+ :delayed_job_queue => job.queue
19
+ },
20
+ :extra => {
21
+ :delayed_job => {
22
+ :id => job.id,
23
+ :priority => job.priority,
24
+ :attempts => job.attempts,
25
+ :handler => job.handler,
26
+ :last_error => job.last_error,
27
+ :run_at => job.run_at,
28
+ :locked_at => job.locked_at,
29
+ #failed_at => job.failed_at,
30
+ :locked_by => job.locked_by,
31
+ :queue => job.queue,
32
+ :created_at => job.created_at
33
+ }
34
+ })
36
35
 
37
- # Make sure we propagate the failure!
38
- raise exception
39
- end
36
+ # Make sure we propagate the failure!
37
+ raise exception
40
38
  end
41
39
  end
42
40
  end
43
-
44
41
  end
45
- end
46
42
 
47
- ##
48
- # Register DelayedJob Raven plugin
49
- #
50
- Delayed::Worker.plugins << Delayed::Plugins::Raven
43
+ end
51
44
  end
45
+
46
+ ##
47
+ # Register DelayedJob Raven plugin
48
+ #
49
+ Delayed::Worker.plugins << Delayed::Plugins::Raven
@@ -1,3 +1,3 @@
1
1
  module Raven
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentry-raven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Kantrowitz
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-08 00:00:00.000000000 Z
12
+ date: 2014-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday