C0 code coverage information
Generated on Sun Jun 11 23:15:12 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 # The methods added to this helper will be available to all templates in the application.
2 require 'digest/sha1'
Calls
1 Object#require at vendor/rails/activesupport/lib/active_support/dependencies.rb:213
3
4 module ApplicationHelper
5
6 def categorylist()
7 categories = Category.find_all_with_article_counters
8 render_partial("shared/categories", categories)
9 end
10
11 def flickrlist(url)
12 begin
13 render_partial("shared/flickr", check_cache(Flickr, url))
14 rescue
15 end
16 end
17
18 def tadalist(url)
19 begin
20 render_partial("shared/tada", check_cache(Tada, url))
21 rescue
22 end
23 end
24
25 def deliciouslist(url)
26 begin
27 render_partial("shared/delicious", check_cache(Delicious, url))
28 rescue
29 end
30 end
31
32 def fortythreelist(url)
33 begin
34 render_partial("shared/fortythree", check_cache(Fortythree, url))
35 rescue
36 end
37 end
38
39 def upcominglist(url)
40 begin
41 render_partial("shared/upcoming", check_cache(Upcoming, url))
42 rescue
43 end
44 end
45
46 def server_url_for(options = {})
Called by
6 themes/azure/layouts/default.rhtml:7 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
6 themes/azure/layouts/default.rhtml:46 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
3 app/views/xml/rss.rxml:23 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rss'
1 app/views/xml/articlerss.rxml:5 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_articlerss'
1 app/views/articles/read.rhtml:47 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
1 app/views/xml/atom.rxml:8 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_atom'
1 app/views/xml/commentrss.rxml:5 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_commentrss'
1 app/views/xml/trackbackrss.rxml:5 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_trackbackrss'
1 app/views/articles/read.rhtml:9 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
1 app/views/xml/rsd.rxml:15 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rsd'
1 app/views/xml/rsd.rxml:6 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rsd'
1 app/views/xml/rss.rxml:6 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rss'
1 app/views/articles/read.rhtml:39 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
1 app/views/xml/rsd.rxml:12 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rsd'
1 app/views/articles/read.rhtml:7 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
1 app/views/xml/rsd.rxml:9 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_rsd'
47 url_for options.update(:only_path => false)
Calls
28 ActionView::Helpers::UrlHelper#url_for at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:16
48 end
49
50 def strip_html(text)
Called by
2 app/views/admin/comments/list.rhtml:21 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_list'
1 app/views/articles/read.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
51 attribute_key = /[\w:_-]+/
52 attribute_value = /(?:[A-Za-z0-9]+|(?:'[^']*?'|"[^"]*?"))/
53 attribute = /(?:#{attribute_key}(?:\s*=\s*#{attribute_value})?)/
54 attributes = /(?:#{attribute}(?:\s+#{attribute})*)/
55 tag_key = attribute_key
56 tag = %r{<[!/?\[]?(?:#{tag_key}|--)(?:\s+#{attributes})?\s*(?:[!/?\]]+|--)?>}
57 text.gsub(tag, '').gsub(/\s+/, ' ').strip
58 end
59
60 def config_value(name)
Called by
33 app/views/layouts/administration.rhtml:24 in 'ActionView::Base::CompiledTemplates#_run_html_layouts_administration'
9 app/helpers/xml_helper.rb:23 in 'XmlHelper#blog_title'
6 themes/azure/layouts/default.rhtml:22 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
6 themes/azure/layouts/default.rhtml:6 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
6 themes/azure/layouts/default.rhtml:21 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
4 app/helpers/articles_helper.rb:48 in 'ArticlesHelper#page_title'
1 app/views/admin/general/index.rhtml:33 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:39 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:88 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:83 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:71 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:21 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:43 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:65 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:94 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:53 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:28 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:25 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
1 app/views/admin/general/index.rhtml:47 in 'ActionView::Base::CompiledTemplates#_run_html_admin_general_index'
61 config[name]
Calls
77 Object#config at app/models/configuration.rb:18
77 ConfigManager#[] at app/models/config_manager.rb:18
62 end
63
64 def article_link(title, article,anchor=nil)
Called by
8 app/views/admin/content/_articles.rhtml:12 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
5 app/helpers/application_helper.rb:106 in 'ApplicationHelper#comments_link'
5 app/views/articles/_article.rhtml:1 in 'ActionView::Base::CompiledTemplates#_run_html_articles__article'
5 app/helpers/application_helper.rb:110 in 'ApplicationHelper#trackbacks_link'
3 app/views/articles/archives.rhtml:16 in 'ActionView::Base::CompiledTemplates#_run_html_articles_archives'
2 app/views/admin/trackback/list.rhtml:22 in 'ActionView::Base::CompiledTemplates#_run_html_admin_trackback_list'
1 app/views/xml/articlerss.rxml:25 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_articlerss'
1 app/views/xml/articlerss.rxml:24 in 'ActionView::Base::CompiledTemplates#_run_xml_xml_articlerss'
65 link_to title, article_url(article,true,anchor)
Calls
30 ApplicationHelper#article_url at app/helpers/application_helper.rb:76
30 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
66 end
67
68 def page_link(title, page,anchor=nil)
69 link_to title, page_url(page,true,anchor)
70 end
71
72 def comment_url_link(title, comment)
Called by
2 app/views/admin/comments/list.rhtml:21 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_list'
1 app/views/admin/comments/edit.rhtml:4 in 'ActionView::Base::CompiledTemplates#_run_html_admin_comments_edit'
73 link_to title, comment_url(comment)
Calls
3 ApplicationHelper#comment_url at app/helpers/application_helper.rb:84
3 ActionView::Helpers::UrlHelper#link_to at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:41
74 end
75
76 def article_url(article, only_path = true, anchor = nil)
Called by
30 app/helpers/application_helper.rb:65 in 'ApplicationHelper#article_link'
9 app/helpers/xml_helper.rb:11 in 'XmlHelper#post_link'
2 app/views/admin/content/edit.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_edit'
1 app/views/admin/content/show.rhtml:5 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content_show'
77 url_for :only_path => only_path, :controller=>"/articles", :action =>"permalink", :year => article.created_at.year, :month => sprintf("%.2d", article.created_at.month), :day => sprintf("%.2d", article.created_at.day), :title => article.permalink, :anchor => anchor
Calls
120 Article#created_at at (eval):1
42 ActionView::Helpers::UrlHelper#url_for at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:16
40 Article#permalink at (eval):1
8 ActiveRecord::Associations::AssociationProxy#method_missing at vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:73
78 end
79
80 def page_url(page, only_path = true, anchor = nil)
81 url_for :only_path => only_path, :controller => "/articles", :action => "view_page", :name => page.name, :anchor => anchor
82 end
83
84 def comment_url(comment, only_path = true)
Called by
6 app/helpers/xml_helper.rb:15 in 'XmlHelper#comment_link'
3 app/helpers/application_helper.rb:73 in 'ApplicationHelper#comment_url_link'
85 article = comment.article
86 url_for :only_path => only_path, :controller=>"/articles", :action =>"permalink", :year => article.created_at.year, :month => sprintf("%.2d", article.created_at.month), :day => sprintf("%.2d", article.created_at.day), :title => article.permalink, :anchor=> "comment-#{comment.id}"
Calls
36 ActiveRecord::Associations::AssociationProxy#method_missing at vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:73
9 Comment#id at (eval):1
9 ActionView::Helpers::UrlHelper#url_for at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:16
87 end
88
89 def trackback_url(trackback, only_path = true)
Called by
2 app/helpers/xml_helper.rb:19 in 'XmlHelper#trackback_link'
90 article = trackback.article
91 url_for :only_path => only_path, :controller=>"/articles", :action =>"permalink", :year => article.created_at.year, :month => sprintf("%.2d", article.created_at.month), :day => sprintf("%.2d", article.created_at.day), :title => article.permalink, :anchor=> "trackback-#{trackback.id}"
Calls
8 ActiveRecord::Associations::AssociationProxy#method_missing at vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:73
2 Trackback#id at (eval):1
2 ActionView::Helpers::UrlHelper#url_for at vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb:16
92 end
93
94 def responses(collection, word)
Called by
8 app/views/admin/content/_articles.rhtml:14 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
8 app/views/admin/content/_articles.rhtml:15 in 'ActionView::Base::CompiledTemplates#_run_html_admin_content__articles'
6 app/views/admin/categories/_categories.rhtml:10 in 'ActionView::Base::CompiledTemplates#_run_html_admin_categories__categories'
5 app/helpers/application_helper.rb:110 in 'ApplicationHelper#trackbacks_link'
5 app/helpers/application_helper.rb:106 in 'ApplicationHelper#comments_link'
95 case collection.size
Calls
26 ActiveRecord::Associations::AssociationCollection#size at vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:93
6 ActiveRecord::Associations::HasAndBelongsToManyAssociation#size at vendor/rails/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb:74
96 when 0
97 "no #{word}s"
98 when 1
99 "1 #{word}"
100 else
101 "#{collection.size} #{word}s"
102 end
103 end
104
105 def comments_link(article)
Called by
5 app/helpers/articles_helper.rb:55 in 'ArticlesHelper#article_links'
106 article_link responses(article.comments, "comment"), article, 'comments'
Calls
5 ApplicationHelper#responses at app/helpers/application_helper.rb:94
5 ApplicationHelper#article_link at app/helpers/application_helper.rb:64
107 end
108
109 def trackbacks_link(article)
Called by
5 app/helpers/articles_helper.rb:56 in 'ArticlesHelper#article_links'
110 article_link responses(article.trackbacks, "trackback"), article, 'trackbacks'
Calls
5 ApplicationHelper#responses at app/helpers/application_helper.rb:94
5 ApplicationHelper#article_link at app/helpers/application_helper.rb:64
111 end
112
113 def check_cache(aggregator, url)
114 hash = "#{aggregator.to_s}_#{Digest::SHA1.hexdigest(url)}".to_sym
115 controller.cache[hash] ||= aggregator.new(url)
116 end
117
118 def js_distance_of_time_in_words_to_now(date)
Called by
5 app/views/articles/_article.rhtml:3 in 'ActionView::Base::CompiledTemplates#_run_html_articles__article'
1 app/views/articles/read.rhtml:21 in 'ActionView::Base::CompiledTemplates#_run_html_articles_read'
119 time = date.utc.strftime("%a, %d %b %Y %H:%M:%S GMT")
120 "<span class=\"typo_date\" title=\"#{time}\">#{time}</span>"
121 end
122
123 def render_sidebar(sidebar)
124 begin
125 render_component :layout => false, :controller => sidebar.sidebar_controller.component_name, :action=>'index', :params => {:sidebar => sidebar }
126 rescue => e
127 content_tag :p, e.message, :class => 'error'
128 end
129 end
130
131 def meta_tag(name, value)
Called by
6 themes/azure/layouts/default.rhtml:6 in 'ActionView::Base::CompiledTemplates#_run_html__home_batsman_src_rcov_typo_2466460_themes_azure_layouts_default'
132 tag :meta, :name => name, :content => value unless value.blank?
Calls
6 String#blank? at vendor/rails/activesupport/lib/active_support/core_ext/blank.rb:29
133 end
134
135 def date(date)
136 "<span class=\"typo_date\">#{date.utc.strftime("%d. %b")}</span>"
137 end
138
139 def render_theme(options)
140 options[:controller]=Themes::ThemeController.active_theme_name
141 render_component(options)
142 end
143
144 def toggle_effect(domid, true_effect, true_opts, false_effect, false_opts)
Called by
6 app/helpers/admin/base_helper.rb:78 in 'Controllers::Admin::BaseHelper#task_quickpost'
2 app/helpers/admin/base_helper.rb:82 in 'Controllers::Admin::BaseHelper#task_quicknav'
145 "$('#{domid}').style.display == 'none' ? new #{false_effect}('#{domid}', {#{false_opts}}) : new #{true_effect}('#{domid}', {#{true_opts}}); return false;"
146 end
147 end
Generated using the rcov code coverage analysis tool for Ruby version 0.6.0.