Class: Pot::Transports::Local

Inherits:
Object
  • Object
show all
Defined in:
lib/pot/transports/local.rb

Overview

Local Delivery Method

This actor implementation performs any given commands on your local system, as opposed to other implementations that generally run commands on a remote system via the network.

This is useful if you’d like to use Pot to provision your local machine. To enable this actor, in your Pot script specify the :local delivery mechanism.

deployment do
  delivery :local
end

Instance Method Summary collapse

Instance Method Details

#execute(command) ⇒ Object



18
19
20
# File 'lib/pot/transports/local.rb', line 18

def execute(command)
  system command
end

#transfer(source, destination, recursive = true) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/pot/transports/local.rb', line 22

def transfer(source, destination, recursive = true)
  if recursive
    flags = "-R "
  end

  system "cp #{flags}#{source} #{destination}"
end