class CC::Formatters::LinkedFormatter
Public Instance Methods
format_coverage()
click to toggle source
# File lib/cc/formatters/linked_formatter.rb, line 9 def format_coverage message = message_prefix message << format_link(details_url, "Test coverage").to_s message << " has #{changed} to #{covered_percent}% (#{delta})" if compare_url message << " (#{format_link(compare_url, "Compare")})" end message end
format_quality()
click to toggle source
# File lib/cc/formatters/linked_formatter.rb, line 21 def format_quality message = message_prefix message << format_link(details_url, constant_name).to_s message << " has #{changed} from #{previous_rating} to #{rating}" if compare_url message << " (#{format_link(compare_url, "Compare")})" end message end
format_test()
click to toggle source
# File lib/cc/formatters/linked_formatter.rb, line 4 def format_test message = message_prefix message << "This is a test of the #{service_title} service hook" end
format_vulnerability()
click to toggle source
# File lib/cc/formatters/linked_formatter.rb, line 33 def format_vulnerability message = message_prefix if multiple? message << "#{vulnerabilities.size} new" message << " #{format_link(details_url, warning_type)}" message << " issues found" else message << "New #{format_link(details_url, warning_type)}" message << " issue found" message << location_info end message end
Private Instance Methods
format_link(url, text)
click to toggle source
# File lib/cc/formatters/linked_formatter.rb, line 51 def format_link(url, text) case options[:link_style] when :html then "<a href=\"#{url}\">#{text}</a>" when :wiki then "<#{url}|#{text}>" else text end end