Class: Bob::Test::BuilderStub
- Defined in:
- lib/bob/test/builder_stub.rb
Instance Attribute Summary collapse
-
#commit_info ⇒ Object
readonly
Returns the value of attribute commit_info.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Attributes inherited from Builder
Class Method Summary collapse
Instance Method Summary collapse
- #completed(status, output) ⇒ Object
-
#initialize(buildable) ⇒ BuilderStub
constructor
A new instance of BuilderStub.
- #started(commit_info) ⇒ Object
Methods inherited from Builder
Constructor Details
#initialize(buildable) ⇒ BuilderStub
Returns a new instance of BuilderStub.
16 17 18 19 20 21 22 |
# File 'lib/bob/test/builder_stub.rb', line 16 def initialize(buildable) super @status = nil @output = "" @commit_info = {} end |
Instance Attribute Details
#commit_info ⇒ Object (readonly)
Returns the value of attribute commit_info.
14 15 16 |
# File 'lib/bob/test/builder_stub.rb', line 14 def commit_info @commit_info end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
14 15 16 |
# File 'lib/bob/test/builder_stub.rb', line 14 def output @output end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/bob/test/builder_stub.rb', line 14 def status @status end |
Class Method Details
.for(repo, commit) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/bob/test/builder_stub.rb', line 4 def self.for(repo, commit) new( "scm" => repo.scm, "uri" => repo.uri, "branch" => repo.branch, "commit" => commit, "command" => repo.command ) end |
Instance Method Details
#completed(status, output) ⇒ Object
28 29 30 31 |
# File 'lib/bob/test/builder_stub.rb', line 28 def completed(status, output) @status = status ? :successful : :failed @output = output end |
#started(commit_info) ⇒ Object
24 25 26 |
# File 'lib/bob/test/builder_stub.rb', line 24 def started(commit_info) @commit_info = commit_info end |