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
Example:
$ heroku stack === example Available Stacks bamboo-mri-1.9.2 bamboo-ree-1.8.7 * cedar
# File lib/heroku/command/stack.rb, line 20 def index validate_arguments! stacks_data = api.get_stack(app).body styled_header("#{app} Available Stacks") stacks = stacks_data.map do |stack| row = [stack['current'] ? '*' : ' ', stack['name']] row << '(beta)' if stack['beta'] row << '(deprecated)' if stack['deprecated'] row << '(prepared, will migrate on next git push)' if stack['requested'] row.join(' ') end styled_array(stacks) end
set()
click to toggle source
stack:set STACK
set new app stack
# File lib/heroku/command/stack.rb, line 40 def set unless stack = shift_argument error("Usage: heroku stack:set STACK.\nMust specify target stack.") end api.put_stack(app, stack) display "Stack set. Next release on #{app} will use #{stack}." display "Run `git push heroku master` to create a new release on #{stack}." end