capchef 0.0.4 → 0.0.5
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 +9 -1
- metadata +2 -2
data/lib/capchef.rb
CHANGED
|
@@ -39,6 +39,14 @@ module Capchef
|
|
|
39
39
|
return @use_sudo
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
def sudo_options
|
|
43
|
+
@sudo_options ||= ''
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def sudo_options=(val)
|
|
47
|
+
@sudo_options = val
|
|
48
|
+
end
|
|
49
|
+
|
|
42
50
|
# Runs +command+ as root invoking the command with 'su -c' and handling the root password prompt.
|
|
43
51
|
#
|
|
44
52
|
# surun cap, "/etc/init.d/apache reload"
|
|
@@ -54,7 +62,7 @@ module Capchef
|
|
|
54
62
|
if command.kind_of?(Array)
|
|
55
63
|
my_surun_script(cap, 'surun', command, nil, options, &block)
|
|
56
64
|
else
|
|
57
|
-
sucmd = "#{cap.sudo} PATH=#{path} #{command}"
|
|
65
|
+
sucmd = "#{cap.sudo} #{sudo_options} PATH=#{path} #{command}"
|
|
58
66
|
cap.run(sucmd, options)
|
|
59
67
|
end
|
|
60
68
|
else
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: capchef
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.5
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Brad Pardee
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-09-
|
|
13
|
+
date: 2011-09-20 00:00:00 -04:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|