C0 code coverage information

Generated on Sun Jun 11 23:15:16 CEST 2006 with rcov 0.6.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
components/sidebars/sidebar_controller.rb 110 80
81.8% 
75.0% 
  1 class Sidebars::Plugin < ApplicationController
Calls
      1   ActionWebService::Dispatcher::ActionController::ClassMethods#inherited at vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:33

  2   uses_component_template_root
Calls
      1   #<Class:ActionController::Base>#uses_component_template_root at vendor/rails/actionpack/lib/action_controller/base.rb:346
      1   #<Class:ActionController::Base>#uses_component_template_root at vendor/rails/actionpack/lib/action_controller/base.rb:346

  3   include ApplicationHelper
  4 
  5 
  6   # The name that needs to be used when refering to the plugin's
  7   # controller in render statements
  8   def self.component_name
Called by
     55   components/sidebars/sidebar_controller.rb:19 in '#<Class:Controllers::Sidebars::Plugin>#short_name'
     11   components/sidebars/sidebar_controller.rb:19 in '#<Class:Controllers::Sidebars::Plugin>#short_name'

  9     if (self.to_s=~/::([a-zA-Z]+)Controller/)
 10       "plugins/sidebars/#{$1}".downcase
 11     else
 12       raise "I don't know who I am: #{self.to_s}"
 13     end
 14   end
 15 
 16   # The name that's stored in the DB.  This is the final chunk of the
 17   # controller name, like 'xml' or 'flickr'. 
 18   def self.short_name
Called by
     55   components/sidebars/sidebar_controller.rb:88 in '#<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars'
     11   components/sidebars/sidebar_controller.rb:88 in '#<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars'

 19     component_name.split(%r{/}).last
Calls
     55   #<Class:Controllers::Sidebars::Plugin>#component_name at components/sidebars/sidebar_controller.rb:8
     11   #<Class:Controllers::Sidebars::Plugin>#component_name at components/sidebars/sidebar_controller.rb:8

 20   end
 21 
 22   # The name that shows up in the UI
 23   def self.display_name
 24     # This is the default, but it's best to override it
 25     short_name
 26   end
 27 
 28   def self.description
 29     short_name
 30   end
 31 
 32   def self.default_config
 33     {}
 34   end
 35 
 36   def index
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 37     @sidebar=params['sidebar']
 38     @sb_config = @sidebar.active_config
 39     if(not @sb_config or @sb_config.size == 0)
 40       @sb_config = (self.class.default_config)
 41     end
 42     content 
 43     render :action=>'content' unless performed?
 44   end
 45 
 46   def configure_wrapper
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 47     @sidebar=params['sidebar']
 48     @sidebar.staged_config ||= (self.class.default_config)
 49     configure
 50     render :action=>'configure' unless performed?
 51   end
 52 
 53   # This controller is used on to actually display sidebar items.
 54   def content
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 55   end
 56 
 57   # This controller is used to configure the sidebar from /admin/sidebar
 58   def configure
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 59     render_text ''
 60   end
 61 
 62   def save_config
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 63     render_text ''
 64   end
 65 
 66   private
 67   def sb_config(key)
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 68     @sidebar.active_config[key.to_s]
 69   end
 70 
 71   # Horrid hack to make check_cache happy
 72   def controller
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47

 73     self
 74   end
 75 end
 76   
 77 module Sidebars
 78   class SidebarController < ApplicationController
Calls
      1   ActionWebService::Dispatcher::ActionController::ClassMethods#inherited at vendor/rails/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:33

 79 
 80     uses_component_template_root
Calls
      1   #<Class:ActionController::Base>#uses_component_template_root at vendor/rails/actionpack/lib/action_controller/base.rb:346
      1   #<Class:ActionController::Base>#uses_component_template_root at vendor/rails/actionpack/lib/action_controller/base.rb:346

 81     
 82     def display_plugins
Calls
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
      1   #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
      6   vendor/rails/actionpack/lib/action_controller/base.rb:853 in 'ActionController::Base#perform_action_without_filters'

 83       @sidebars=self.class.enabled_sidebars
Calls
      5   #<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars at components/sidebars/sidebar_controller.rb:87
      1   #<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars at components/sidebars/sidebar_controller.rb:87

 84       render :layout => false
Calls
      5   ActionController::Benchmarking#render at vendor/rails/actionpack/lib/action_controller/benchmarking.rb:46
      1   ActionController::Benchmarking#render at vendor/rails/actionpack/lib/action_controller/benchmarking.rb:46

 85     end
 86     
 87     def self.enabled_sidebars
Called by
      5   components/sidebars/sidebar_controller.rb:83 in 'Controllers::Sidebars::SidebarController#display_plugins'
      1   components/sidebars/sidebar_controller.rb:83 in 'Controllers::Sidebars::SidebarController#display_plugins'

 88       available=available_sidebars.inject({}) { |h,i| h[i.short_name]=i; h}
Calls
     55   #<Class:Controllers::Sidebars::Plugin>#short_name at components/sidebars/sidebar_controller.rb:18
     11   #<Class:Controllers::Sidebars::Plugin>#short_name at components/sidebars/sidebar_controller.rb:18
      5   #<Class:Controllers::Sidebars::SidebarController>#available_sidebars at components/sidebars/sidebar_controller.rb:95
      1   #<Class:Controllers::Sidebars::SidebarController>#available_sidebars at components/sidebars/sidebar_controller.rb:95

 89       
 90       enabled=Sidebar.find_all_visible.select do |sidebar|
Calls
      5   #<Class:Sidebar>#find_all_visible at app/models/sidebar.rb:8
      1   #<Class:Sidebar>#find_all_visible at app/models/sidebar.rb:8
      1   Module#const_missing at vendor/rails/activesupport/lib/active_support/dependencies.rb:187

 91         sidebar.controller and available[sidebar.controller]
 92       end
 93     end
 94 
 95     def self.available_sidebars
Called by
      5   components/sidebars/sidebar_controller.rb:88 in '#<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars'
      1   components/sidebars/sidebar_controller.rb:88 in '#<Class:Controllers::Sidebars::SidebarController>#enabled_sidebars'

 96       objects=[]
 97       ObjectSpace.each_object(Class) do |o|
 98         if Plugin > o
 99           objects.push o
100         end
101       end
102 
103       objects
104     end
105   end
106 end
107 
108 Dir["#{RAILS_ROOT}/components/plugins/sidebars/[_a-z]*.rb"].each do |f|
109   require_dependency f
110 end

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

Valid XHTML 1.0! Valid CSS!