lib/simplecov.rb
#
# Collate a series of SimpleCov result files into a single SimpleCov output.
# You can optionally specify configuration with a block:
#   SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"]
#    OR
#   SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' # using rails profile
#    OR
#   SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"] do
#     add_filter 'test'
#   end
#    OR
#   SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' do
#     add_filter 'test'
#   end
#
# Please check out the RDoc for SimpleCov::Configuration to find about
# available config options, or checkout the README for more in-depth
# information about coverage collation
#
Collate a series of SimpleCov result files into a single SimpleCov output.

Please check out the RDoc for SimpleCov::Configuration to find about
available config options, or checkout the README for more in-depth
information about coverage collation
Collate a series of SimpleCov result files into a single SimpleCov output . Please check out the RDoc for SimpleCov :: Configuration to find about available config options or checkout the README for more in - depth information about coverage collation
def collate(result_filenames, profile = nil, &block)
      raise "There's no reports to be merged" if result_filenames.empty?
      initial_setup(profile, &block)
      results = result_filenames.flat_map do |filename|
        Result.from_hash(JSON.parse(File.read(filename)) || {})
      end
      @result = ResultMerger.merge_and_store(*results)
      run_exit_tasks!
    end
def collate ( result_filenames , profile = nil , & block ) raise "There's no reports to be merged" if result_filenames . empty? initial_setup ( profile , & block ) results = result_filenames . flat_map do | filename | Result . from_hash ( JSON . parse ( File . read ( filename ) ) || { } ) end @result = ResultMerger . merge_and_store ( * results ) run_exit_tasks! end
Collate a series of SimpleCov result files into a single SimpleCov output.
Collate a series of SimpleCov result files into a single SimpleCov output .
# Re-create each included instance of SimpleCov::Result from the stored run data. # Use the ResultMerger to produce a single, merged result, ready to use.
result_filenames
profile
block