C0 code coverage information
Generated on Sun Jun 11 23:15:14 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.
1 class ConfigManager
Calls
1 Class#inherited at vendor/rails/activesupport/lib/active_support/class_inheritable_attributes.rb:108
2
3 def initialize
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
3 app/models/configuration.rb:19 in 'Object#config'
4 reload
Calls
3 ConfigManager#reload at app/models/config_manager.rb:11
5 end
6
7 def is_ok?
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
14 app/controllers/articles_controller.rb:171 in 'ArticlesController#verify_config'
8 settings.include?("blog_name")
Calls
14 ConfigManager#settings at app/models/config_manager.rb:49
9 end
10
11 def reload
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
111 app/controllers/application.rb:33 in 'ApplicationController#reload_settings'
10 test/functional/articles_controller_test.rb:15 in 'ArticlesControllerTest#setup_without_fixtures'
3 app/models/config_manager.rb:4 in 'ConfigManager#initialize'
12 settings.clear
Calls
124 ConfigManager#settings at app/models/config_manager.rb:49
13 Setting.find(:all).each do |line|
Calls
124 #<Class:ActiveRecord::Base>#find at vendor/rails/activerecord/lib/active_record/base.rb:378
14 settings[line.name.to_s] = normalize_value(line)
Calls
1540 ConfigManager#settings at app/models/config_manager.rb:49
1540 ConfigManager#normalize_value at app/models/config_manager.rb:32
1539 Setting#name at (eval):1
1 ActiveRecord::Base#method_missing at vendor/rails/activerecord/lib/active_record/base.rb:1479
15 end
16 end
17
18 def [](key)
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
149 lib/renderfix.rb:12 in 'ActionView::Base#render_file'
149 lib/renderfix.rb:13 in 'ActionView::Base#render_file'
77 app/helpers/application_helper.rb:61 in 'ApplicationHelper#config_value'
28 lib/spam_protection.rb:19 in 'SpamProtection#is_spam?'
13 lib/spam_protection.rb:59 in 'SpamProtection#scan_text'
13 lib/spam_protection.rb:58 in 'SpamProtection#scan_text'
9 app/models/theme.rb:25 in '#<Class:Theme>#current_theme_path'
8 lib/spam_protection.rb:10 in 'SpamProtection#article_closed?'
8 lib/spam_protection.rb:11 in 'SpamProtection#article_closed?'
6 app/helpers/articles_helper.rb:68 in 'ArticlesHelper#author_link'
3 app/views/articles/index.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_articles_index'
2 app/controllers/admin/content_controller.rb:14 in 'Controllers::Admin::ContentController#list'
2 app/controllers/admin/content_controller.rb:27 in 'Controllers::Admin::ContentController#new'
2 app/models/comment.rb:29 in 'Comment#transform_body'
1 app/controllers/articles_controller.rb:44 in 'ArticlesController#find_by_date'
1 app/controllers/xml_controller.rb:22 in 'XmlController#atom'
1 app/controllers/articles_controller.rb:12 in 'ArticlesController#index'
1 app/controllers/xml_controller.rb:18 in 'XmlController#rss'
1 app/controllers/xml_controller.rb:10 in 'XmlController#commentrss'
1 app/controllers/articles_controller.rb:70 in 'ArticlesController#category'
1 app/controllers/articles_controller.rb:13 in 'ArticlesController#index'
1 app/controllers/xml_controller.rb:14 in 'XmlController#trackbackrss'
1 app/apis/blogger_service.rb:72 in 'BloggerService#getUsersBlogs'
19 value = settings[key.to_s]
Calls
478 ConfigManager#settings at app/models/config_manager.rb:49
20 (value.nil?) ? Configuration.fields[key.to_s].default : value rescue nil
Calls
20 #<Class:ConfigManager>#fields at app/models/config_manager.rb:23
21 end
22
23 def self.fields
Called by
1540 app/models/config_manager.rb:33 in 'ConfigManager#normalize_value'
20 app/models/config_manager.rb:20 in 'ConfigManager#[]'
14 app/models/config_manager.rb:46 in '#<Class:ConfigManager>#setting'
24 @fields ||= {}
25 end
26
27 protected
28
29 class Item < Struct.new(:name, :ruby_type, :default)
Calls
6 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
2 Class#inherited at vendor/rails/activesupport/lib/active_support/class_inheritable_attributes.rb:108
30 end
31
32 def normalize_value(line)
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
1540 app/models/config_manager.rb:14 in 'ConfigManager#reload'
33 case (Configuration.fields[line.name.to_s].ruby_type rescue :string)
Calls
1540 Setting#name at (eval):1
1540 #<Class:ConfigManager>#fields at app/models/config_manager.rb:23
34 when :bool
35 ( line.value.to_i != 0 ) ? true : false
Calls
440 Setting#value at (eval):1
36 when :int
37 line.value.to_i
Calls
440 Setting#value at (eval):1
38 else
39 line.value
Calls
660 Setting#value at (eval):1
40 end
41 end
42
43 def self.setting(name, type, default)
Called by
1 app/models/configuration.rb:7 in '#'
1 app/models/configuration.rb:8 in '#'
1 app/models/configuration.rb:13 in '#'
1 app/models/configuration.rb:6 in '#'
1 app/models/configuration.rb:11 in '#'
1 app/models/configuration.rb:12 in '#'
1 app/models/configuration.rb:10 in '#'
1 app/models/configuration.rb:15 in '#'
1 app/models/configuration.rb:5 in '#'
1 app/models/configuration.rb:14 in '#'
1 app/models/configuration.rb:3 in '#'
1 app/models/configuration.rb:4 in '#'
1 app/models/configuration.rb:9 in '#'
1 app/models/configuration.rb:2 in '#'
44 item = Configuration::Item.new
45 item.name, item.ruby_type, item.default = name, type, default
46 fields[item.name.to_s] = item
Calls
14 #<Class:ConfigManager>#fields at app/models/config_manager.rb:23
47 end
48
49 def settings
Calls
1 #<Class:Object>#method_added at vendor/rails/actionpack/lib/action_view/vendor/builder/blankslate.rb:47
Called by
1540 app/models/config_manager.rb:14 in 'ConfigManager#reload'
478 app/models/config_manager.rb:19 in 'ConfigManager#[]'
124 app/models/config_manager.rb:12 in 'ConfigManager#reload'
14 app/models/config_manager.rb:8 in 'ConfigManager#is_ok?'
50 @hash ||= {}
51 end
52
53 end
Generated using the rcov code coverage analysis tool for Ruby version 0.6.0.