Class: RooOnRails::Checks::Heroku::Login

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

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



14
15
16
17
18
19
20
21
# File 'lib/roo_on_rails/checks/heroku/login.rb', line 14

def call
  status, email = shell.run "heroku whoami"
  if status
    pass "logged in as #{bold email.strip}"
  else
    fail! "not logged in"
  end
end

#fixObject



23
24
25
# File 'lib/roo_on_rails/checks/heroku/login.rb', line 23

def fix
  shell.run! "heroku auth:login --sso"
end

#introObject



10
11
12
# File 'lib/roo_on_rails/checks/heroku/login.rb', line 10

def intro
  "Checking if you're signed in to Heroku..."
end