C0 code coverage information
Generated on Fri Aug 25 11:26:31 PDT 2006 with rcov 0.7.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 CacheSweeperWorker < BackgrounDRb::Rails
2
3 def do_work(args)
4 current_time = Time.now
5 unpubed_articles = Article.find(:all, :conditions => ['cache_dirty = 1 AND published_at <= ? AND approved = 1', current_time])
6 cleaned_types = {}
7
8 unpubed_articles.each do | article |
9 class_name = article.class.to_s
10 # only clean a particular type once.
11 if cleaned_types[class_name].nil?
12 ArticleSweeper.sweep article
13 cleaned_types[class_name] = article
14 end
15 article.cache_dirty = 0
16 article.save_without_revision
17 end
18 end
19
20 end
Generated using the rcov code coverage analysis tool for Ruby version 0.7.0.