le1t0-capistrano 2.5.18.012 → 2.5.18.013

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 2.5.18.013 / Jul 23, 2010
2
+
3
+ Readded TeeIO.tee_all call to bin/cap, but added tee_all_on and tee_all_of functionality.
4
+
1
5
  == 2.5.18.012 / Jul 23, 2010
2
6
 
3
7
  Removed all calls to TeeIO, leaving it up to the user to initiate it
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.5.18.012
1
+ 2.5.18.013
data/bin/cap CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'capistrano/cli'
4
+ require 'capistrano/cli/tee_io'
5
+ TeeIO.tee_all
6
+ TeeIO.tee_all_off
4
7
  Capistrano::CLI.execute
@@ -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)
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 5
8
8
  - 18
9
- - 12
10
- version: 2.5.18.012
9
+ - 13
10
+ version: 2.5.18.013
11
11
  platform: ruby
12
12
  authors:
13
13
  - Le1t0