Class: Moonshot::BuildMechanism::TravisDeploy
- Inherits:
-
Object
- Object
- Moonshot::BuildMechanism::TravisDeploy
- Includes:
- DoctorHelper, ResourcesHelper, Shell
- Defined in:
- lib/moonshot/build_mechanism/travis_deploy.rb
Overview
This simply waits for Travis-CI to finish building a job matching the version and ‘BUILD=1’.
Instance Attribute Summary collapse
-
#output_file ⇒ Object
readonly
Returns the value of attribute output_file.
Attributes included from ResourcesHelper
Instance Method Summary collapse
- #build_hook(version) ⇒ Object
-
#initialize(slug, pro: false) ⇒ TravisDeploy
constructor
A new instance of TravisDeploy.
- #post_build_hook(_) ⇒ Object
- #pre_build_hook(_) ⇒ Object
Methods included from Shell
Methods included from DoctorHelper
Constructor Details
#initialize(slug, pro: false) ⇒ TravisDeploy
Returns a new instance of TravisDeploy.
13 14 15 16 17 |
# File 'lib/moonshot/build_mechanism/travis_deploy.rb', line 13 def initialize(slug, pro: false) @slug = slug @endpoint = pro ? '--pro' : '--org' @cli_args = "-r #{@slug} #{@endpoint}" end |
Instance Attribute Details
#output_file ⇒ Object (readonly)
Returns the value of attribute output_file.
11 12 13 |
# File 'lib/moonshot/build_mechanism/travis_deploy.rb', line 11 def output_file @output_file end |
Instance Method Details
#build_hook(version) ⇒ Object
22 23 24 25 26 |
# File 'lib/moonshot/build_mechanism/travis_deploy.rb', line 22 def build_hook(version) job_number = find_build_and_job(version) wait_for_job(job_number) check_build(version) end |
#post_build_hook(_) ⇒ Object
28 29 |
# File 'lib/moonshot/build_mechanism/travis_deploy.rb', line 28 def post_build_hook(_) end |
#pre_build_hook(_) ⇒ Object
19 20 |
# File 'lib/moonshot/build_mechanism/travis_deploy.rb', line 19 def pre_build_hook(_) end |