Class: Onair::Platform::Heroku

Inherits:
Base
  • Object
show all
Defined in:
lib/onair/platform/heroku.rb

Constant Summary collapse

HOST =
"api.heroku.com"

Instance Method Summary collapse

Methods inherited from Base

#display_name, #initialize

Constructor Details

This class inherits a constructor from Onair::Platform::Base

Instance Method Details

#snapshotObject



12
13
14
15
16
17
18
19
20
# File 'lib/onair/platform/heroku.rb', line 12

def snapshot
  token = resolve_token
  release_thread = quiet_thread { deployed(token) }
  builds_thread = quiet_thread { builds(token) }
  deployed = release_thread.value
  pending, succeeded_shas = builds_thread.value
  Snapshot.new(deployed: deployed, pending: pending,
               latest_built_sha: succeeded_shas.first, succeeded_shas: succeeded_shas)
end