C0 code coverage information
Generated on Sat May 27 21:23:37 CEST 2006 with rcov 0.5.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
2
3 def initialize
This method was called by:
3 app/models/configuration.rb:19 in 'config'
4 reload
5 end
6
7 def is_ok?
This method was called by:
14 app/controllers/articles_controller.rb:171 in 'verify_config'
8 settings.include?("blog_name")
9 end
10
11 def reload
This method was called by:
111 app/controllers/application.rb:33 in 'reload_settings'
10 test/functional/articles_controller_test.rb:15 in 'setup_without_fixtures'
3 app/models/config_manager.rb:4 in 'initialize'
12 settings.clear
13 Setting.find(:all).each do |line|
14 settings[line.name.to_s] = normalize_value(line)
15 end
16 end
17
18 def [](key)
This method was called by:
149 lib/renderfix.rb:13 in 'render_file'
149 lib/renderfix.rb:12 in 'render_file'
77 app/helpers/application_helper.rb:61 in 'config_value'
28 lib/spam_protection.rb:19 in 'is_spam?'
9 app/models/theme.rb:25 in 'current_theme_path'
8 lib/spam_protection.rb:10 in 'article_closed?'
6 app/helpers/articles_helper.rb:68 in 'author_link'
3 app/views/articles/index.rhtml:9 in '_run_html_articles_index'
2 app/controllers/admin/content_controller.rb:14 in 'list'
2 app/controllers/admin/content_controller.rb:27 in 'new'
2 app/models/comment.rb:29 in 'transform_body'
1 app/controllers/articles_controller.rb:70 in 'category'
1 app/apis/blogger_service.rb:72 in 'getUsersBlogs'
1 app/controllers/xml_controller.rb:10 in 'commentrss'
1 app/controllers/xml_controller.rb:14 in 'trackbackrss'
1 app/controllers/articles_controller.rb:13 in 'index'
1 app/controllers/articles_controller.rb:44 in 'find_by_date'
1 app/controllers/xml_controller.rb:22 in 'atom'
1 app/controllers/articles_controller.rb:12 in 'index'
1 app/controllers/xml_controller.rb:18 in 'rss'
19 value = settings[key.to_s]
20 (value.nil?) ? Configuration.fields[key.to_s].default : value rescue nil
21 end
22
23 def self.fields
This method was called by:
896 app/models/config_manager.rb:33 in 'normalize_value'
309 app/models/config_manager.rb:20 in '[]'
14 app/models/config_manager.rb:46 in 'setting'
24 @fields ||= {}
25 end
26
27 protected
28
29 class Item < Struct.new(:name, :ruby_type, :default)
30 end
31
32 def normalize_value(line)
This method was called by:
896 app/models/config_manager.rb:14 in 'reload'
33 case (Configuration.fields[line.name.to_s].ruby_type rescue :string)
34 when :bool
35 ( line.value.to_i != 0 ) ? true : false
36 when :int
37 line.value.to_i
38 else
39 line.value
40 end
41 end
42
43 def self.setting(name, type, default)
This method was called by:
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
1 app/models/configuration.rb: in ''
44 item = Configuration::Item.new
45 item.name, item.ruby_type, item.default = name, type, default
46 fields[item.name.to_s] = item
47 end
48
49 def settings
This method was called by:
896 app/models/config_manager.rb:14 in 'reload'
444 app/models/config_manager.rb:19 in '[]'
124 app/models/config_manager.rb:12 in 'reload'
14 app/models/config_manager.rb:8 in 'is_ok?'
50 @hash ||= {}
51 end
52
53 end
Generated using the rcov code coverage analysis tool for Ruby version 0.5.0.