Sha256: 5890ef194b8a46837ca4320c351c24caed60654c5e9daae0c2ed06d152975b03

Contents?: true

Size: 1.05 KB

Versions: 21

Compression:

Stored size: 1.05 KB

Contents

%w( v1 ).each do |lib|
  require "scooter/httpdispatchers/code_manager/v1/#{lib}"
end

module Scooter
  module HttpDispatchers
    # 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'])
    module CodeManager

      include Scooter::HttpDispatchers::CodeManager::V1

      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

      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
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
scooter-4.5.4 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.5.3 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.5.2 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.5.1 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.5.0 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.4.0 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.3.2 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.3.1 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.3.0 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.9 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.8 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.7 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.6 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.5 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.4 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.3 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.2 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.1 lib/scooter/httpdispatchers/code_manager.rb
scooter-4.2.0 lib/scooter/httpdispatchers/code_manager.rb
scooter-3.2.19 lib/scooter/httpdispatchers/code_manager.rb