Parent

CI::Reporter::ReportManager

Constants

MAX_FILENAME_SIZE
MAX_SIDESTEPS

creates a uniqe filename per suite to prevent results from being overwritten if a result file is already written, it appends an index e.g.

SPEC-MailsController.xml
SPEC-MailsController.0.xml
SPEC-MailsController.1.xml
SPEC-MailsController...xml
SPEC-MailsController.N.xml

with N < 100000, to prevent endless sidestep loops

Public Class Methods

new(prefix) click to toggle source
# File lib/ci/reporter/report_manager.rb, line 10
def initialize(prefix)
  @basedir = ENV['CI_REPORTS'] || File.expand_path("#{Dir.getwd}/#{prefix.downcase}/reports")
  @basename = "#{@basedir}/#{prefix.upcase}"
  FileUtils.mkdir_p(@basedir)
end

Public Instance Methods

write_report(suite) click to toggle source
# File lib/ci/reporter/report_manager.rb, line 16
def write_report(suite)
  File.open(filename_for(suite), "w") do |f|
    f << suite.to_xml
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.