public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Added gem backtrace pretty priting (Juan Lupión) [#1497 state:committed]
dhh (author)
Mon Dec 15 06:37:27 -0800 2008
commit  f9a02b12d15bdbd3c2ed18b16b31b712a77027bc
tree    cb888aab72c0652eb7bcf44da5860b9369bb2a4c
parent  4dcd8f01afe5800baa67bbdf72832afb0d627755
...
9
10
11
 
 
12
13
14
...
16
17
18
 
19
20
21
...
9
10
11
12
13
14
15
16
...
18
19
20
21
22
23
24
0
@@ -9,6 +9,8 @@ module Rails
0
     RAILS_NOISE  = %w( script/server )
0
     RUBY_NOISE   = %w( rubygems/custom_require benchmark.rb )
0
 
0
+    GEMS_DIR     = Gem.default_dir
0
+
0
     ALL_NOISE    = VENDOR_DIRS + SERVER_DIRS + RAILS_NOISE + RUBY_NOISE
0
 
0
     def initialize
0
@@ -16,6 +18,7 @@ module Rails
0
       add_filter   { |line| line.sub(RAILS_ROOT, '') }
0
       add_filter   { |line| line.sub(ERB_METHOD_SIG, '') }
0
       add_filter   { |line| line.sub('./', '/') } # for tests
0
+      add_filter   { |line| line.sub(/(#{GEMS_DIR})\/gems\/([a-z]+)-([0-9.]+)\/(.*)/, '\2 (\3) \4')} # http://gist.github.com/30430
0
       add_silencer { |line| ALL_NOISE.any? { |dir| line.include?(dir) } }
0
     end
0
   end

Comments