Class: Corundum::RSpecReportTask
- Defined in:
- lib/corundum/rspec-task.rb
Instance Method Summary collapse
- #default_configuration(rspec) ⇒ Object
- #needed? ⇒ Boolean
- #out_of_date?(stamp) ⇒ Boolean
- #timestamp ⇒ Object
Methods inherited from RSpecTask
Instance Method Details
#default_configuration(rspec) ⇒ Object
69 70 71 72 |
# File 'lib/corundum/rspec-task.rb', line 69 def default_configuration(rspec) super self.doc_path = File::join(target_dir, doc_file) end |
#needed? ⇒ Boolean
65 66 67 |
# File 'lib/corundum/rspec-task.rb', line 65 def needed? ! File.exist?(doc_path) || out_of_date?() end |
#out_of_date?(stamp) ⇒ Boolean
61 62 63 |
# File 'lib/corundum/rspec-task.rb', line 61 def out_of_date?(stamp) prerequisites.any? { |n| application[n, @scope]. > stamp} end |
#timestamp ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/corundum/rspec-task.rb', line 53 def if File.exist?(doc_path) File.mtime(doc_path.to_s) else Rake::EARLY end end |