rollbar 1.2.2 → 1.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +2 -2
- data/lib/rollbar.rb +5 -1
- data/lib/rollbar/request_data_extractor.rb +4 -3
- data/lib/rollbar/version.rb +1 -1
- data/spec/rollbar/middleware/rack/builder_spec.rb +13 -2
- data/spec/spec_helper.rb +1 -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: 974df157ef4f414f7ced05c23d2d0be0f4d49a9f
|
4
|
+
data.tar.gz: 479ae3bd11bb3de2de5642f3b276f58a40640924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6cc68a7e71d5d3aa58665ad4413a2bf865346d4b187147206c1075d5dc06832bdd0a1d43231f275fd97b265dc813dcf3376932f1111fdbf235d9cc498887d24
|
7
|
+
data.tar.gz: 65e503c7599b35d659f2a2f45687a3e089ce034913279bd3ac1919ebc29c6dd31966f5dd881e17b01c137c943240319cd6592e507a5e968c7b1c468bd0d1fd0a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
**1.2.3**
|
4
|
+
- Fix issue where requiring 'rack' unnecessarily broke things in non-rack apps. See [#150](https://github.com/rollbar/rollbar-gem/pull/150)
|
5
|
+
- Bring back `enforce_valid_utf8`, which got lost in the 1.2.0 upgrade. See [#148](https://github.com/rollbar/rollbar-gem/pull/148)
|
6
|
+
- Fix bug with raw post extraction for application/json requests. See [#147](https://github.com/rollbar/rollbar-gem/pull/147)
|
7
|
+
|
3
8
|
**1.2.2**
|
4
9
|
- Fix issue with delayed_job and Rollbar.report_exception (bug introduced in 1.2.0). See [#145](https://github.com/rollbar/rollbar-gem/issues/145)
|
5
10
|
- Explicitly require 'rack' in request_data_extractor. See [#144](https://github.com/rollbar/rollbar-gem/pull/144)
|
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.
|
12
|
+
gem 'rollbar', '~> 1.1.0'
|
13
13
|
|
14
14
|
And then execute:
|
15
15
|
|
data/lib/rollbar.rb
CHANGED
@@ -279,10 +279,14 @@ module Rollbar
|
|
279
279
|
|
280
280
|
Rollbar::Util.deep_merge(data, configuration.payload_options)
|
281
281
|
|
282
|
-
{
|
282
|
+
payload = {
|
283
283
|
'access_token' => configuration.access_token,
|
284
284
|
'data' => data
|
285
285
|
}
|
286
|
+
|
287
|
+
enforce_valid_utf8(payload)
|
288
|
+
|
289
|
+
payload
|
286
290
|
end
|
287
291
|
|
288
292
|
def build_payload_body(message, exception, extra)
|
@@ -103,10 +103,11 @@ module Rollbar
|
|
103
103
|
def rollbar_raw_post_params(rack_req)
|
104
104
|
return {} unless rack_req.env['CONTENT_TYPE'] =~ %r{application/json}i
|
105
105
|
|
106
|
-
|
106
|
+
MultiJson.decode(rack_req.body.read)
|
107
|
+
rescue
|
108
|
+
{}
|
109
|
+
ensure
|
107
110
|
rack_req.body.rewind
|
108
|
-
|
109
|
-
params
|
110
111
|
end
|
111
112
|
|
112
113
|
def rollbar_request_params(env)
|
data/lib/rollbar/version.rb
CHANGED
@@ -40,7 +40,6 @@ describe Rollbar::Middleware::Rack::Builder do
|
|
40
40
|
request.get('/will_crash', :params => params)
|
41
41
|
end.to raise_error(exception)
|
42
42
|
|
43
|
-
|
44
43
|
expect(Rollbar.last_report[:request][:params]).to be_eql(params)
|
45
44
|
end
|
46
45
|
end
|
@@ -52,10 +51,22 @@ describe Rollbar::Middleware::Rack::Builder do
|
|
52
51
|
|
53
52
|
it 'sends them to Rollbar' do
|
54
53
|
expect do
|
55
|
-
request.post('/will_crash', :
|
54
|
+
request.post('/will_crash', :input => params.to_json, 'CONTENT_TYPE' => 'application/json')
|
56
55
|
end.to raise_error(exception)
|
57
56
|
|
58
57
|
expect(Rollbar.last_report[:request][:params]).to be_eql(params)
|
59
58
|
end
|
59
|
+
|
60
|
+
context 'with crashing payload' do
|
61
|
+
let(:body) { 'this is not a valid json' }
|
62
|
+
|
63
|
+
it 'returns {} and doesnt raise' do
|
64
|
+
expect do
|
65
|
+
request.post('/dont_crash', :input => body, 'CONTENT_TYPE' => 'application/json')
|
66
|
+
end.to raise_error(exception)
|
67
|
+
|
68
|
+
expect(Rollbar.last_report[:request][:params]).to be_eql({})
|
69
|
+
end
|
70
|
+
end
|
60
71
|
end
|
61
72
|
end
|
data/spec/spec_helper.rb
CHANGED
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.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rollbar, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|