lib/coverband/base.rb in coverband-1.0.1 vs lib/coverband/base.rb in coverband-1.0.2

- old
+ new

@@ -87,11 +87,11 @@ end if @reporter if @reporter.class.name.match(/redis/i) before_time = Time.now - @stats.increment "coverband.files.recorded_files", @files.length if @stats + @stats.count "coverband.files.recorded_files", @files.length if @stats @reporter.store_report(@files.dup) time_spent = Time.now - before_time @stats.timing "coverband.files.recorded_time", time_spent if @stats @files = {} @file_usage = Hash.new(0) @@ -130,20 +130,20 @@ if !file.match(/(\/gems\/|internal\:prelude)/) && file.match(@project_directory) && !@ignore_patterns.any?{|pattern| file.match(/#{pattern}/) } add_file_without_checks(file, line) end end + # file from ruby coverband at this method call is a full path + # file from native coverband is also a full path + # + # at the moment the full paths don't merge so the 'last' one wins and each deploy + # with a normal capistrano setup resets coverage. + # + # should we make it relative in this method (slows down collection) + # -- OR -- + # we could have the reporter MERGE the results after normalizing the filenames + # (went with this route see report_scov previous_line_hash) def add_file_without_checks(file, line) - # file from ruby coverband at this method call is a full path - # file from native coverband is also a full path - # - # at the moment the full paths don't merge so the 'last' one wins and each deploy - # with a normal capistrano setup resets coverage. - # - # should we make it relative in this method (slows down collection) - # -- OR -- - # we could have the reporter MERGE the results after normalizing the filenames - # (went with this route see report_scov previous_line_hash) if @verbose @file_usage[file] += 1 @file_line_usage[file] = Hash.new(0) unless @file_line_usage.include?(file) @file_line_usage[file][line] += 1 end