rollbar 2.10.0 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +7 -2
- data/CHANGELOG.md +20 -0
- data/README.md +73 -16
- data/docs/configuration.md +10 -0
- data/gemfiles/rails30.gemfile +2 -0
- data/gemfiles/rails31.gemfile +2 -0
- data/gemfiles/rails32.gemfile +2 -0
- data/gemfiles/rails40.gemfile +2 -0
- data/gemfiles/rails41.gemfile +2 -0
- data/gemfiles/rails42.gemfile +2 -0
- data/gemfiles/rails50.gemfile +2 -0
- data/gemfiles/ruby_1_8_and_1_9_2.gemfile +43 -0
- data/lib/rollbar.rb +139 -353
- data/lib/rollbar/configuration.rb +4 -0
- data/lib/rollbar/item.rb +225 -0
- data/lib/rollbar/item/backtrace.rb +97 -0
- data/lib/rollbar/js.rb +0 -28
- data/lib/rollbar/language_support.rb +10 -0
- data/lib/rollbar/{js/middleware.rb → middleware/js.rb} +3 -4
- data/lib/rollbar/plugin.rb +63 -0
- data/lib/rollbar/plugins.rb +41 -0
- data/lib/rollbar/{active_job.rb → plugins/active_job.rb} +0 -0
- data/lib/rollbar/plugins/basic_socket.rb +16 -0
- data/lib/rollbar/plugins/delayed_job.rb +12 -0
- data/lib/rollbar/plugins/delayed_job/job_data.rb +16 -0
- data/lib/rollbar/{delayed_job.rb → plugins/delayed_job/plugin.rb} +1 -17
- data/lib/rollbar/plugins/goalie.rb +46 -0
- data/lib/rollbar/plugins/rack.rb +16 -0
- data/lib/rollbar/plugins/rails.rb +77 -0
- data/lib/rollbar/{rails → plugins/rails}/controller_methods.rb +0 -0
- data/lib/rollbar/plugins/rails/railtie30.rb +17 -0
- data/lib/rollbar/plugins/rails/railtie32.rb +18 -0
- data/lib/rollbar/plugins/rails/railtie_mixin.rb +33 -0
- data/lib/rollbar/plugins/rake.rb +45 -0
- data/lib/rollbar/plugins/sidekiq.rb +35 -0
- data/lib/rollbar/{sidekiq.rb → plugins/sidekiq/plugin.rb} +0 -18
- data/lib/rollbar/plugins/thread.rb +13 -0
- data/lib/rollbar/plugins/validations.rb +33 -0
- data/lib/rollbar/request_data_extractor.rb +30 -18
- data/lib/rollbar/scrubbers/params.rb +4 -2
- data/lib/rollbar/scrubbers/url.rb +30 -28
- data/lib/rollbar/util.rb +10 -0
- data/lib/rollbar/version.rb +1 -1
- data/spec/controllers/home_controller_spec.rb +4 -3
- data/spec/dummyapp/app/models/post.rb +9 -0
- data/spec/dummyapp/app/models/user.rb +2 -0
- data/spec/dummyapp/config/initializers/rollbar.rb +1 -0
- data/spec/fixtures/plugins/dummy1.rb +5 -0
- data/spec/fixtures/plugins/dummy2.rb +5 -0
- data/spec/rollbar/item_spec.rb +635 -0
- data/spec/rollbar/logger_proxy_spec.rb +4 -0
- data/spec/rollbar/{js/middleware_spec.rb → middleware/js_spec.rb} +32 -3
- data/spec/rollbar/plugin_spec.rb +147 -0
- data/spec/rollbar/{active_job_spec.rb → plugins/active_job_spec.rb} +0 -1
- data/spec/rollbar/{delayed_job → plugins/delayed_job}/job_data.rb +0 -0
- data/spec/rollbar/{delayed_job_spec.rb → plugins/delayed_job_spec.rb} +3 -6
- data/spec/rollbar/{middleware/rack/builder_spec.rb → plugins/rack_spec.rb} +2 -1
- data/spec/rollbar/{js/frameworks/rails_spec.rb → plugins/rails_js_spec.rb} +1 -1
- data/spec/rollbar/{rake_spec.rb → plugins/rake_spec.rb} +2 -1
- data/spec/rollbar/{sidekiq_spec.rb → plugins/sidekiq_spec.rb} +2 -1
- data/spec/rollbar/plugins/validations_spec.rb +43 -0
- data/spec/rollbar/plugins_spec.rb +68 -0
- data/spec/rollbar/request_data_extractor_spec.rb +56 -10
- data/spec/rollbar/scrubbers/params_spec.rb +13 -10
- data/spec/rollbar/scrubbers/url_spec.rb +17 -12
- data/spec/rollbar/sidekig/clear_scope_spec.rb +2 -1
- data/spec/rollbar/util_spec.rb +61 -0
- data/spec/rollbar_bc_spec.rb +10 -10
- data/spec/rollbar_spec.rb +57 -706
- data/spec/spec_helper.rb +8 -0
- data/spec/support/notifier_helpers.rb +1 -0
- data/spec/support/rollbar_api.rb +57 -0
- metadata +57 -33
- data/lib/rollbar/active_record_extension.rb +0 -14
- data/lib/rollbar/core_ext/basic_socket.rb +0 -7
- data/lib/rollbar/core_ext/thread.rb +0 -9
- data/lib/rollbar/goalie.rb +0 -33
- data/lib/rollbar/js/frameworks.rb +0 -6
- data/lib/rollbar/js/frameworks/rails.rb +0 -49
- data/lib/rollbar/js/version.rb +0 -5
- data/lib/rollbar/rack.rb +0 -9
- data/lib/rollbar/railtie.rb +0 -46
- data/lib/rollbar/rake.rb +0 -40
data/lib/rollbar/rack.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
if defined?(Rack::Builder)
|
2
|
-
require 'rollbar/middleware/rack/builder'
|
3
|
-
Rack::Builder.send(:include, Rollbar::Middleware::Rack::Builder)
|
4
|
-
end
|
5
|
-
|
6
|
-
if defined?(Rack::Test::Session)
|
7
|
-
require 'rollbar/middleware/rack/test_session'
|
8
|
-
Rack::Test::Session.send(:include, Rollbar::Middleware::Rack::TestSession)
|
9
|
-
end
|
data/lib/rollbar/railtie.rb
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
require 'rails/railtie'
|
2
|
-
require 'rollbar'
|
3
|
-
|
4
|
-
module Rollbar
|
5
|
-
class Railtie < ::Rails::Railtie
|
6
|
-
rake_tasks do
|
7
|
-
require 'rollbar/rake_tasks'
|
8
|
-
end
|
9
|
-
|
10
|
-
initializer 'rollbar.middleware.rails' do |app|
|
11
|
-
if defined?(ActionDispatch::DebugExceptions)
|
12
|
-
# Rails 3.2.x+
|
13
|
-
require 'rollbar/middleware/rails/rollbar'
|
14
|
-
require 'rollbar/middleware/rails/show_exceptions'
|
15
|
-
|
16
|
-
app.config.middleware.insert_after ActionDispatch::DebugExceptions,
|
17
|
-
Rollbar::Middleware::Rails::RollbarMiddleware
|
18
|
-
ActionDispatch::DebugExceptions.send(:include, Rollbar::Middleware::Rails::ShowExceptions)
|
19
|
-
elsif defined?(ActionDispatch::ShowExceptions)
|
20
|
-
# Rails 3.0.x and 3.1.x
|
21
|
-
require 'rollbar/middleware/rails/rollbar'
|
22
|
-
require 'rollbar/middleware/rails/show_exceptions'
|
23
|
-
|
24
|
-
app.config.middleware.insert_after ActionDispatch::ShowExceptions,
|
25
|
-
Rollbar::Middleware::Rails::RollbarMiddleware
|
26
|
-
ActionDispatch::ShowExceptions.send(:include, Rollbar::Middleware::Rails::ShowExceptions)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
config.after_initialize do
|
31
|
-
Rollbar.preconfigure do |config|
|
32
|
-
config.default_logger = proc { ::Rails.logger }
|
33
|
-
config.environment ||= ::Rails.env
|
34
|
-
config.root ||= ::Rails.root
|
35
|
-
config.framework = "Rails: #{::Rails::VERSION::STRING}"
|
36
|
-
config.filepath ||= ::Rails.application.class.parent_name + '.rollbar'
|
37
|
-
end
|
38
|
-
|
39
|
-
ActiveSupport.on_load(:action_controller) do
|
40
|
-
# lazily load action_controller methods
|
41
|
-
require 'rollbar/rails/controller_methods'
|
42
|
-
include Rollbar::Rails::ControllerMethods
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
data/lib/rollbar/rake.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
|
3
|
-
module Rollbar
|
4
|
-
module Rake
|
5
|
-
def self.patch!
|
6
|
-
skip_patch && return unless patch?
|
7
|
-
|
8
|
-
::Rake::Application.class_eval do
|
9
|
-
alias_method :orig_display_error_message, :display_error_message
|
10
|
-
|
11
|
-
def display_error_message(ex)
|
12
|
-
Rollbar.error(ex, :use_exception_level_filters => true)
|
13
|
-
orig_display_error_message(ex)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.skip_patch
|
19
|
-
warn('[Rollbar] Rollbar is disabled for Rake tasks since your Rake version is under 0.9.x. Please upgrade to 0.9.x or higher.')
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.patch?
|
23
|
-
return false unless rake_version
|
24
|
-
|
25
|
-
major, minor, = rake_version.split('.').map(&:to_i)
|
26
|
-
|
27
|
-
major > 0 || major == 0 && minor > 8
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.rake_version
|
31
|
-
if Object.const_defined?('RAKEVERSION')
|
32
|
-
return RAKEVERSION
|
33
|
-
elsif ::Rake.const_defined?('VERSION')
|
34
|
-
return ::Rake::VERSION
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
Rollbar::Rake.patch!
|