capchef 0.0.6 → 0.0.7
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/capchef.rb +2 -2
- metadata +3 -3
data/lib/capchef.rb
CHANGED
|
@@ -63,7 +63,7 @@ module Capchef
|
|
|
63
63
|
my_surun_script(cap, 'surun', command, nil, options, &block)
|
|
64
64
|
else
|
|
65
65
|
sucmd = "#{cap.sudo} #{sudo_options} PATH=#{path} #{command}"
|
|
66
|
-
cap.run(sucmd, options)
|
|
66
|
+
cap.run(sucmd, options, &block)
|
|
67
67
|
end
|
|
68
68
|
else
|
|
69
69
|
@root_password ||= cap.fetch(:root_password, Capistrano::CLI.password_prompt("root password: "))
|
|
@@ -71,7 +71,7 @@ module Capchef
|
|
|
71
71
|
sucmd = "su -c 'cd; PATH=#{path}; #{command}'"
|
|
72
72
|
cap.run(sucmd, options) do |channel, stream, output|
|
|
73
73
|
puts "[#{channel[:host]}] #{output}" if output
|
|
74
|
-
channel.send_data("#{@root_password}\n") if
|
|
74
|
+
channel.send_data("#{@root_password}\n") if output && output =~ /^Password:/
|
|
75
75
|
yield channel, stream, output if block_given?
|
|
76
76
|
end
|
|
77
77
|
end
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
version: 0.0.
|
|
8
|
+
- 7
|
|
9
|
+
version: 0.0.7
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Brad Pardee
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-09-
|
|
17
|
+
date: 2011-09-22 00:00:00 -04:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|