99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
# File 'lib/dcov_builder.rb', line 99
def generate
print "Generating dcov report..."
generator = Dcov::Generator.new @stats.renderable_data
report = generator.to_s
print "done.\n"
print "Writing report..."
FileUtils.mkdir("#{Continuous4r::WORK_DIR}/dcov")
if (!File.exists?("#{Continuous4r::WORK_DIR}/dcov/coverage.html")) || (File.writable?("#{Continuous4r::WORK_DIR}/dcov/coverage.html"))
output_file = File.open("#{Continuous4r::WORK_DIR}/dcov/coverage.html", "w")
output_file.write report
output_file.close
print "done.\n"
else
raise "Can't write to [#{Continuous4r::WORK_DIR}/dcov/coverage.html]."
end
end
|