Class: Heroku::Kensa::AllCheck
Overview
On Testing:
I've opted to not write tests for this
due to the simple nature it's currently in.
If this becomes more complex in even the
least amount, find me (blake) and I'll
help get tests in.
Instance Attribute Summary
Attributes inherited from Check
Instance Method Summary collapse
Methods inherited from Check
#api_requires?, #call, #check, #env, #error, #initialize, #run, #test, #to_proc, #url, #warning
Constructor Details
This class inherits a constructor from Heroku::Kensa::Check
Instance Method Details
#call! ⇒ Object
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/heroku/kensa/check.rb', line 576 def call! args = data[:args] run ManifestCheck, data run ProvisionCheck, data response = data[:provision_response] data.merge!(:id => response["id"]) config = response["config"] || Hash.new if args screen. "\n\n" screen. "Starting #{args.first}..." screen. "\n\n" run_in_env(config) { system(*args) } error("run exited abnormally, expected 0, got #{$?.to_i}") unless $?.to_i == 0 screen. "\n" screen. "End of #{args.first}\n" end data[:plan] ||= 'foo' run PlanChangeCheck, data run DeprovisionCheck, data end |
#run_in_env(env) ⇒ Object
602 603 604 605 606 |
# File 'lib/heroku/kensa/check.rb', line 602 def run_in_env(env) env.each {|key, value| ENV[key] = value } yield env.keys.each {|key| ENV.delete(key) } end |