C0 code coverage information

Generated on Fri Aug 25 10:11:30 PDT 2006 with rcov 0.7.0


Code reported as executed by Ruby looks like this...
and this: this line is also marked as covered.
Lines considered as run by rcov, but not reported by Ruby, look like this,
and this: these lines were inferred by rcov (using simple heuristics).
Finally, here's a line marked as not executed.
Name Total lines Lines of code Total coverage Code coverage
app/controllers/images_controller.rb 45 36
35.6% 
25.0% 
 1 class ImagesController < ApplicationController
 2     session :off
 3 
 4     caches_page :image, :small_thumb, :big_thumb, :tiny_thumb
 5 
 6     def image
 7         get_image(:image_data, 'image')
 8     end
 9     
10     def small_thumb
11         get_image(:small_thumb, 'small_thumb')
12     end
13     
14     def big_thumb
15         get_image(:big_thumb, 'big_thumb')
16     end
17     
18     def tiny_thumb
19         get_image(:tiny_thumb, 'tiny_thumb')
20     end
21     
22     protected
23     
24     def get_image(field, action)
25         params[:id].freeze
26         full_file_name = params[:id].dup
27         image_id = full_file_name.slice!(0...full_file_name.index('.'))
28         full_file_name.slice!(0)
29         @image = Image.find(image_id)
30         if @image and @image.image_data[field]
31             if full_file_name == @image.original_filename
32                 #cache_page(@image[field], :controller => "images", :action => field, :id => params[:id] )
33                 send_data(@image.image_data[field],
34                 :filename => @image.original_filename,
35                 :type => @image.content_type,
36                 :disposition => "inline")
37             else
38                 return false
39             end
40         else
41             return false
42         end
43     end
44     
45 end

Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.

Valid XHTML 1.0! Valid CSS!