class Corundum::RSpecReportTask

Public Instance Methods

all_rspec_options() click to toggle source
Calls superclass method Corundum::RSpecTask#all_rspec_options
# File lib/corundum/rspec-task.rb, line 85
def all_rspec_options
  super + formats.inject([]) do |list, (format, target)|
    list + ["--format", format, "--out", target]
  end
end
default_configuration(rspec) click to toggle source
# File lib/corundum/rspec-task.rb, line 81
def default_configuration(rspec)
  super
end
needed?() click to toggle source
# File lib/corundum/rspec-task.rb, line 77
def needed?
  ! File.exist?(doc_path.abspath) || out_of_date?(timestamp)
end
out_of_date?(stamp) click to toggle source
# File lib/corundum/rspec-task.rb, line 71
def out_of_date?(stamp)
  prerequisites.any? { |n|
    application[n, @scope].timestamp > stamp
  }
end
resolve_configuration() click to toggle source
# File lib/corundum/rspec-task.rb, line 91
def resolve_configuration
  super
  resolve_paths
end
timestamp() click to toggle source
# File lib/corundum/rspec-task.rb, line 60
def timestamp
  return Rake::EARLY if formats.empty?
  (formats.values + extra_products).map do |path|
    if File.exist?(path.to_s)
      File.mtime(path.to_s)
    else
      Rake::EARLY
    end
  end.min
end