class RHC::Commands::Deployment

Public Instance Methods

activate(id) click to toggle source
# File lib/rhc/commands/deployment.rb, line 72
def activate(id)
  rest_app = find_app

  raise RHC::DeploymentsNotSupportedException.new if !rest_app.supports? "DEPLOY"

  activate_deployment(rest_app, id)
  0
end
list(app) click to toggle source
# File lib/rhc/commands/deployment.rb, line 31
def list(app)
  rest_app = find_app
  deployment_activations = rest_app.deployment_activations

  raise RHC::DeploymentNotFoundException, "No deployments found for application #{app}." if !deployment_activations.present?

  pager

  display_deployment_list(deployment_activations)
  0
end
show(id) click to toggle source
# File lib/rhc/commands/deployment.rb, line 51
def show(id)
  rest_app = find_app
  item = rest_app.deployment_activations.reverse_each.detect{|item| item[:deployment].id == id}

  raise RHC::DeploymentNotFoundException, "Deployment ID '#{id}' not found for application #{rest_app.name}." if !item.present?

  display_deployment(item)
  paragraph { say "Use 'rhc show-app #{rest_app.name} --configuration' to check your deployment configurations." }
  0
end