Class: RooOnRails::Checks::Heroku::Token

Inherits:
Base
  • Object
show all
Defined in:
lib/roo_on_rails/checks/heroku/token.rb

Overview

Output context:

  • heroku.api_client: a connected PlatformAPI client

Instance Method Summary collapse

Methods inherited from Base

#initialize, requires, #run

Methods included from RooOnRails::Checks::Helpers

#bold, included

Constructor Details

This class inherits a constructor from RooOnRails::Checks::Base

Instance Method Details

#callObject



17
18
19
20
21
22
23
# File 'lib/roo_on_rails/checks/heroku/token.rb', line 17

def call
  status, token = shell.run "heroku auth:token"
  fail! "could not get a token" unless status

  context.heroku!.api_client = PlatformAPI.connect_oauth(token.strip)
  pass "connected to Heroku's API"
end

#introObject



13
14
15
# File 'lib/roo_on_rails/checks/heroku/token.rb', line 13

def intro
  "Obtaining Heroku auth token..."
end