Module: Scooter::HttpDispatchers::CodeManager

Includes:
V1
Defined in:
lib/scooter/httpdispatchers/code_manager.rb,
lib/scooter/httpdispatchers/code_manager/v1/v1.rb

Overview

Currently there is no httpdispatcher built for the CodeManager module it is necessary to create one and extend this module onto it

Example: api = Scooter::HttpDispatchers::HttpDispatcher.new(master) api.extend(Scooter::HttpDispatchers::CodeManager) api.deploy_environments([‘environment_one’, ‘environment_two’])

Defined Under Namespace

Modules: V1

Instance Method Summary collapse

Methods included from V1

#deploys

Instance Method Details

#deploy_all_environments(wait = true) ⇒ Object

Raises:

  • (ArgumentError)


24
25
26
27
28
# File 'lib/scooter/httpdispatchers/code_manager.rb', line 24

def deploy_all_environments(wait=true)
  raise ArgumentError.new('wait must be TrueClass or FalseClass') unless !!wait == wait
  payload = {'deploy-all' => true, 'wait' => wait}
  deploys(payload)
end

#deploy_environments(environment_array, wait = true) ⇒ Object

Raises:

  • (ArgumentError)


18
19
20
21
22
# File 'lib/scooter/httpdispatchers/code_manager.rb', line 18

def deploy_environments(environment_array, wait=true)
  raise ArgumentError.new('wait must be TrueClass or FalseClass') unless !!wait == wait
  payload = {:environments => environment_array, 'wait' => wait}
  deploys(payload)
end