lib/bait/build.rb in bait-0.4.0 vs lib/bait/build.rb in bait-0.4.1
- old
+ new
@@ -1,8 +1,7 @@
require 'bait/object'
require 'bait/tester'
-require 'ansi2html/main'
module Bait
class Build < Bait::Object
adapter :memory,
Moneta.new(:YAML, :file => Bait.db_file('builds'))
@@ -35,13 +34,15 @@
def queued?
!self.reload.tested?
end
- def html_output
- out = StringIO.new
- ::ANSI2HTML::Main.new(self.output, out)
- return out.string
+ def status
+ if queued?
+ "queued"
+ elsif tested?
+ passed? ? "passed" : "failed"
+ end
end
after_destroy { tester.cleanup! }
end
end