Class: AsProject::RemoteFileTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- AsProject::RemoteFileTask
- Defined in:
- lib/tasks/remote_file_task.rb
Overview
The RemoteFileTask was created to resolve external tool dependencies for relatively stable tools like mtasc, swfmill and mxmlc The intention is that common tools will have RemoteFileTasks deployed with AsProject and will include mac/win/unix targets so that users on each platform will seamlessly download and target these tools.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#osx_extracted_file ⇒ Object
Returns the value of attribute osx_extracted_file.
-
#osx_mounted_path ⇒ Object
Returns the value of attribute osx_mounted_path.
-
#osx_url ⇒ Object
Returns the value of attribute osx_url.
-
#remote_task_name ⇒ Object
Returns the value of attribute remote_task_name.
-
#unix_extracted_file ⇒ Object
Returns the value of attribute unix_extracted_file.
-
#unix_url ⇒ Object
Returns the value of attribute unix_url.
-
#user_task ⇒ Object
Returns the value of attribute user_task.
-
#win_extracted_file ⇒ Object
Returns the value of attribute win_extracted_file.
-
#win_url ⇒ Object
Returns the value of attribute win_url.
Instance Method Summary collapse
- #clean_path(path) ⇒ Object
- #define ⇒ Object
- #define_user_task ⇒ Object
- #execute(params) ⇒ Object
- #extracted_file_path ⇒ Object
-
#initialize(name = :remote_file_task, do_not_define = false) {|_self| ... } ⇒ RemoteFileTask
constructor
A new instance of RemoteFileTask.
- #user ⇒ Object
Constructor Details
#initialize(name = :remote_file_task, do_not_define = false) {|_self| ... } ⇒ RemoteFileTask
Returns a new instance of RemoteFileTask.
27 28 29 30 31 32 33 |
# File 'lib/tasks/remote_file_task.rb', line 27 def initialize(name=:remote_file_task, do_not_define=false) @name = name @user_task = nil @remote_task_name = name.to_s yield self if block_given? define unless do_not_define end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def name @name end |
#osx_extracted_file ⇒ Object
Returns the value of attribute osx_extracted_file.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def osx_extracted_file @osx_extracted_file end |
#osx_mounted_path ⇒ Object
Returns the value of attribute osx_mounted_path.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def osx_mounted_path @osx_mounted_path end |
#osx_url ⇒ Object
Returns the value of attribute osx_url.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def osx_url @osx_url end |
#remote_task_name ⇒ Object
Returns the value of attribute remote_task_name.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def remote_task_name @remote_task_name end |
#unix_extracted_file ⇒ Object
Returns the value of attribute unix_extracted_file.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def unix_extracted_file @unix_extracted_file end |
#unix_url ⇒ Object
Returns the value of attribute unix_url.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def unix_url @unix_url end |
#user_task ⇒ Object
Returns the value of attribute user_task.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def user_task @user_task end |
#win_extracted_file ⇒ Object
Returns the value of attribute win_extracted_file.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def win_extracted_file @win_extracted_file end |
#win_url ⇒ Object
Returns the value of attribute win_url.
16 17 18 |
# File 'lib/tasks/remote_file_task.rb', line 16 def win_url @win_url end |
Instance Method Details
#clean_path(path) ⇒ Object
64 65 66 67 |
# File 'lib/tasks/remote_file_task.rb', line 64 def clean_path(path) define_user_task return user_task.clean_path(path) end |
#define ⇒ Object
35 36 37 38 |
# File 'lib/tasks/remote_file_task.rb', line 35 def define define_user_task self end |
#define_user_task ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/tasks/remote_file_task.rb', line 48 def define_user_task if(@user_task.nil?) if(remote_task_name.nil?) raise UsageError.new('RemoteFileTask created without a remote_task_name value...') end @user = PathFinder.new().user @user_task = @user.remote_file_task(remote_task_name, self) task name => remote_task_name end @user_task end |
#execute(params) ⇒ Object
60 61 62 |
# File 'lib/tasks/remote_file_task.rb', line 60 def execute(params) user_task.execute(params) end |
#extracted_file_path ⇒ Object
44 45 46 |
# File 'lib/tasks/remote_file_task.rb', line 44 def extracted_file_path return @user_task.extracted_file_path end |
#user ⇒ Object
40 41 42 |
# File 'lib/tasks/remote_file_task.rb', line 40 def user return @user end |