opbeat 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Opbeat
2
2
 
3
- <!-- [![Build Status](https://secure.travis-ci.org/opbeat/opbeat_ruby-ruby.png?branch=master)](http://travis-ci.org/opbeat/opbeat_ruby-ruby) -->
3
+ [![Build Status](https://secure.travis-ci.org/opbeat/opbeat_ruby.png?branch=master)](http://travis-ci.org/opbeat/opbeat_ruby)
4
4
 
5
5
  A client and integration layer for [Opbeat](https://opbeat.com). Forked from the [raven-ruby](https://github.com/getsentry/raven-ruby) project.
6
6
 
@@ -13,11 +13,6 @@ Add the following to your `Gemfile`:
13
13
  gem "opbeat"
14
14
  ```
15
15
 
16
- <!-- Or install manually
17
- ```bash
18
- $ gem install sentry-opbeat_ruby
19
- ```
20
- -->
21
16
  ## Usage
22
17
 
23
18
  ### Rails 3 and Rails 4
data/lib/opbeat.rb CHANGED
@@ -11,6 +11,7 @@ require 'opbeat/interfaces/http'
11
11
  require 'opbeat/processors/sanitizedata'
12
12
 
13
13
  require 'opbeat/integrations/delayed_job'
14
+ require 'opbeat/integrations/sidekiq'
14
15
 
15
16
  require 'opbeat/railtie' if defined?(Rails::Railtie)
16
17
 
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'sidekiq'
3
+ rescue LoadError
4
+ end
5
+
6
+ if defined? Sidekiq
7
+ module Opbeat
8
+ module Integrations
9
+ class Sidekiq
10
+ def call(worker, msg, queue)
11
+ begin
12
+ yield
13
+ rescue Exception => ex
14
+ raise ex if [Interrupt, SystemExit, SignalException].include? ex.class
15
+ ::Opbeat.captureException(ex)
16
+ raise
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ ::Sidekiq.configure_server do |config|
24
+ if ::Sidekiq::VERSION < '3'
25
+ config.server_middleware do |chain|
26
+ chain.add ::Opbeat::Integrations::Sidekiq
27
+ end
28
+ else
29
+ config.error_handlers << Proc.new { |ex, ctx| ::Opbeat.captureException(ex) }
30
+ end
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module Opbeat
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-18 00:00:00.000000000 Z
13
+ date: 2014-06-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
17
- requirement: &22201320 !ruby/object:Gem::Requirement
17
+ requirement: &5926900 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.8.0.rc2
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *22201320
25
+ version_requirements: *5926900
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: uuidtools
28
- requirement: &22200260 !ruby/object:Gem::Requirement
28
+ requirement: &5924200 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 2.1.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *22200260
36
+ version_requirements: *5924200
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: multi_json
39
- requirement: &22197920 !ruby/object:Gem::Requirement
39
+ requirement: &5922020 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '1.0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *22197920
47
+ version_requirements: *5922020
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: hashie
50
- requirement: &22196520 !ruby/object:Gem::Requirement
50
+ requirement: &5920060 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: 2.1.1
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *22196520
58
+ version_requirements: *5920060
59
59
  description:
60
60
  email: ron@opbeat.com
61
61
  executables: []
@@ -72,6 +72,7 @@ files:
72
72
  - lib/opbeat/error.rb
73
73
  - lib/opbeat/event.rb
74
74
  - lib/opbeat/integrations/delayed_job.rb
75
+ - lib/opbeat/integrations/sidekiq.rb
75
76
  - lib/opbeat/interfaces/exception.rb
76
77
  - lib/opbeat/interfaces/http.rb
77
78
  - lib/opbeat/interfaces/message.rb