Class: AsProject::WinRemoteFileTask

Inherits:
AbstractRemoteFileTask show all
Defined in:
lib/tasks/remote_file_task.rb

Instance Attribute Summary

Attributes inherited from AbstractRemoteFileTask

#extracted_file, #mounted_path, #name, #url

Instance Method Summary collapse

Methods inherited from AbstractRemoteFileTask

#define, #downloaded_file_path, #extracted_file_path, #fetch, #get_remote_file, #initialize, #is_dmg?, #is_exe?, #is_gzip?, #is_targz?, #is_zip?, #make_downloaded_dir, #remote_file_dir, #remote_location, #unpack_dmg, #unpack_downloaded_file, #unpack_targz, #unpack_zip

Constructor Details

This class inherits a constructor from AsProject::AbstractRemoteFileTask

Instance Method Details

#clean_path(path) ⇒ Object



303
304
305
306
307
308
309
# File 'lib/tasks/remote_file_task.rb', line 303

def clean_path(path)
  path = path.split('/').join(File::SEPARATOR)
  if(path.index(' '))
    return %{"#{path}"}
  end
  return path
end

#execute(params) ⇒ Object



311
312
313
314
315
316
317
# File 'lib/tasks/remote_file_task.rb', line 311

def execute(params)
  target = File.basename(extracted_file_path)
  if(!Logger.debug)
    puts("#{target} #{params}")
  end
  system(%{"#{extracted_file_path}" #{params}})
end