diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2009-03-05 12:22:42 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2009-03-05 12:22:42 +0100 |
commit | de540416e9a1ead164c9c80352565de2dc5955ce (patch) | |
tree | bdcad19e6e3449dbea3568de3e3a69f923d450d3 /railties | |
parent | 713b9c6a1b00492db72f61896118264306c6de71 (diff) | |
download | rails-de540416e9a1ead164c9c80352565de2dc5955ce.tar.gz rails-de540416e9a1ead164c9c80352565de2dc5955ce.tar.bz2 rails-de540416e9a1ead164c9c80352565de2dc5955ce.zip |
Make sure that Rails frameworks are silenced when running in gem mode too
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/backtrace_cleaner.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/railties/lib/rails/backtrace_cleaner.rb b/railties/lib/rails/backtrace_cleaner.rb index e1b422716d..b6fdf42c4e 100644 --- a/railties/lib/rails/backtrace_cleaner.rb +++ b/railties/lib/rails/backtrace_cleaner.rb @@ -2,6 +2,8 @@ module Rails class BacktraceCleaner < ActiveSupport::BacktraceCleaner ERB_METHOD_SIG = /:in `_run_erb_.*/ + RAILS_GEMS = %w( actionpack activerecord actionmailer activesupport activeresource rails ) + VENDOR_DIRS = %w( vendor/gems vendor/rails ) SERVER_DIRS = %w( lib/mongrel bin/mongrel lib/passenger bin/passenger-spawn-server @@ -20,6 +22,7 @@ module Rails add_filter { |line| line.sub('./', '/') } # for tests add_filter { |line| line.sub(/(#{GEMS_DIR})\/gems\/([a-z]+)-([0-9.]+)\/(.*)/, '\2 (\3) \4')} # http://gist.github.com/30430 add_silencer { |line| ALL_NOISE.any? { |dir| line.include?(dir) } } + add_silencer { |line| RAILS_GEMS.any? { |gem| line =~ /^#{gem} / } } add_silencer { |line| line =~ %r(vendor/plugins/[^\/]+/lib) } end end |