le1t0-capistrano 2.5.18.012 → 2.5.18.013
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/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/bin/cap +3 -0
- data/lib/capistrano/cli/tee_io.rb +13 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.5.18.
|
|
1
|
+
2.5.18.013
|
data/bin/cap
CHANGED
|
@@ -4,6 +4,7 @@ class TeeIO
|
|
|
4
4
|
attr_accessor :pipe_io
|
|
5
5
|
attr_accessor :teed_io_name
|
|
6
6
|
attr_accessor :auto_close_pipe_io
|
|
7
|
+
attr_accessor :tee_on
|
|
7
8
|
|
|
8
9
|
class << self
|
|
9
10
|
|
|
@@ -19,6 +20,16 @@ class TeeIO
|
|
|
19
20
|
tee("$stderr", io)
|
|
20
21
|
end
|
|
21
22
|
end
|
|
23
|
+
|
|
24
|
+
def tee_all_on
|
|
25
|
+
$stderr.tee_on = true if $stderr.is_a?(TeeIO)
|
|
26
|
+
$stdout.tee_on = true if $stdout.is_a?(TeeIO)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def tee_all_off
|
|
30
|
+
$stderr.tee_on = false if $stderr.is_a?(TeeIO)
|
|
31
|
+
$stdout.tee_on = false if $stdout.is_a?(TeeIO)
|
|
32
|
+
end
|
|
22
33
|
|
|
23
34
|
def tee(teed_io_name, pipe_io = nil, &block)
|
|
24
35
|
eval("#{teed_io_name} = self.new(teed_io_name, pipe_io || StringIO.new, pipe_io.nil?)")
|
|
@@ -42,11 +53,12 @@ class TeeIO
|
|
|
42
53
|
@old_io = eval(args[0])
|
|
43
54
|
@pipe_io = args[1]
|
|
44
55
|
@auto_close_pipe_io = args[2]
|
|
56
|
+
@tee_on = true
|
|
45
57
|
end
|
|
46
58
|
|
|
47
59
|
def call_on_io(method_name, *args, &block)
|
|
48
60
|
call_on_old_io(method_name, *args, &block)
|
|
49
|
-
call_on_pipe_io(method_name, *args, &block)
|
|
61
|
+
call_on_pipe_io(method_name, *args, &block) if @tee_on
|
|
50
62
|
end
|
|
51
63
|
|
|
52
64
|
def call_on_old_io(method_name, *args, &block)
|