nuex-vlad 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rake_remote_task.rb +13 -9
- metadata +1 -1
data/lib/rake_remote_task.rb
CHANGED
|
@@ -7,15 +7,6 @@ $TESTING ||= false
|
|
|
7
7
|
$TRACE = Rake.application.options.trace
|
|
8
8
|
$-w = true if $TRACE # asshat, don't mess with my warn.
|
|
9
9
|
|
|
10
|
-
def export receiver, *methods
|
|
11
|
-
methods.each do |method|
|
|
12
|
-
eval "def #{method} *args, █ #{receiver}.#{method}(*args, &block);end"
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
export "Thread.current[:task]", :get, :put, :rsync, :run, :sudo, :target_host
|
|
17
|
-
export "Rake::RemoteTask", :host, :remote_task, :role, :set
|
|
18
|
-
|
|
19
10
|
##
|
|
20
11
|
# Rake::RemoteTask is a subclass of Rake::Task that adds
|
|
21
12
|
# remote_actions that execute in parallel on multiple hosts via ssh.
|
|
@@ -587,3 +578,16 @@ class Rake::RemoteTask < Rake::Task
|
|
|
587
578
|
end
|
|
588
579
|
|
|
589
580
|
Rake::RemoteTask.set_defaults
|
|
581
|
+
|
|
582
|
+
private
|
|
583
|
+
|
|
584
|
+
def export_methods receiver, *methods
|
|
585
|
+
methods.each do |method|
|
|
586
|
+
eval "def #{method} *args, █ #{receiver}.#{method}(*args, &block);end"
|
|
587
|
+
end
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
public
|
|
591
|
+
|
|
592
|
+
export_methods "Thread.current[:task]", :get, :put, :rsync, :run, :sudo, :target_host
|
|
593
|
+
export_methods "Rake::RemoteTask", :host, :remote_task, :role, :set
|