rollbar 2.6.3 → 2.7.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +9 -2
- data/lib/rollbar.rb +2 -0
- data/lib/rollbar/delayed_job.rb +7 -5
- data/lib/rollbar/version.rb +1 -1
- data/spec/rollbar/delayed_job_spec.rb +5 -1
- data/spec/rollbar_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd9b6e18ebb383811eeb94a71ebb3c257c6f8eb3
|
4
|
+
data.tar.gz: 53fff3d9e6c7e382ddad631f09fbbfb790761875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a71c85969223088bba62f91c54e68fc05bf803f7e7de5fdba8df2912ccb20d14b8eccb896ba6d5e1710f3b0695bcd0faca91a655e2edc93f229a287ebb79a52
|
7
|
+
data.tar.gz: 41ae2da0a51043db97987f019ef0628ae9b52f9385ae6772df2691c1b95171543d3883d6e2fad6e0c467f1545e48e3360bae41fde06d8f0296b9f0d848bede45
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 2.7.0
|
4
|
+
|
5
|
+
- Delayed job integration fix. See [#355](https://github.com/rollbar/rollbar-gem/pull/355).
|
6
|
+
- Delayed job support limited to versions >= 3.0
|
7
|
+
- Better diagnostic when failsafe is on. See [#354](https://github.com/rollbar/rollbar-gem/pull/354).
|
8
|
+
- Document Language/Framework Support. See [#352](https://github.com/rollbar/rollbar-gem/pull/352).
|
9
|
+
|
3
10
|
## 2.6.3
|
4
11
|
|
5
12
|
Change:
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rollbar notifier for Ruby [](https://travis-ci.org/rollbar/rollbar-gem/branches)
|
2
2
|
|
3
3
|
<!-- RemoveNext -->
|
4
4
|
[Rollbar](https://rollbar.com) is an error tracking service for Ruby and other languages. The Rollbar service will alert you of problems with your code and help you understand them in a ways never possible before. We love it and we hope you will too.
|
@@ -12,7 +12,7 @@ This is the Ruby library for Rollbar. It will instrument many kinds of Ruby appl
|
|
12
12
|
Add this line to your application's Gemfile:
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
gem 'rollbar', '~> 2.
|
15
|
+
gem 'rollbar', '~> 2.7.0'
|
16
16
|
```
|
17
17
|
|
18
18
|
If you are not using JRuby we suggest using [Oj](https://github.com/ohler55/oj) for JSON serialization. In order to install Oj you can add this line to your Gemfile:
|
@@ -446,6 +446,8 @@ If you use [custom jobs](https://github.com/collectiveidea/delayed_job#custom-jo
|
|
446
446
|
config.delayed_job_enabled = false
|
447
447
|
```
|
448
448
|
|
449
|
+
Only versions >= 3.0 of delayed_job are supported.
|
450
|
+
|
449
451
|
|
450
452
|
## Asynchronous reporting
|
451
453
|
|
@@ -703,6 +705,11 @@ Rollbar.configure do|config|
|
|
703
705
|
end
|
704
706
|
```
|
705
707
|
|
708
|
+
## Supported Language/Framework Versions
|
709
|
+
|
710
|
+
We support Ruby >= 1.8.7.
|
711
|
+
|
712
|
+
We support Rails >= 3.0.
|
706
713
|
|
707
714
|
## Help / Support
|
708
715
|
|
data/lib/rollbar.rb
CHANGED
@@ -628,6 +628,8 @@ module Rollbar
|
|
628
628
|
nearest_frame = backtrace[0]
|
629
629
|
|
630
630
|
exception_info = exception.class.name
|
631
|
+
# #to_s and #message defaults to class.to_s. Add message only if add valuable info.
|
632
|
+
exception_info += %Q{: "#{exception.message}"} if exception.message != exception.class.to_s
|
631
633
|
exception_info += " in #{nearest_frame}" if nearest_frame
|
632
634
|
|
633
635
|
body += "#{exception_info}: #{message}"
|
data/lib/rollbar/delayed_job.rb
CHANGED
@@ -23,12 +23,18 @@ module Rollbar
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
+
class RollbarPlugin < ::Delayed::Plugin
|
27
|
+
callbacks do |lifecycle|
|
28
|
+
lifecycle.around(:invoke_job, &Delayed::invoke_job_callback)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
26
32
|
self.wrapped = false
|
27
33
|
|
28
34
|
def self.wrap_worker
|
29
35
|
return if wrapped
|
30
36
|
|
31
|
-
|
37
|
+
::Delayed::Worker.plugins << RollbarPlugin
|
32
38
|
|
33
39
|
self.wrapped = true
|
34
40
|
end
|
@@ -39,10 +45,6 @@ module Rollbar
|
|
39
45
|
wrap_worker
|
40
46
|
end
|
41
47
|
|
42
|
-
def self.around_invoke_job(&block)
|
43
|
-
::Delayed::Worker.lifecycle.around(:invoke_job, &block)
|
44
|
-
end
|
45
|
-
|
46
48
|
def self.invoke_job_callback
|
47
49
|
proc do |job, *args, &block|
|
48
50
|
begin
|
data/lib/rollbar/version.rb
CHANGED
@@ -12,9 +12,13 @@ describe Rollbar::Delayed, :reconfigure_notifier => true do
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
+
before(:all) do
|
16
|
+
# technically, this is called once when rollbar hooks are required
|
17
|
+
Rollbar::Delayed.wrap_worker!
|
18
|
+
end
|
19
|
+
|
15
20
|
before do
|
16
21
|
Delayed::Backend::Test.prepare_worker
|
17
|
-
Rollbar::Delayed.wrap_worker!
|
18
22
|
|
19
23
|
Delayed::Worker.backend = :test
|
20
24
|
Delayed::Backend::Test::Job.delete_all
|
data/spec/rollbar_spec.rb
CHANGED
@@ -1575,6 +1575,17 @@ describe Rollbar do
|
|
1575
1575
|
notifier.send(:send_failsafe, nil, nil)
|
1576
1576
|
end
|
1577
1577
|
|
1578
|
+
context 'with a non default exception message' do
|
1579
|
+
let(:exception) { StandardError.new 'Something is wrong' }
|
1580
|
+
|
1581
|
+
it 'adds it to exception info' do
|
1582
|
+
sent_payload = notifier.send(:send_failsafe, "test failsafe", exception)
|
1583
|
+
|
1584
|
+
expected_message = 'Failsafe from rollbar-gem. StandardError: "Something is wrong": test failsafe'
|
1585
|
+
expect(sent_payload['data'][:body][:message][:body]).to be_eql(expected_message)
|
1586
|
+
end
|
1587
|
+
end
|
1588
|
+
|
1578
1589
|
context 'without exception object' do
|
1579
1590
|
it 'just sends the given message' do
|
1580
1591
|
sent_payload = notifier.send(:send_failsafe, "test failsafe", nil)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rollbar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|