Class: URI::Rsync

Inherits:
GenericEx show all
Defined in:
lib/uri/rsync.rb

Constant Summary collapse

SCHEMES =
['rsync.ssh'.freeze]
DEFAULT_HOST =
'localhost'.freeze
DEFAULT_QUERY =
''.freeze
COMPONENT =
[
  :scheme,
  :userinfo,
  :host,
  :path,
  :query
].freeze

Instance Method Summary collapse

Methods inherited from Generic

#add_query, #checkout, #mk_custom_opts, #pathname, #pathname=, #save, #to_uri, #to_yaml_string, yaml_load

Instance Method Details

#commit(aPath) ⇒ Object

end



39
40
41
# File 'lib/uri/rsync.rb', line 39

def commit ( aPath )
  shell.rsync! mk_opts, aPath, mk_arg
end

#mk_argObject



26
27
28
# File 'lib/uri/rsync.rb', line 26

def mk_arg
  "#@user@#@host:#{@path.gsub(/^\//, '')}"
end

#mk_optsObject



22
23
24
# File 'lib/uri/rsync.rb', line 22

def mk_opts
  ['-va'] + mk_custom_opts
end