rollbar 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/README.md +143 -71
- data/UPGRADING.md +45 -0
- data/lib/rollbar.rb +470 -374
- data/lib/rollbar/active_record_extension.rb +1 -1
- data/lib/rollbar/configuration.rb +17 -0
- data/lib/rollbar/core_ext/thread.rb +9 -0
- data/lib/rollbar/exception_reporter.rb +4 -5
- data/lib/rollbar/logger_proxy.rb +32 -0
- data/lib/rollbar/middleware/rack/builder.rb +22 -4
- data/lib/rollbar/middleware/rails/rollbar.rb +62 -0
- data/lib/rollbar/middleware/rails/show_exceptions.rb +3 -5
- data/lib/rollbar/middleware/sinatra.rb +21 -5
- data/lib/rollbar/railtie.rb +18 -15
- data/lib/rollbar/request_data_extractor.rb +19 -9
- data/lib/rollbar/util.rb +39 -0
- data/lib/rollbar/version.rb +1 -1
- data/spec/controllers/home_controller_spec.rb +119 -154
- data/spec/dummyapp/app/controllers/home_controller.rb +16 -6
- data/spec/dummyapp/config/routes.rb +1 -0
- data/spec/rollbar/logger_proxy_spec.rb +35 -0
- data/spec/rollbar/middleware/rack/builder_spec.rb +61 -0
- data/spec/rollbar/middleware/sinatra_spec.rb +83 -5
- data/spec/rollbar_bc_spec.rb +388 -0
- data/spec/rollbar_spec.rb +940 -430
- data/spec/spec_helper.rb +1 -0
- metadata +12 -3
- data/lib/rollbar/middleware/rails/rollbar_request_store.rb +0 -25
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.
|
4
|
+
version: 1.2.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: 2014-10-
|
11
|
+
date: 2014-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -167,6 +167,7 @@ files:
|
|
167
167
|
- Rakefile
|
168
168
|
- THANKS.md
|
169
169
|
- UPGRADE_FROM_RATCHET.md
|
170
|
+
- UPGRADING.md
|
170
171
|
- gemfiles/rails30.gemfile
|
171
172
|
- gemfiles/rails31.gemfile
|
172
173
|
- gemfiles/rails32.gemfile
|
@@ -180,6 +181,7 @@ files:
|
|
180
181
|
- lib/rollbar/capistrano.rb
|
181
182
|
- lib/rollbar/capistrano3.rb
|
182
183
|
- lib/rollbar/configuration.rb
|
184
|
+
- lib/rollbar/core_ext/thread.rb
|
183
185
|
- lib/rollbar/delay/girl_friday.rb
|
184
186
|
- lib/rollbar/delay/resque.rb
|
185
187
|
- lib/rollbar/delay/sidekiq.rb
|
@@ -188,9 +190,10 @@ files:
|
|
188
190
|
- lib/rollbar/delayed_job.rb
|
189
191
|
- lib/rollbar/exception_reporter.rb
|
190
192
|
- lib/rollbar/goalie.rb
|
193
|
+
- lib/rollbar/logger_proxy.rb
|
191
194
|
- lib/rollbar/middleware/rack/builder.rb
|
192
195
|
- lib/rollbar/middleware/rack/test_session.rb
|
193
|
-
- lib/rollbar/middleware/rails/
|
196
|
+
- lib/rollbar/middleware/rails/rollbar.rb
|
194
197
|
- lib/rollbar/middleware/rails/show_exceptions.rb
|
195
198
|
- lib/rollbar/middleware/sinatra.rb
|
196
199
|
- lib/rollbar/rack.rb
|
@@ -264,7 +267,10 @@ files:
|
|
264
267
|
- spec/rollbar/delay/girl_friday_spec.rb
|
265
268
|
- spec/rollbar/delay/resque_spec.rb
|
266
269
|
- spec/rollbar/delay/thread_spec.rb
|
270
|
+
- spec/rollbar/logger_proxy_spec.rb
|
271
|
+
- spec/rollbar/middleware/rack/builder_spec.rb
|
267
272
|
- spec/rollbar/middleware/sinatra_spec.rb
|
273
|
+
- spec/rollbar_bc_spec.rb
|
268
274
|
- spec/rollbar_spec.rb
|
269
275
|
- spec/spec_helper.rb
|
270
276
|
- spec/support/cause_exception.rb
|
@@ -352,7 +358,10 @@ test_files:
|
|
352
358
|
- spec/rollbar/delay/girl_friday_spec.rb
|
353
359
|
- spec/rollbar/delay/resque_spec.rb
|
354
360
|
- spec/rollbar/delay/thread_spec.rb
|
361
|
+
- spec/rollbar/logger_proxy_spec.rb
|
362
|
+
- spec/rollbar/middleware/rack/builder_spec.rb
|
355
363
|
- spec/rollbar/middleware/sinatra_spec.rb
|
364
|
+
- spec/rollbar_bc_spec.rb
|
356
365
|
- spec/rollbar_spec.rb
|
357
366
|
- spec/spec_helper.rb
|
358
367
|
- spec/support/cause_exception.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
module Rollbar
|
2
|
-
module Middleware
|
3
|
-
module Rails
|
4
|
-
# Middleware that ensures any database calls to load data for exception reports
|
5
|
-
# are done before connections are cleaned up by the rake connection pool middleware
|
6
|
-
class RollbarRequestStore
|
7
|
-
def initialize(app)
|
8
|
-
@app = app
|
9
|
-
end
|
10
|
-
|
11
|
-
def call(env)
|
12
|
-
begin
|
13
|
-
@app.call(env)
|
14
|
-
rescue
|
15
|
-
controller = env["action_controller.instance"]
|
16
|
-
if controller and controller.respond_to? :rollbar_person_data
|
17
|
-
env['rollbar.person_data'] = controller.rollbar_person_data rescue {}
|
18
|
-
end
|
19
|
-
raise
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|