Sha256: ade68c4e193352d36363bf20f119fe12b699a2bf6c698f46be1e4f611c696ef8

Contents?: true

Size: 621 Bytes

Versions: 35

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

#
# A ridiculously simple formatter for SimpleCov results.
#
module SimpleCov
  module Formatter
    class SimpleFormatter
      # Takes a SimpleCov::Result and generates a string out of it
      def format(result)
        output = "".dup
        result.groups.each do |name, files|
          output << "Group: #{name}\n"
          output << "=" * 40
          output << "\n"
          files.each do |file|
            output << "#{file.filename} (coverage: #{file.covered_percent.round(2)}%)\n"
          end
          output << "\n"
        end
        output
      end
    end
  end
end

Version data entries

35 entries across 23 versions & 3 rubygems

Version Path
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/simplecov-0.17.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.3 vendor/bundle/ruby/2.7.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/simplecov-0.16.1/lib/simplecov/formatter/simple_formatter.rb