rollbar 2.19.1 → 2.27.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +5 -5
  2. data/.github/pull_request_template.md +25 -0
  3. data/.rubocop.yml +168 -0
  4. data/.travis.yml +63 -34
  5. data/Appraisals +10 -10
  6. data/Gemfile +35 -14
  7. data/README.md +5 -2
  8. data/Rakefile +0 -0
  9. data/data/rollbar.snippet.js +1 -1
  10. data/docs/configuration.md +17 -0
  11. data/gemfiles/rails30.gemfile +10 -10
  12. data/gemfiles/rails31.gemfile +10 -9
  13. data/gemfiles/rails32.gemfile +10 -9
  14. data/gemfiles/rails40.gemfile +10 -9
  15. data/gemfiles/rails41.gemfile +10 -9
  16. data/gemfiles/rails42.gemfile +12 -9
  17. data/gemfiles/rails50.gemfile +21 -14
  18. data/gemfiles/rails51.gemfile +21 -14
  19. data/gemfiles/rails52.gemfile +15 -12
  20. data/gemfiles/rails60.gemfile +67 -0
  21. data/lib/generators/rollbar/rollbar_generator.rb +1 -1
  22. data/lib/rails/rollbar_runner.rb +4 -2
  23. data/lib/rollbar/capistrano.rb +1 -1
  24. data/lib/rollbar/capistrano3.rb +6 -3
  25. data/lib/rollbar/capistrano_tasks.rb +29 -21
  26. data/lib/rollbar/configuration.rb +86 -16
  27. data/lib/rollbar/delay/girl_friday.rb +4 -8
  28. data/lib/rollbar/delay/resque.rb +3 -6
  29. data/lib/rollbar/delay/sidekiq.rb +4 -10
  30. data/lib/rollbar/delay/sucker_punch.rb +16 -19
  31. data/lib/rollbar/delay/thread.rb +16 -2
  32. data/lib/rollbar/deploy.rb +52 -29
  33. data/lib/rollbar/encoding/encoder.rb +17 -10
  34. data/lib/rollbar/exception_reporter.rb +19 -5
  35. data/lib/rollbar/item/backtrace.rb +13 -3
  36. data/lib/rollbar/item/frame.rb +9 -1
  37. data/lib/rollbar/item/locals.rb +100 -0
  38. data/lib/rollbar/item.rb +56 -17
  39. data/lib/rollbar/json.rb +6 -51
  40. data/lib/rollbar/language_support.rb +4 -20
  41. data/lib/rollbar/lazy_store.rb +5 -5
  42. data/lib/rollbar/logger.rb +1 -0
  43. data/lib/rollbar/logger_proxy.rb +6 -2
  44. data/lib/rollbar/middleware/js.rb +28 -18
  45. data/lib/rollbar/middleware/rack.rb +4 -1
  46. data/lib/rollbar/middleware/rails/rollbar.rb +10 -1
  47. data/lib/rollbar/notifier/trace_with_bindings.rb +65 -0
  48. data/lib/rollbar/notifier.rb +225 -89
  49. data/lib/rollbar/plugin.rb +54 -6
  50. data/lib/rollbar/plugins/active_job.rb +6 -2
  51. data/lib/rollbar/plugins/basic_socket.rb +21 -6
  52. data/lib/rollbar/plugins/delayed_job/job_data.rb +3 -3
  53. data/lib/rollbar/plugins/delayed_job/plugin.rb +13 -3
  54. data/lib/rollbar/plugins/error_context.rb +11 -0
  55. data/lib/rollbar/plugins/goalie.rb +11 -3
  56. data/lib/rollbar/plugins/rails/controller_methods.rb +15 -3
  57. data/lib/rollbar/plugins/rake.rb +2 -2
  58. data/lib/rollbar/plugins/sidekiq/plugin.rb +5 -4
  59. data/lib/rollbar/plugins.rb +7 -1
  60. data/lib/rollbar/rake_tasks.rb +4 -148
  61. data/lib/rollbar/request_data_extractor.rb +31 -21
  62. data/lib/rollbar/rollbar_test.rb +36 -0
  63. data/lib/rollbar/scrubbers/params.rb +19 -18
  64. data/lib/rollbar/scrubbers/url.rb +18 -9
  65. data/lib/rollbar/scrubbers.rb +3 -3
  66. data/lib/rollbar/truncation/frames_strategy.rb +1 -1
  67. data/lib/rollbar/truncation/min_body_strategy.rb +2 -3
  68. data/lib/rollbar/truncation/mixin.rb +1 -1
  69. data/lib/rollbar/truncation/remove_any_key_strategy.rb +123 -0
  70. data/lib/rollbar/truncation/remove_extra_strategy.rb +35 -0
  71. data/lib/rollbar/truncation/remove_request_strategy.rb +21 -0
  72. data/lib/rollbar/truncation/strings_strategy.rb +6 -5
  73. data/lib/rollbar/truncation.rb +9 -2
  74. data/lib/rollbar/util/hash.rb +15 -0
  75. data/lib/rollbar/util/ip_anonymizer.rb +8 -7
  76. data/lib/rollbar/util/ip_obfuscator.rb +1 -1
  77. data/lib/rollbar/util.rb +6 -2
  78. data/lib/rollbar/version.rb +1 -1
  79. data/lib/rollbar.rb +2 -3
  80. data/lib/tasks/benchmark.rake +103 -0
  81. data/rollbar.gemspec +13 -5
  82. data/spec/support/rollbar_api.rb +67 -0
  83. metadata +21 -23
  84. data/gemfiles/ruby_1_8_and_1_9_2.gemfile +0 -49
  85. data/lib/rollbar/json/default.rb +0 -11
  86. data/lib/rollbar/json/oj.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b1d54624ee13b6f4c7a4968c1c9067e516c66df6
4
- data.tar.gz: 38c693e582396f395edf19b2de6632f0a2d6e2a1
2
+ SHA256:
3
+ metadata.gz: 93750693cd5d598ffbfffc97a6fa9d6849b883ff0c6e1fbd2d9f1bc12fe231ce
4
+ data.tar.gz: f6cb9387ee9f3d4555bdcc103d6cd5abc899392335a369ff7fe6201bceb8822d
5
5
  SHA512:
6
- metadata.gz: 0edbc15fcb61dabaccdd2cfd6ba523e467df93a65c140324b54cd4374ba58d89346f83a5c176b8447eed1039f112b7c429434fe4f0722cf70b17b1392431dbe3
7
- data.tar.gz: ffd8f7ff56381063666b9889656790c310b00dc5de74d2c10e9be12a47183da27efe66a90a87747fa12f78bceab90e581442a5cfadbb84acb0c58f2c497d7940
6
+ metadata.gz: 4028d695ef765ebcc47db502b239153933fd9bab5161aaf6765d8a264c62ab4c60d40fd2bc93985f8eb4eff1838cb749fee6df80ed6baac1af05ecda01b2911c
7
+ data.tar.gz: b9638cb6df1a5647d53cd115fbe708058713d4ea97647c552a82f33b38cb86f11fd4c0b62e9ed83f7f0aa7a732b80fcdaca0d0e04d771f7d89252729aacd8700
@@ -0,0 +1,25 @@
1
+ ## Description of the change
2
+
3
+ > Description here
4
+ ## Type of change
5
+ - [ ] Bug fix (non-breaking change that fixes an issue)
6
+ - [ ] New feature (non-breaking change that adds functionality)
7
+ - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
8
+
9
+ ## Related issues
10
+
11
+ > Fix [#1]()
12
+ ## Checklists
13
+
14
+ ### Development
15
+
16
+ - [ ] Lint rules pass locally
17
+ - [ ] The code changed/added as part of this pull request has been covered with tests
18
+ - [ ] All tests related to the changed code pass in development
19
+
20
+ ### Code review
21
+
22
+ - [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
23
+ - [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment
24
+ - [ ] Changes have been reviewed by at least one other engineer
25
+ - [ ] Issue from task tracker has a link to this pull request
data/.rubocop.yml CHANGED
@@ -1,3 +1,5 @@
1
+ require: rubocop-performance
2
+
1
3
  AllCops:
2
4
  Exclude:
3
5
  - 'vendor/**/*'
@@ -34,3 +36,169 @@ Style/ExpandPathArguments:
34
36
 
35
37
  Gemspec/RequiredRubyVersion:
36
38
  Enabled: false # rubocop compares to gemspec, yet won't allow 1.9 as minimum version
39
+
40
+ Style/Encoding:
41
+ Enabled: false # Ruby 1.9.3 needs these magic comments, e.g. # encoding: UTF-8
42
+
43
+ Style/PercentLiteralDelimiters:
44
+ PreferredDelimiters:
45
+ # rubocop switched from () to [] at some past version.
46
+ # Make sure we are consistent across all bundles/builds.
47
+ default: '[]'
48
+
49
+ Style/Documentation:
50
+ # We can enabled this if/when we want to start doing consistent class documentation.
51
+ # As is, we currently add :nodoc: if anything at all.
52
+ Enabled: false
53
+
54
+ Naming/UncommunicativeMethodParamName:
55
+ # It's possible to configure this cop to allow just about anything, but what's the point.
56
+ # The default min length of a param name is 3, but the the default whitelist includes things
57
+ # like `db` and `io`. So, short names really can be useful.
58
+ Enabled: false
59
+
60
+ Style/CaseEquality:
61
+ # The code uses `===` a lot to compare a regex to a string, but it's not clear that
62
+ # switching to `=~` is always safe, because in some cases the value could be a regex
63
+ # or a string and `str1 =~ str2` isn't valid. Whoever enables this cop should carefully
64
+ # review and test each of these.
65
+ Enabled: false
66
+
67
+ Style/FrozenStringLiteralComment:
68
+ # If we do this, it will be in its own PR. It requires adding these magic comments
69
+ # throughout the project, in order to prepare for a future Ruby 3.x.
70
+ Enabled: false
71
+
72
+ Style/SafeNavigation:
73
+ # Not available in Ruby < 2.3.
74
+ Enabled: false
75
+
76
+ #
77
+ # Performance cops are opt in, and `Enabled: true` is always required.
78
+ # Full list is here: https://github.com/rubocop-hq/rubocop-performance/tree/master/lib/rubocop/cop/performance
79
+ # For travis builds, Codacy will see and use these directives.
80
+ #
81
+ Performance/Caller:
82
+ Enabled: true
83
+ Exclude:
84
+ - spec/**/*
85
+
86
+ Performance/CaseWhenSplat:
87
+ Enabled: true
88
+ Exclude:
89
+ - spec/**/*
90
+
91
+ Performance/Casecmp:
92
+ Enabled: true
93
+ Exclude:
94
+ - spec/**/*
95
+
96
+ Performance/ChainArrayAllocation:
97
+ Enabled: true
98
+ Exclude:
99
+ - spec/**/*
100
+
101
+ Performance/CompareWithBlock:
102
+ Enabled: true
103
+ Exclude:
104
+ - spec/**/*
105
+
106
+ Performance/Count:
107
+ Enabled: true
108
+ Exclude:
109
+ - spec/**/*
110
+
111
+ Performance/Detect:
112
+ Enabled: true
113
+ Exclude:
114
+ - spec/**/*
115
+
116
+ Performance/DoubleStartEndWith:
117
+ Enabled: true
118
+ Exclude:
119
+ - spec/**/*
120
+
121
+ Performance/EndWith:
122
+ Enabled: true
123
+ Exclude:
124
+ - spec/**/*
125
+
126
+ Performance/FixedSize:
127
+ Enabled: true
128
+ Exclude:
129
+ - spec/**/*
130
+
131
+ Performance/FlatMap:
132
+ Enabled: true
133
+ Exclude:
134
+ - spec/**/*
135
+
136
+ Performance/InefficientHashSearch:
137
+ Enabled: true
138
+ Exclude:
139
+ - spec/**/*
140
+
141
+ Performance/OpenStruct:
142
+ Enabled: true
143
+ Exclude:
144
+ - spec/**/*
145
+
146
+ Performance/RangeInclude:
147
+ Enabled: true
148
+ Exclude:
149
+ - spec/**/*
150
+
151
+ Performance/RedundantBlockCall:
152
+ Enabled: true
153
+ Exclude:
154
+ - spec/**/*
155
+
156
+ Performance/RedundantMatch:
157
+ Enabled: true
158
+ Exclude:
159
+ - spec/**/*
160
+
161
+ Performance/RedundantMerge:
162
+ Enabled: true
163
+ Exclude:
164
+ - spec/**/*
165
+
166
+ Performance/RegexpMatch:
167
+ Enabled: true
168
+ Exclude:
169
+ - spec/**/*
170
+
171
+ Performance/ReverseEach:
172
+ Enabled: true
173
+ Exclude:
174
+ - spec/**/*
175
+
176
+ Performance/Size:
177
+ Enabled: true
178
+ Exclude:
179
+ - spec/**/*
180
+
181
+ Performance/StartWith:
182
+ Enabled: true
183
+ Exclude:
184
+ - spec/**/*
185
+
186
+ Performance/StringReplacement:
187
+ Enabled: true
188
+ Exclude:
189
+ - spec/**/*
190
+
191
+ Performance/TimesMap:
192
+ Enabled: true
193
+ Exclude:
194
+ - spec/**/*
195
+
196
+ Performance/UnfreezeString:
197
+ Enabled: true
198
+ Exclude:
199
+ - spec/**/*
200
+
201
+ Performance/UriDefaultParser:
202
+ Enabled: true
203
+ Exclude:
204
+ - spec/**/*
data/.travis.yml CHANGED
@@ -1,26 +1,23 @@
1
1
  sudo: false
2
+ dist: trusty
2
3
  services:
3
4
  - redis-server
4
5
  language: ruby
5
- # Broken bundler on travis CI - https://github.com/bundler/bundler/issues/2784
6
- before_install:
7
- - gem update --system 2.7.7
8
- - gem --version
9
- - gem install bundler -v 1.6.1
10
- - bundle --version
11
6
 
12
7
  rvm:
13
8
  - 1.9.3
14
9
  - 2.0.0
15
10
  - 2.1.0
16
11
  - 2.2.2
17
- - 2.3.0
18
12
  - 2.3.8
19
13
  - 2.4.5
20
14
  - 2.5.3
21
- - 2.6.0
15
+ - 2.6.5
16
+ - 2.7.0
22
17
  - rbx
23
- - jruby-9.1.9.0
18
+ # Travis's own rvm installer is failing on JRuby builds, TODO: reenable when fixed.
19
+ # - jruby-9.1.9.0
20
+
24
21
  #
25
22
  # # About legacy JRuby
26
23
  #
@@ -53,8 +50,6 @@ jdk:
53
50
  - openjdk8
54
51
  - oraclejdk8
55
52
  - oraclejdk9
56
- env:
57
- - ROLLBAR_SSL_CERT_FILE=/home/travis/build/rollbar/rollbar-gem/spec/cacert.pem
58
53
  gemfile:
59
54
  - gemfiles/rails30.gemfile
60
55
  - gemfiles/rails31.gemfile
@@ -65,14 +60,13 @@ gemfile:
65
60
  - gemfiles/rails50.gemfile
66
61
  - gemfiles/rails51.gemfile
67
62
  - gemfiles/rails52.gemfile
63
+ - gemfiles/rails60.gemfile
68
64
  matrix:
69
65
  include: []
70
66
 
71
67
  allow_failures:
72
68
  - rvm: ruby-head
73
69
  - rvm: jruby-head
74
- # Ruby 2.6.x is still being eveluated and may have test failures
75
- - rvm: 2.6.0
76
70
  # oraclejdk9 has a dependency issue that needs to be investigated
77
71
  - jdk: oraclejdk9
78
72
 
@@ -103,12 +97,6 @@ matrix:
103
97
  jdk: oraclejdk8
104
98
  - rvm: 2.2.2
105
99
  jdk: oraclejdk9
106
- - rvm: 2.3.0
107
- jdk: openjdk8
108
- - rvm: 2.3.0
109
- jdk: oraclejdk8
110
- - rvm: 2.3.0
111
- jdk: oraclejdk9
112
100
  - rvm: 2.3.8
113
101
  jdk: openjdk8
114
102
  - rvm: 2.3.8
@@ -127,11 +115,17 @@ matrix:
127
115
  jdk: oraclejdk8
128
116
  - rvm: 2.5.3
129
117
  jdk: oraclejdk9
130
- - rvm: 2.6.0
118
+ - rvm: 2.6.5
131
119
  jdk: openjdk8
132
- - rvm: 2.6.0
120
+ - rvm: 2.6.5
133
121
  jdk: oraclejdk8
134
- - rvm: 2.6.0
122
+ - rvm: 2.6.5
123
+ jdk: oraclejdk9
124
+ - rvm: 2.7.0
125
+ jdk: openjdk8
126
+ - rvm: 2.7.0
127
+ jdk: oraclejdk8
128
+ - rvm: 2.7.0
135
129
  jdk: oraclejdk9
136
130
 
137
131
  - rvm: ruby-head
@@ -147,6 +141,13 @@ matrix:
147
141
  - rvm: rbx
148
142
  jdk: oraclejdk9
149
143
 
144
+ # Rails 6.x requires Ruby 2.5.0 or higher
145
+ - rvm: 2.2.2
146
+ gemfile: gemfiles/rails60.gemfile
147
+ - rvm: 2.3.8
148
+ gemfile: gemfiles/rails60.gemfile
149
+ - rvm: 2.4.5
150
+ gemfile: gemfiles/rails60.gemfile
150
151
  # Rails 5.x requires Ruby 2.2.2 or higher
151
152
  - rvm: 1.9.3
152
153
  gemfile: gemfiles/rails50.gemfile
@@ -154,6 +155,8 @@ matrix:
154
155
  gemfile: gemfiles/rails51.gemfile
155
156
  - rvm: 1.9.3
156
157
  gemfile: gemfiles/rails52.gemfile
158
+ - rvm: 1.9.3
159
+ gemfile: gemfiles/rails60.gemfile
157
160
  # Rails 5.x requires Ruby 2.2.2 or higher
158
161
  - rvm: 2.0.0
159
162
  gemfile: gemfiles/rails50.gemfile
@@ -161,6 +164,8 @@ matrix:
161
164
  gemfile: gemfiles/rails51.gemfile
162
165
  - rvm: 2.0.0
163
166
  gemfile: gemfiles/rails52.gemfile
167
+ - rvm: 2.0.0
168
+ gemfile: gemfiles/rails60.gemfile
164
169
  # Rails 5.x requires Ruby 2.2.2 or higher
165
170
  - rvm: 2.1.0
166
171
  gemfile: gemfiles/rails50.gemfile
@@ -168,18 +173,17 @@ matrix:
168
173
  gemfile: gemfiles/rails51.gemfile
169
174
  - rvm: 2.1.0
170
175
  gemfile: gemfiles/rails52.gemfile
171
- # MRI 2.2.2 supports Rails 3.2.x and higher
176
+ - rvm: 2.1.0
177
+ gemfile: gemfiles/rails60.gemfile
178
+ # MRI 2.2.2 supports Rails 3.2.x and higher, except Rails 5.2.4 and higher*
179
+ # * ActionDispatch 5.2.4 uses Ruby 3.x safe navigation operator.
172
180
  - rvm: 2.2.2
173
181
  gemfile: gemfiles/rails30.gemfile
174
182
  - rvm: 2.2.2
175
183
  gemfile: gemfiles/rails31.gemfile
184
+ - rvm: 2.2.2
185
+ gemfile: gemfiles/rails52.gemfile
176
186
  # MRI 2.3.x supports Rails 4.0.x and higher
177
- - rvm: 2.3.0
178
- gemfile: gemfiles/rails30.gemfile
179
- - rvm: 2.3.0
180
- gemfile: gemfiles/rails31.gemfile
181
- - rvm: 2.3.0
182
- gemfile: gemfiles/rails32.gemfile
183
187
  - rvm: 2.3.8
184
188
  gemfile: gemfiles/rails30.gemfile
185
189
  - rvm: 2.3.8
@@ -212,16 +216,39 @@ matrix:
212
216
  gemfile: gemfiles/rails40.gemfile
213
217
  - rvm: 2.5.3
214
218
  gemfile: gemfiles/rails41.gemfile
215
- - rvm: 2.6.0
219
+ - rvm: 2.6.5
220
+ gemfile: gemfiles/rails30.gemfile
221
+ - rvm: 2.6.5
222
+ gemfile: gemfiles/rails31.gemfile
223
+ - rvm: 2.6.5
224
+ gemfile: gemfiles/rails32.gemfile
225
+ - rvm: 2.6.5
226
+ gemfile: gemfiles/rails40.gemfile
227
+ - rvm: 2.6.5
228
+ gemfile: gemfiles/rails41.gemfile
229
+ - rvm: 2.6.5
230
+ gemfile: gemfiles/rails42.gemfile
231
+ # Rails 6.x tries to be compatible with Ruby 2.7, though
232
+ # it still throws a lot of warnings. No point testing earlier
233
+ # Rails with Ruby 2.7.
234
+ - rvm: 2.7.0
216
235
  gemfile: gemfiles/rails30.gemfile
217
- - rvm: 2.6.0
236
+ - rvm: 2.7.0
218
237
  gemfile: gemfiles/rails31.gemfile
219
- - rvm: 2.6.0
238
+ - rvm: 2.7.0
220
239
  gemfile: gemfiles/rails32.gemfile
221
- - rvm: 2.6.0
240
+ - rvm: 2.7.0
222
241
  gemfile: gemfiles/rails40.gemfile
223
- - rvm: 2.6.0
242
+ - rvm: 2.7.0
224
243
  gemfile: gemfiles/rails41.gemfile
244
+ - rvm: 2.7.0
245
+ gemfile: gemfiles/rails42.gemfile
246
+ - rvm: 2.7.0
247
+ gemfile: gemfiles/rails50.gemfile
248
+ - rvm: 2.7.0
249
+ gemfile: gemfiles/rails51.gemfile
250
+ - rvm: 2.7.0
251
+ gemfile: gemfiles/rails52.gemfile
225
252
  # JRuby JDBC Adapter is only compatible with Rails >= 5.x
226
253
  - rvm: jruby-9.1.9.0
227
254
  gemfile: gemfiles/rails30.gemfile
@@ -253,3 +280,5 @@ matrix:
253
280
  gemfile: gemfiles/rails51.gemfile
254
281
  - rvm: rbx
255
282
  gemfile: gemfiles/rails52.gemfile
283
+ - rvm: rbx
284
+ gemfile: gemfiles/rails60.gemfile
data/Appraisals CHANGED
@@ -1,19 +1,19 @@
1
- appraise "rails30" do
2
- gem "rails", "3.0.20"
1
+ appraise 'rails30' do
2
+ gem 'rails', '3.0.20'
3
3
  end
4
4
 
5
- appraise "rails31" do
6
- gem "rails", "3.1.12"
5
+ appraise 'rails31' do
6
+ gem 'rails', '3.1.12'
7
7
  end
8
8
 
9
- appraise "rails32" do
10
- gem "rails", "3.2.21"
9
+ appraise 'rails32' do
10
+ gem 'rails', '3.2.21'
11
11
  end
12
12
 
13
- appraise "rails40" do
14
- gem "rails", "4.0.13"
13
+ appraise 'rails40' do
14
+ gem 'rails', '4.0.13'
15
15
  end
16
16
 
17
- appraise "rails41" do
18
- gem "rails", "4.1.9"
17
+ appraise 'rails41' do
18
+ gem 'rails', '4.1.9'
19
19
  end
data/Gemfile CHANGED
@@ -2,27 +2,36 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby')
6
13
 
14
+ GEMFILE_RAILS_VERSION = '5.2.2'.freeze
15
+
7
16
  gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
8
17
  gem 'appraisal'
9
18
  gem 'jruby-openssl', :platform => :jruby
10
- gem 'rails', '4.2.8'
19
+ gem 'rails', GEMFILE_RAILS_VERSION
11
20
  gem 'rake'
12
- gem 'rspec-rails', '~> 3.4'
13
- gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
21
+ if GEMFILE_RAILS_VERSION < '6.0'
22
+ gem 'rspec-rails', '~> 3.4'
23
+ else
24
+ # TODO: update this when 4.x becomes available on Rubygems
25
+ gem 'rspec-rails', :git => 'https://github.com/rspec/rspec-rails', :ref => 'v4.0.0.beta2' # rubocop:disable Bundler/DuplicatedGem
26
+ end
14
27
 
15
- unless is_jruby
16
- if RUBY_VERSION >= '2.5'
17
- gem 'oj'
18
- elsif RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1' # rubocop:disable Bundler/DuplicatedGem
20
- else
21
- gem 'oj', '~> 2.12.14' # rubocop:disable Bundler/DuplicatedGem
22
- end
28
+ if GEMFILE_RAILS_VERSION < '6.0'
29
+ gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
30
+ else
31
+ gem 'sqlite3', '~> 1.4', :platform => [:ruby, :mswin, :mingw] # rubocop:disable Bundler/DuplicatedGem
23
32
  end
24
33
 
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
34
+ if RUBY_VERSION < '2.2.2'
26
35
  gem 'sidekiq', '~> 2.13.0'
27
36
  else
28
37
  gem 'sidekiq', '>= 2.13.0' # rubocop:disable Bundler/DuplicatedGem
@@ -36,24 +45,36 @@ platforms :rbx do
36
45
  end
37
46
 
38
47
  if RUBY_VERSION.start_with?('1.9')
48
+ gem 'capistrano', '<= 3.4.1', :require => false
49
+ gem 'json', '1.8.6'
39
50
  gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
40
51
  gem 'sucker_punch', '~> 1.0'
41
52
  elsif RUBY_VERSION.start_with?('2')
53
+ gem 'capistrano', :require => false # rubocop:disable Bundler/DuplicatedGem
42
54
  gem 'codacy-coverage'
43
55
  gem 'shoryuken' # rubocop:disable Bundler/DuplicatedGem
44
56
  gem 'simplecov'
45
57
  gem 'sucker_punch', '~> 2.0' # rubocop:disable Bundler/DuplicatedGem
46
58
  end
47
59
 
60
+ unless is_jruby
61
+ # JRuby doesn't support fork, which is required for this test helper.
62
+ gem 'rspec-command'
63
+ end
64
+
48
65
  gem 'aws-sdk-sqs'
49
66
  gem 'database_cleaner'
50
- gem 'delayed_job', :require => false
67
+ if GEMFILE_RAILS_VERSION < '6.0'
68
+ gem 'delayed_job', :require => false
69
+ else
70
+ gem 'delayed_job', '~> 4.1', :require => false # rubocop:disable Bundler/DuplicatedGem
71
+ end
51
72
  gem 'generator_spec'
52
73
  gem 'girl_friday', '>= 0.11.1'
53
74
  gem 'redis'
54
75
  gem 'resque', '< 2.0.0'
55
- gem 'rspec-command'
56
76
  gem 'rubocop', :require => false
77
+ gem 'rubocop-performance', :require => false
57
78
  gem 'sinatra'
58
79
  gem 'webmock', :require => false
59
80
  gemspec
data/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # Rollbar-gem
2
- [![Build Status](https://api.travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
2
+ [![Build Status](https://travis-ci.org/rollbar/rollbar-gem.svg?branch=master)](https://travis-ci.org/rollbar/rollbar-gem/branches)
3
3
  [![Gem Version](https://badge.fury.io/rb/rollbar.svg)](http://badge.fury.io/rb/rollbar)
4
4
  [![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&target-version=latest)](https://dependabot.com/compatibility-score.html?dependency-name=rollbar&package-manager=bundler&version-scheme=semver&new-version=latest)
5
5
 
6
+
6
7
  > WARNING: Ruby 2.6.0 introduced a new bug bug ([#15472 -
7
8
  Invalid JSON data being sent from Net::HTTP in some cases with Ruby 2.6.0](https://bugs.ruby-lang.org/issues/15472)) that may result in the Rollbar API returning an error when an exception is reported. (See [rollbar-gem issue #797](https://github.com/rollbar/rollbar-gem/issues/797)).
8
- > Until the Ruby maintainers have released the fix for this bug, we advise Rollbar users to not upgrade their applications to Ruby 2.6.0.
9
+
10
+ > UPDATE: This bug is fixed in Ruby 2.6.1, and rollbar-gem has a safe workaround in version >= 2.19.0.
11
+ If you need to stay on Ruby 2.6.0 for any reason, make sure you have the latest rollbar-gem.
9
12
 
10
13
 
11
14
 
data/Rakefile CHANGED
File without changes
@@ -1 +1 @@
1
- !function(r){function e(n){if(o[n])return o[n].exports;var t=o[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var o={};return e.m=r,e.c=o,e.p="",e(0)}([function(r,e,o){"use strict";var n=o(1),t=o(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdnjs.cloudflare.com/ajax/libs/rollbar.js/2.4.4/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,e){this.options=r,this._rollbarOldOnError=null;var o=s++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}function a(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(e);return n(function(){e.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),e.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=e.autoInstrument;return e.enabled!==!1&&(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[o]=t,t})()}}function l(r){return n(function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=o(2),s=0,d=o(3),c=function(r,e){return new t(r,e)},p=function(r){return new d(c,r)};t.prototype.loadFull=function(r,e,o,t,a){var l=function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,t,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(t=n.args||[],i=0;i<t.length;++i)if(l=t[i],"function"==typeof l){l(e);break}}"function"==typeof a&&a(e)},i=!1,s=e.createElement("script"),d=e.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,o||(s.async=!0),s.onload=s.onreadystatechange=n(function(){if(!(i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){s.onload=s.onreadystatechange=null;try{c.removeChild(s)}catch(r){}i=!0,l()}}),c.insertBefore(s,d)},t.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),f=0;f<u.length;++f)t.prototype[u[f]]=l(u[f]);r.exports={setupShim:a,Rollbar:p}},function(r,e){"use strict";function o(r,e,o){if(r){var t;if("function"==typeof e._rollbarOldOnError)t=e._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;e._rollbarOldOnError=t}var a=function(){var o=Array.prototype.slice.call(arguments,0);n(r,e,t,o)};o&&(a._rollbarOldOnError=t),r.onerror=a}}function n(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),e.handleUncaughtException.apply(e,n),o&&o.apply(r,n)}function t(r,e,o){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var o,n,t;try{o=r.reason}catch(r){o=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!o&&t&&(o=t.reason,n=t.promise)}catch(r){t="[unhandledrejection] error getting `detail` from event"}o||(o="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(o,n)};n.belongsToShim=o,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}function a(r,e,o){if(r){var n,t,a="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<a.length;++n)t=a[n],r[t]&&r[t].prototype&&l(e,r[t].prototype,o)}}function l(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports={captureUncaughtExceptions:o,captureUnhandledRejections:t,wrapGlobals:a}},function(r,e){"use strict";function o(r,e){this.impl=r(e,this),this.options=e,n(o.prototype)}function n(r){for(var e=function(r){return function(){var e=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,e)}},o="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<o.length;n++)r[o[n]]=e(o[n])}o.prototype._swapAndProcessMessages=function(r,e){this.impl=r(this.options);for(var o,n,t;o=e.shift();)n=o.method,t=o.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],o.ts]):this[n].apply(this,t));return this},r.exports=o},function(r,e){"use strict";r.exports=function(r){return function(e){if(!e&&!window._rollbarInitialized){r=r||{};for(var o,n,t=r.globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;o=window._rollbarShims[i++];)n||(n=o.handler),o.handler._swapAndProcessMessages(l,o.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
1
+ !function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.19.3/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i<a.length;++i)if("function"==typeof(l=a[i])){l(e);break}}"function"==typeof t&&t(e)}()}})),d.insertBefore(i,s)},i.prototype.wrap=function(r,e,o){try{var n;if(n="function"==typeof e?e:function(){return e||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){o&&"function"==typeof o&&o.apply(this,arguments);try{return r.apply(this,arguments)}catch(o){var e=o;throw e&&("string"==typeof e&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=e),e}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(e){return r}};for(var p="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,captureEvent,captureDomContentLoaded,captureLoad".split(","),f=0;f<p.length;++f)i.prototype[p[f]]=u(p[f]);r.exports={setupShim:function(r,e){if(r){var o=e.globalAlias||"Rollbar";if("object"==typeof r[o])return r[o];r._rollbarShims={},r._rollbarWrappedError=null;var l=new c(e);return a((function(){e.captureUncaught&&(l._rollbarOldOnError=r.onerror,n.captureUncaughtExceptions(r,l,!0),e.wrapGlobalEventHandlers&&t(r,l,!0)),e.captureUnhandledRejections&&n.captureUnhandledRejections(r,l,!0);var a=e.autoInstrument;return!1!==e.enabled&&(void 0===a||!0===a||"object"==typeof a&&a.network)&&r.addEventListener&&(r.addEventListener("load",l.captureLoad.bind(l)),r.addEventListener("DOMContentLoaded",l.captureDomContentLoaded.bind(l))),r[o]=l,l}))()}},Rollbar:c}},function(r,e,o){"use strict";function n(r,e,o,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null);var t=e.handleUncaughtException.apply(e,n);o&&o.apply(r,n),"anonymous"===t&&(e.anonymousErrorsPending+=1)}r.exports={captureUncaughtExceptions:function(r,e,o){if(r){var t;if("function"==typeof e._rollbarOldOnError)t=e._rollbarOldOnError;else if(r.onerror){for(t=r.onerror;t._rollbarOldOnError;)t=t._rollbarOldOnError;e._rollbarOldOnError=t}e.handleAnonymousErrors();var a=function(){var o=Array.prototype.slice.call(arguments,0);n(r,e,t,o)};o&&(a._rollbarOldOnError=t),r.onerror=a}},captureUnhandledRejections:function(r,e,o){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var o,n,t;try{o=r.reason}catch(r){o=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!o&&t&&(o=t.reason,n=t.promise)}catch(r){}o||(o="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(o,n)};n.belongsToShim=o,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}}},function(r,e,o){"use strict";function n(r,e,o){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(e,o,t){n.call(this,e,r.wrap(o),t)};t._rollbarOldAdd=n,t.belongsToShim=o,e.addEventListener=t;for(var a=e.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,e,o){a.call(this,r,e&&e._rollbar_wrapped||e,o)};l._rollbarOldRemove=a,l.belongsToShim=o,e.removeEventListener=l}}r.exports=function(r,e,o){if(r){var t,a,l="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(t=0;t<l.length;++t)r[a=l[t]]&&r[a].prototype&&n(e,r[a].prototype,o)}}},function(r,e,o){"use strict";function n(r,e){this.impl=r(e,this),this.options=e,function(r){for(var e=function(r){return function(){var e=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,e)}},o="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n<o.length;n++)r[o[n]]=e(o[n])}(n.prototype)}n.prototype._swapAndProcessMessages=function(r,e){var o,n,t;for(this.impl=r(this.options);o=e.shift();)n=o.method,t=o.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],o.ts]):this[n].apply(this,t));return this},r.exports=n},function(r,e,o){"use strict";r.exports=function(r){return function(e){if(!e&&!window._rollbarInitialized){for(var o,n,t=(r=r||{}).globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;o=window._rollbarShims[i++];)n||(n=o.handler),o.handler._swapAndProcessMessages(l,o.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
@@ -108,6 +108,13 @@ Rollbar notifier.
108
108
 
109
109
  The number of job failures before reporting the failure to Rollbar.
110
110
 
111
+ ### async_skip_report_handler
112
+
113
+ **Default** `nil`
114
+ **Example** `-> (job) { job.cron? }`
115
+
116
+ A handler, should respond to `#call`, receives the job and returns a boolean. If true, reporting errors will be skipped. If provided, dj_threshold isn't checked.
117
+
111
118
  ### enabled
112
119
 
113
120
  **Default** `true`
@@ -129,6 +136,7 @@ An array of backup handlers if the async handlers fails. Each should respond to
129
136
 
130
137
  For use with `write_to_file`. Indicates location of the rollbar log file being
131
138
  tracked by [rollbar-agent](https://github.com/rollbar/rollbar-agent).
139
+ Enable `files_with_pid_name_enabled` if you want to have different files for each process(only works if extension `rollbar`)
132
140
 
133
141
  ### framework
134
142
 
@@ -242,6 +250,15 @@ Fields to scrub out of the parsed request data. Will scrub from `GET`, `POST`,
242
250
  url, and several other locations. Does not currently recurse into the full
243
251
  payload.
244
252
 
253
+ If set to `[:scrub_all]` it will scrub all fields. It will not scrub anything
254
+ that is in the scrub_whitelist configuration array even if :scrub_all is true.
255
+
256
+ ### scrub_whitelist
257
+
258
+ Set the list of fields to be whitelisted when `scrub_fields` is set to `[:scrub_all]`.
259
+
260
+ Supports regex entries for partial matching e.g. `[:foo, /\A.+_id\z/, :bar]`
261
+
245
262
  ### scrub_user
246
263
 
247
264
  **Default** `true`
@@ -2,6 +2,13 @@ require 'rubygems/version'
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ # Used by spec/commands/rollbar_rails_runner_spec, and can be used whenever a
6
+ # new process is created during tests. (Testing rake tasks, for example.)
7
+ # This is a workaround for ENV['BUNDLE_GEMFILE'] not working as expected on Travis.
8
+ # We use the ||= assignment because Travis loads the gemfile twice, the second time
9
+ # with the wrong gemfile path.
10
+ ENV['CURRENT_GEMFILE'] ||= __FILE__
11
+
5
12
  is_jruby = defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
6
13
 
7
14
  gem 'sqlite3', '< 1.4.0', :platform => [:ruby, :mswin, :mingw]
@@ -12,17 +19,8 @@ gem 'rails', '3.0.20'
12
19
  gem 'hitimes', '< 1.2.2'
13
20
  gem 'rake', '< 11'
14
21
  gem 'rspec-rails', '>= 2.14.0'
15
- gem 'celluloid', '< 0.17.0' if RUBY_VERSION == '1.9.2'
16
-
17
- unless is_jruby
18
- if RUBY_VERSION >= '2.4.0'
19
- gem 'oj', '~> 2.16.1'
20
- else
21
- gem 'oj', '~> 2.12.14'
22
- end
23
- end
24
22
 
25
- if RUBY_VERSION > '1.8.7' && RUBY_VERSION < '2.2.2'
23
+ if RUBY_VERSION < '2.2.2'
26
24
  gem 'sidekiq', '~> 2.13.0'
27
25
  else
28
26
  gem 'sidekiq', '>= 2.13.0'
@@ -37,9 +35,11 @@ platforms :rbx do
37
35
  end
38
36
 
39
37
  if RUBY_VERSION.start_with?('1.9')
38
+ gem 'capistrano', '<= 3.4.1', :require => false
40
39
  gem 'sucker_punch', '~> 1.0'
41
40
  gem 'shoryuken', '>= 4.0.0', '<= 4.0.2'
42
41
  elsif RUBY_VERSION.start_with?('2')
42
+ gem 'capistrano', :require => false
43
43
  gem 'sucker_punch', '~> 2.0'
44
44
  gem 'shoryuken'
45
45
  gem 'codacy-coverage'