Module: Capsaicin::Files

Defined in:
lib/capsaicin/files.rb,
lib/capsaicin/files/local.rb,
lib/capsaicin/files/remote.rb

Defined Under Namespace

Modules: Local, Remote

Constant Summary collapse

COMMANDS =
[ %w(mkdir mkdir_p rmdir cp cp_r rm rm_f rm_r rm_rf
    chmod chmod_R chown chown_R touch),
%w(ln ln_s ln_sf mv install)
FILE_TESTS =
[
%w(blockdev? -b),
%w(chardev? -c),
%w(directory? -d),
%w(exists? -e),
%w(file? -f),
%w(grpowned? -G),
%w(owned? -O),
%w(pipe? -p),
%w(readable? -r),
%w(setgid? -g),
%w(setuid? -u),
%w(size? -s),
%w(socket? -S),
%w(sticky? -k),
%w(symlink? -h),
%w(writable? -w),
%w(executable? -x)
LOCAL_RUN_METHODS =
[:system, :local_run]

Instance Method Summary collapse

Instance Method Details

#_viaObject

:nodoc:


38
39
40
41
42
43
44
# File 'lib/capsaicin/files.rb', line 38

def _via  # :nodoc:
  if LOCAL_RUN_METHODS.include? @config.fetch(:run_method, nil)
    :local
  else
    :remote
  end
end