Module: EY::Serverside::CLI::Workflows

Defined in:
lib/engineyard-serverside/cli/workflows.rb,
lib/engineyard-serverside/cli/workflows/base.rb,
lib/engineyard-serverside/cli/workflows/errors.rb,
lib/engineyard-serverside/cli/workflows/helpers.rb,
lib/engineyard-serverside/cli/workflows/integrating_servers.rb,
lib/engineyard-serverside/cli/workflows/calling_deploy_hooks.rb,
lib/engineyard-serverside/cli/workflows/enabling_maintenance.rb,
lib/engineyard-serverside/cli/workflows/disabling_maintenance.rb,
lib/engineyard-serverside/cli/workflows/deploying_applications.rb,
lib/engineyard-serverside/cli/workflows/restarting_applications.rb,
lib/engineyard-serverside/cli/workflows/rolling_back_applications.rb,
lib/engineyard-serverside/cli/workflows/showing_maintenance_status.rb

Overview

Workflows is a collection of reified procedures that handle the various requirements of our CLI app

Defined Under Namespace

Modules: Helpers Classes: Base, CallingDeployHooks, DeployingApplications, DisablingMaintenance, EnablingMaintenance, IntegratingServers, RestartingApplications, RollingBackApplications, ShowingMaintenanceStatus, Undefined

Constant Summary collapse

DEFINED =
{
  :deploy => DeployingApplications,
  :disable_maintenance => DisablingMaintenance,
  :enable_maintenance => EnablingMaintenance,
  :hook => CallingDeployHooks,
  :integrate => IntegratingServers,
  :maintenance_status => ShowingMaintenanceStatus,
  :restart => RestartingApplications,
  :rollback => RollingBackApplications
}

Class Method Summary collapse

Class Method Details

.normalized(workflow) ⇒ Object



37
38
39
40
41
# File 'lib/engineyard-serverside/cli/workflows.rb', line 37

def self.normalized(workflow)
  return nil if workflow.nil?

  workflow.to_sym
end

.perform(workflow, options = {}) ⇒ Object



28
29
30
31
# File 'lib/engineyard-serverside/cli/workflows.rb', line 28

def self.perform(workflow, options = {})
  resolve(workflow).
    perform(options)
end

.resolve(workflow) ⇒ Object



33
34
35
# File 'lib/engineyard-serverside/cli/workflows.rb', line 33

def self.resolve(workflow)
  (DEFINED[normalized(workflow)] || Base)
end