rollbar 1.4.1 → 1.4.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +2 -2
- data/lib/rollbar.rb +8 -7
- data/lib/rollbar/version.rb +1 -1
- data/spec/rollbar_spec.rb +20 -1
- 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: c71304582c4e3e90c305212907f516cce923104a
|
4
|
+
data.tar.gz: 233e2f5605cefcdce34ae82021d176c349c5fbb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea71e508f060e52cc6e80320035fd9f97ad269ba3a7635b1dce6554910ed18f3be0cab12ecb373f2d1f6b9213d28b87d7f85bd470926e26b3b44328adb246d3d
|
7
|
+
data.tar.gz: d7399f7773162732ddba0f66f5080818005308d03ab8e4d3e110b966b54d595439f2ccaa5cc16a85b997cd22939d9ec1de2777862e4d9dc675a4004b26d285f4
|
data/CHANGELOG.md
CHANGED
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
|
Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https://rollbar.com).
|
@@ -9,7 +9,7 @@ Ruby gem for reporting exceptions, errors, and log messages to [Rollbar](https:/
|
|
9
9
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
11
|
|
12
|
-
gem 'rollbar', '~> 1.4.
|
12
|
+
gem 'rollbar', '~> 1.4.2'
|
13
13
|
|
14
14
|
And then execute:
|
15
15
|
|
data/lib/rollbar.rb
CHANGED
@@ -228,15 +228,8 @@ module Rollbar
|
|
228
228
|
if data[:person]
|
229
229
|
person_id = data[:person][configuration.person_id_method.to_sym]
|
230
230
|
return 'ignored' if configuration.ignored_person_ids.include?(person_id)
|
231
|
-
|
232
|
-
is_proc = data[:person].respond_to?(:call)
|
233
|
-
data[:person] = data[:person].call if is_proc
|
234
231
|
end
|
235
232
|
|
236
|
-
data[:request] = data[:request].call if data[:request].respond_to?(:call)
|
237
|
-
data[:context] = data[:context].call if data[:context].respond_to?(:call)
|
238
|
-
data.delete(:context) unless data[:context]
|
239
|
-
|
240
233
|
schedule_payload(payload)
|
241
234
|
|
242
235
|
log_instance_link(data)
|
@@ -300,6 +293,14 @@ module Rollbar
|
|
300
293
|
|
301
294
|
Rollbar::Util.deep_merge(data, configuration.payload_options)
|
302
295
|
|
296
|
+
data[:person] = data[:person].call if data[:person].respond_to?(:call)
|
297
|
+
data[:request] = data[:request].call if data[:request].respond_to?(:call)
|
298
|
+
data[:context] = data[:context].call if data[:context].respond_to?(:call)
|
299
|
+
|
300
|
+
# Our API doesn't allow null context values, so just delete
|
301
|
+
# the key if value is nil.
|
302
|
+
data.delete(:context) unless data[:context]
|
303
|
+
|
303
304
|
payload = {
|
304
305
|
'access_token' => configuration.access_token,
|
305
306
|
'data' => data
|
data/lib/rollbar/version.rb
CHANGED
data/spec/rollbar_spec.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# encoding:
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'logger'
|
4
4
|
require 'socket'
|
@@ -1490,6 +1490,25 @@ describe Rollbar do
|
|
1490
1490
|
end
|
1491
1491
|
end
|
1492
1492
|
|
1493
|
+
context 'when reporting internal error with nil context' do
|
1494
|
+
let(:context_proc) { proc {} }
|
1495
|
+
let(:scoped_notifier) { notifier.scope(:context => context_proc) }
|
1496
|
+
let(:exception) { Exception.new }
|
1497
|
+
let(:logger_mock) { double("Rails.logger").as_null_object }
|
1498
|
+
|
1499
|
+
it 'reports successfully' do
|
1500
|
+
configure
|
1501
|
+
|
1502
|
+
Rollbar.configure do |config|
|
1503
|
+
config.logger = logger_mock
|
1504
|
+
end
|
1505
|
+
|
1506
|
+
logger_mock.should_receive(:info).with('[Rollbar] Sending payload').once
|
1507
|
+
logger_mock.should_receive(:info).with('[Rollbar] Success').once
|
1508
|
+
scoped_notifier.send(:report_internal_error, exception)
|
1509
|
+
end
|
1510
|
+
end
|
1511
|
+
|
1493
1512
|
context "request_data_extractor" do
|
1494
1513
|
before(:each) do
|
1495
1514
|
class DummyClass
|
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: 1.4.
|
4
|
+
version: 1.4.2
|
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-01-
|
11
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|