Sha256: cb6ca60ba4651d080990c4f698a39b3e7edcfb502ad937fa72326be6e23468ef

Contents?: true

Size: 863 Bytes

Versions: 129

Compression:

Stored size: 863 Bytes

Contents

module Rcov
  class TextReport < TextSummary # :nodoc:
    def execute
      print_lines
      print_header
      print_lines

      each_file_pair_sorted do |fname, finfo|
        name = fname.size < 52 ? fname : "..." + fname[-48..-1]
        print_info(name, finfo.num_lines, finfo.num_code_lines,
        finfo.code_coverage)
      end

      print_lines
      print_info("Total", num_lines, num_code_lines, code_coverage)
      print_lines
      puts summary
    end

    def print_info(name, lines, loc, coverage)
      puts "|%-51s | %5d | %5d | %5.1f%% |" % [name, lines, loc, 100 * coverage]
    end

    def print_lines
      puts "+----------------------------------------------------+-------+-------+--------+"
    end

    def print_header
      puts "|                  File                              | Lines |  LOC  |  COV   |"
    end
  end
end

Version data entries

129 entries across 61 versions & 9 rubygems

Version Path
gigpark-rcov-0.8.6 lib/rcov/formatters/text_report.rb
hooligan495-rcov-0.9.1-java lib/rcov/formatters/text_report.rb
relevance-rcov-0.8.6 lib/rcov/formatters/text_report.rb
relevance-rcov-0.9.0 lib/rcov/formatters/text_report.rb
relevance-rcov-0.9.1.1 lib/rcov/formatters/text_report.rb
relevance-rcov-0.9.2.1 lib/rcov/formatters/text_report.rb
relevance-rcov-0.9.3-java lib/rcov/formatters/text_report.rb
devise_sociable-0.1.0 vendor/bundle/gems/rcov-1.0.0/lib/rcov/formatters/text_report.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/rcov-0.9.9/lib/rcov/formatters/text_report.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/rcov-0.9.11/lib/rcov/formatters/text_report.rb