C0 code coverage information
Generated on Tue May 30 23:34:43 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
2 # The filters added to this controller will be run for all controllers in the application.
3 # Likewise will all the methods added be available for all controllers.
4 class ApplicationController < ActionController::Base
5 include LoginSystem
6 model :user
7
8 before_filter :reload_settings
9
10 def self.cache_page(content, path)
11 begin
12 # Don't cache the page if there are any questionmark characters in the url
13 unless path =~ /\?\w+/ or path =~ /page\d+$/
14 super(content,path)
15 PageCache.create(:name => page_cache_file(path))
16 end
17 rescue # if there's a caching error, then just return the content.
18 content
19 end
20 end
21
22 def self.expire_page(path)
23 if cache = PageCache.find(:first, :conditions => ['name = ?', path])
24 cache.destroy
25 end
26 end
27
28 def cache
29 $cache ||= SimpleCache.new 1.hour
30 end
31
32 def reload_settings
33 config.reload
34 end
35
36 def theme_layout
37 Theme.current.layout
38 end
39 end
Generated using the rcov code coverage analysis tool for Ruby version 0.5.0.