rollbar 2.12.0 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -6
  3. data/README.md +58 -8
  4. data/docs/configuration.md +12 -0
  5. data/gemfiles/rails30.gemfile +1 -0
  6. data/gemfiles/rails31.gemfile +1 -0
  7. data/gemfiles/rails32.gemfile +1 -0
  8. data/gemfiles/rails40.gemfile +3 -0
  9. data/gemfiles/rails41.gemfile +1 -0
  10. data/gemfiles/rails42.gemfile +7 -1
  11. data/gemfiles/rails50.gemfile +2 -1
  12. data/gemfiles/ruby_1_8_and_1_9_2.gemfile +3 -1
  13. data/lib/rollbar.rb +70 -654
  14. data/lib/rollbar/configuration.rb +32 -0
  15. data/lib/rollbar/item.rb +16 -6
  16. data/lib/rollbar/item/backtrace.rb +26 -17
  17. data/lib/rollbar/item/frame.rb +112 -0
  18. data/lib/rollbar/middleware/js.rb +39 -35
  19. data/lib/rollbar/middleware/rails/rollbar.rb +3 -3
  20. data/lib/rollbar/notifier.rb +645 -0
  21. data/lib/rollbar/plugins/delayed_job/job_data.rb +40 -21
  22. data/lib/rollbar/plugins/rails.rb +2 -2
  23. data/lib/rollbar/plugins/rake.rb +32 -6
  24. data/lib/rollbar/plugins/resque.rb +11 -0
  25. data/lib/rollbar/plugins/resque/failure.rb +39 -0
  26. data/lib/rollbar/plugins/validations.rb +10 -0
  27. data/lib/rollbar/request_data_extractor.rb +36 -18
  28. data/lib/rollbar/scrubbers/params.rb +2 -1
  29. data/lib/rollbar/truncation.rb +1 -1
  30. data/lib/rollbar/truncation/frames_strategy.rb +2 -1
  31. data/lib/rollbar/truncation/min_body_strategy.rb +2 -1
  32. data/lib/rollbar/truncation/strings_strategy.rb +1 -1
  33. data/lib/rollbar/version.rb +1 -1
  34. data/spec/controllers/home_controller_spec.rb +13 -24
  35. data/spec/delayed/backend/test.rb +1 -0
  36. data/spec/requests/home_spec.rb +1 -1
  37. data/spec/rollbar/configuration_spec.rb +22 -0
  38. data/spec/rollbar/item/backtrace_spec.rb +26 -0
  39. data/spec/rollbar/item/frame_spec.rb +267 -0
  40. data/spec/rollbar/item_spec.rb +27 -2
  41. data/spec/rollbar/middleware/js_spec.rb +23 -0
  42. data/spec/rollbar/middleware/sinatra_spec.rb +7 -7
  43. data/spec/rollbar/notifier_spec.rb +43 -0
  44. data/spec/rollbar/plugins/delayed_job/{job_data.rb → job_data_spec.rb} +15 -2
  45. data/spec/rollbar/plugins/rack_spec.rb +7 -7
  46. data/spec/rollbar/plugins/rake_spec.rb +1 -2
  47. data/spec/rollbar/plugins/resque/failure_spec.rb +36 -0
  48. data/spec/rollbar/request_data_extractor_spec.rb +103 -1
  49. data/spec/rollbar/truncation/min_body_strategy_spec.rb +1 -1
  50. data/spec/rollbar/truncation/strings_strategy_spec.rb +2 -2
  51. data/spec/rollbar_bc_spec.rb +4 -4
  52. data/spec/rollbar_spec.rb +99 -37
  53. data/spec/spec_helper.rb +2 -2
  54. data/spec/support/notifier_helpers.rb +2 -0
  55. metadata +16 -4
data/spec/spec_helper.rb CHANGED
@@ -65,12 +65,12 @@ RSpec.configure do |config|
65
65
  config.before(:each) do
66
66
  DatabaseCleaner.start
67
67
  DatabaseCleaner.clean
68
- Rollbar.reset_notifier!
68
+ Rollbar.clear_notifier!
69
69
 
70
70
  stub_request(:any, /api.rollbar.com/).to_rack(RollbarAPI.new) if defined?(WebMock)
71
71
  end
72
72
 
73
- config.after(:each) do
73
+ config.after do
74
74
  DatabaseCleaner.clean
75
75
  end
76
76
 
@@ -1,5 +1,7 @@
1
1
  module NotifierHelpers
2
2
  def reconfigure_notifier
3
+ Rollbar.clear_notifier!
4
+
3
5
  Rollbar.reconfigure do |config|
4
6
  # special test access token
5
7
  config.access_token = test_access_token
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.12.0
4
+ version: 2.13.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: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -78,6 +78,7 @@ files:
78
78
  - lib/rollbar/exceptions.rb
79
79
  - lib/rollbar/item.rb
80
80
  - lib/rollbar/item/backtrace.rb
81
+ - lib/rollbar/item/frame.rb
81
82
  - lib/rollbar/js.rb
82
83
  - lib/rollbar/json.rb
83
84
  - lib/rollbar/json/default.rb
@@ -92,6 +93,7 @@ files:
92
93
  - lib/rollbar/middleware/rails/rollbar.rb
93
94
  - lib/rollbar/middleware/rails/show_exceptions.rb
94
95
  - lib/rollbar/middleware/sinatra.rb
96
+ - lib/rollbar/notifier.rb
95
97
  - lib/rollbar/plugin.rb
96
98
  - lib/rollbar/plugins.rb
97
99
  - lib/rollbar/plugins/active_job.rb
@@ -107,6 +109,8 @@ files:
107
109
  - lib/rollbar/plugins/rails/railtie32.rb
108
110
  - lib/rollbar/plugins/rails/railtie_mixin.rb
109
111
  - lib/rollbar/plugins/rake.rb
112
+ - lib/rollbar/plugins/resque.rb
113
+ - lib/rollbar/plugins/resque/failure.rb
110
114
  - lib/rollbar/plugins/sidekiq.rb
111
115
  - lib/rollbar/plugins/sidekiq/plugin.rb
112
116
  - lib/rollbar/plugins/thread.rb
@@ -206,6 +210,8 @@ files:
206
210
  - spec/rollbar/delay/resque_spec.rb
207
211
  - spec/rollbar/delay/thread_spec.rb
208
212
  - spec/rollbar/encoding/encoder_spec.rb
213
+ - spec/rollbar/item/backtrace_spec.rb
214
+ - spec/rollbar/item/frame_spec.rb
209
215
  - spec/rollbar/item_spec.rb
210
216
  - spec/rollbar/json/oj_spec.rb
211
217
  - spec/rollbar/json_spec.rb
@@ -214,13 +220,15 @@ files:
214
220
  - spec/rollbar/logger_spec.rb
215
221
  - spec/rollbar/middleware/js_spec.rb
216
222
  - spec/rollbar/middleware/sinatra_spec.rb
223
+ - spec/rollbar/notifier_spec.rb
217
224
  - spec/rollbar/plugin_spec.rb
218
225
  - spec/rollbar/plugins/active_job_spec.rb
219
- - spec/rollbar/plugins/delayed_job/job_data.rb
226
+ - spec/rollbar/plugins/delayed_job/job_data_spec.rb
220
227
  - spec/rollbar/plugins/delayed_job_spec.rb
221
228
  - spec/rollbar/plugins/rack_spec.rb
222
229
  - spec/rollbar/plugins/rails_js_spec.rb
223
230
  - spec/rollbar/plugins/rake_spec.rb
231
+ - spec/rollbar/plugins/resque/failure_spec.rb
224
232
  - spec/rollbar/plugins/sidekiq_spec.rb
225
233
  - spec/rollbar/plugins/validations_spec.rb
226
234
  - spec/rollbar/plugins_spec.rb
@@ -349,6 +357,8 @@ test_files:
349
357
  - spec/rollbar/delay/resque_spec.rb
350
358
  - spec/rollbar/delay/thread_spec.rb
351
359
  - spec/rollbar/encoding/encoder_spec.rb
360
+ - spec/rollbar/item/backtrace_spec.rb
361
+ - spec/rollbar/item/frame_spec.rb
352
362
  - spec/rollbar/item_spec.rb
353
363
  - spec/rollbar/json/oj_spec.rb
354
364
  - spec/rollbar/json_spec.rb
@@ -357,13 +367,15 @@ test_files:
357
367
  - spec/rollbar/logger_spec.rb
358
368
  - spec/rollbar/middleware/js_spec.rb
359
369
  - spec/rollbar/middleware/sinatra_spec.rb
370
+ - spec/rollbar/notifier_spec.rb
360
371
  - spec/rollbar/plugin_spec.rb
361
372
  - spec/rollbar/plugins/active_job_spec.rb
362
- - spec/rollbar/plugins/delayed_job/job_data.rb
373
+ - spec/rollbar/plugins/delayed_job/job_data_spec.rb
363
374
  - spec/rollbar/plugins/delayed_job_spec.rb
364
375
  - spec/rollbar/plugins/rack_spec.rb
365
376
  - spec/rollbar/plugins/rails_js_spec.rb
366
377
  - spec/rollbar/plugins/rake_spec.rb
378
+ - spec/rollbar/plugins/resque/failure_spec.rb
367
379
  - spec/rollbar/plugins/sidekiq_spec.rb
368
380
  - spec/rollbar/plugins/validations_spec.rb
369
381
  - spec/rollbar/plugins_spec.rb