Class: Bard::CI::Local
- Inherits:
-
Struct
- Object
- Struct
- Bard::CI::Local
- Defined in:
- lib/bard/ci/local.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
Returns the value of attribute branch.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#sha ⇒ Object
Returns the value of attribute sha.
Instance Method Summary collapse
Instance Attribute Details
#branch ⇒ Object
Returns the value of attribute branch
5 6 7 |
# File 'lib/bard/ci/local.rb', line 5 def branch @branch end |
#project_name ⇒ Object
Returns the value of attribute project_name
5 6 7 |
# File 'lib/bard/ci/local.rb', line 5 def project_name @project_name end |
#sha ⇒ Object
Returns the value of attribute sha
5 6 7 |
# File 'lib/bard/ci/local.rb', line 5 def sha @sha end |
Instance Method Details
#console ⇒ Object
27 28 29 |
# File 'lib/bard/ci/local.rb', line 27 def console @console end |
#exists? ⇒ Boolean
23 24 25 |
# File 'lib/bard/ci/local.rb', line 23 def exists? true end |
#run ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bard/ci/local.rb', line 6 def run start start_time = Time.new.to_i while building? elapsed_time = Time.new.to_i - start_time yield elapsed_time, nil sleep(2) end @stdin.close @console = @stdout_and_stderr.read @stdout_and_stderr.close success? end |