lib/bolt/transport/base.rb
# Downloads the given source file from a batch of targets to the destination location
# on the host.
#
# The default implementation only supports batches of size 1 and will fail otherwise.
#
# Transports may override this method to implement their own batch processing.
Downloads the given source file from a batch of targets to the destination location
on the host.

The default implementation only supports batches of size 1 and will fail otherwise.

Transports may override this method to implement their own batch processing.
Downloads the given source file from a batch of targets to the destination location on the host . The default implementation only supports batches of size 1 and will fail otherwise . Transports may override this method to implement their own batch processing .
def batch_download(targets, source, destination, options = {}, position = [], &callback)
        require 'erb'
        assert_batch_size_one("batch_download()", targets)
        target = targets.first
        with_events(target, callback, 'download', position) do
          escaped_name = ERB::Util.url_encode(target.safe_name)
          target_destination = File.expand_path(escaped_name, destination)
          @logger.debug { "Downloading: '#{source}' on #{target.safe_name} to #{target_destination}" }
          download(target, source, target_destination, options)
        end
      end
def batch_download ( targets , source , destination , options = { } , position = [ ] , & callback ) require 'erb' assert_batch_size_one ( "batch_download()" , targets ) target = targets . first with_events ( target , callback , 'download' , position ) do escaped_name = ERB :: Util . url_encode ( target . safe_name ) target_destination = File . expand_path ( escaped_name , destination ) @logger . debug { "Downloading: '#{source}' on #{target.safe_name} to #{target_destination}" } download ( target , source , target_destination , options ) end end
Downloads the given source file from a batch of targets to the destination location
on the host.
Downloads the given source file from a batch of targets to the destination location on the host .
targets
<not_specific>
source
<not_specific>
destination
<not_specific>
options
<not_specific>
position
<not_specific>
callback
<not_specific>