Class: ExtremeContinuousBuilder::Build
- Inherits:
-
Object
- Object
- ExtremeContinuousBuilder::Build
- Defined in:
- lib/extreme_continuous_builder.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#success ⇒ Object
readonly
Returns the value of attribute success.
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(options = {}) ⇒ Build
constructor
A new instance of Build.
-
#run ⇒ Object
Runs the tests, returns one of the fiollowing: ::failed: The test started failing ::broken: The test is still failing ::succesful: The test is still working ::revived: The test started working, you fixed it.
Constructor Details
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
6 7 8 |
# File 'lib/extreme_continuous_builder.rb', line 6 def output @output end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/extreme_continuous_builder.rb', line 6 def status @status end |
#success ⇒ Object (readonly)
Returns the value of attribute success.
6 7 8 |
# File 'lib/extreme_continuous_builder.rb', line 6 def success @success end |
Instance Method Details
#clean ⇒ Object
34 35 36 37 |
# File 'lib/extreme_continuous_builder.rb', line 34 def clean File.delete log_file_path if File.exist? log_file_path File.delete lock_file_path if File.exist? lock_file_path end |
#run ⇒ Object
Runs the tests, returns one of the fiollowing:
::failed: The test started failing
::broken: The test is still failing
::succesful: The test is still working
::revived: The test started working, you fixed it
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/extreme_continuous_builder.rb', line 20 def run under_lock do previous_status = @status.recall if status = make @status.keep(:succesful) (previous_status == :succesful or previous_status == false) ? :succesful : :revived else @status.keep(:failed) previous_status == :failed ? :broken : :failed end end end |