C0 code coverage information
Generated on Sat May 27 21:23:38 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 Theme
2 cattr_accessor :cache_theme_lookup
3 @@cache_theme_lookup = false
4
5 attr_accessor :name, :path
6
7 def initialize(name, path)
This method was called by:
8 app/models/theme.rb:34 in 'theme_from_path'
8 @name, @path = name, path
9 end
10
11 def layout
This method was called by:
6 app/controllers/application.rb:37 in 'theme_layout'
12 "../../themes/#{name}/layouts/default"
13 end
14
15 def description
This method was called by:
1 app/views/admin/themes/index.rhtml:4 in '_run_html_admin_themes_index'
16 readme = File.read("#{path}/about.markdown")
17 HtmlEngine.transform(readme, "markdown smartypants")
18 end
19
20 def self.themes_root
This method was called by:
9 app/models/theme.rb:25 in 'current_theme_path'
1 app/models/theme.rb:48 in 'search_theme_directory'
21 RAILS_ROOT + "/themes"
22 end
23
24 def self.current_theme_path
This method was called by:
7 app/models/theme.rb:29 in 'current'
2 app/controllers/theme_controller.rb:27 in 'render_theme_item'
25 "#{themes_root}/#{config[:theme]}"
26 end
27
28 def self.current
This method was called by:
6 app/controllers/application.rb:37 in 'theme_layout'
1 app/controllers/admin/themes_controller.rb:5 in 'index'
29 theme_from_path(current_theme_path)
30 end
31
32 def self.theme_from_path(path)
This method was called by:
7 app/models/theme.rb:29 in 'current'
1 app/models/theme.rb:39 in 'find_all'
33 name = path.scan(/[-\w]+$/i).flatten.first
34 self.new(name, path)
35 end
36
37 def self.find_all
This method was called by:
1 app/controllers/admin/themes_controller.rb:4 in 'index'
38 installed_themes.inject([]) do |array, path|
39 array << theme_from_path(path)
40 end
41 end
42
43 def self.installed_themes
This method was called by:
1 app/models/theme.rb:38 in 'find_all'
44 cache_theme_lookup ? @theme_cache ||= search_theme_directory : search_theme_directory
45 end
46
47 def self.search_theme_directory
This method was called by:
1 app/models/theme.rb:44 in 'installed_themes'
48 Dir.glob("#{themes_root}/[-_a-zA-Z0-9]*").collect do |file|
49 file if File.directory?(file)
50 end.compact
51 end
52 end
Generated using the rcov code coverage analysis tool for Ruby version 0.5.0.