class Heroku::Command::Stack

manage the stack for an app

Public Instance Methods

index() click to toggle source

stack

show the list of available stacks

--all # include deprecated stacks

# File lib/heroku/command/stack.rb, line 14
def index
  include_deprecated = true if extract_option("--all")

  list = heroku.list_stacks(app, :include_deprecated => include_deprecated)
  lines = list.map do |stack|
    row = [stack['current'] ? '*' : ' ', stack['name']]
    row << '(beta)' if stack['beta']
    row << '(prepared, will migrate on next git push)' if stack['requested']
    row.join(' ')
  end
  display lines.join("\n")
end
migrate() click to toggle source

stack:migrate STACK

prepare migration of this app to a new stack

# File lib/heroku/command/stack.rb, line 31
def migrate
  stack = args.shift.downcase.strip rescue nil
  error "No target stack specified." unless stack
  display heroku.migrate_to_stack(app, stack)
end