module Bait::SimpleCovSupport
Public Instance Methods
check_for_simplecov()
click to toggle source
# File lib/bait/simplecov_support.rb, line 11 def check_for_simplecov if File.exists? simplecov_html_path self.simplecov = true convert_paths self.broadcast :simplecov, 'supported' self.save end end
convert_paths()
click to toggle source
# File lib/bait/simplecov_support.rb, line 20 def convert_paths buffer = "" File.open(simplecov_html_path, "r") do |file| buffer = file.read.gsub("./assets", "/build/#{self.id}/coverage/assets") end File.open(simplecov_html_path, "w") do |file| file.write buffer end end
coverage_dir()
click to toggle source
# File lib/bait/simplecov_support.rb, line 3 def coverage_dir File.join(clone_path, 'coverage') end
simplecov_html_path()
click to toggle source
# File lib/bait/simplecov_support.rb, line 7 def simplecov_html_path File.join(coverage_dir, "index.html") end