public
Description: Remote multi-server automation tool. This repository is no longer being actively maintained. Please ask on the mailing list to find someone who has a well-maintained fork. Thanks!
Homepage: http://www.capify.org
Clone URL: git://github.com/jamis/capistrano.git
Added support for `set :default_shell, false` instead of requiring 
`default_run_options[:shell] = false`
Ryan McGeary (author)
Thu May 08 07:03:21 -0700 2008
commit  25764b3aa1c19bdb0a75df7d226ac29960a15452
tree    4b7f5cbc5cf4fb5f18f52a807447e89813b02538
parent  1114c00039b55b65b8a527c3ddbcb861d742a99a
...
121
122
123
124
 
125
126
127
...
144
145
146
147
148
 
...
121
122
123
 
124
125
126
127
...
144
145
146
 
147
148
0
@@ -121,7 +121,7 @@ module Capistrano
0
           options[:env] = env unless env.empty?
0
 
0
           shell = options[:shell] || self[:default_shell]
0
-          options[:shell] = shell if shell
0
+          options[:shell] = shell unless shell.nil?
0
 
0
           options
0
         end
0
@@ -144,4 +144,4 @@ module Capistrano
0
       end
0
     end
0
   end
0
-end
0
\ No newline at end of file
0
+end
...
76
77
78
 
 
 
 
 
79
80
81
...
200
201
202
203
204
 
...
76
77
78
79
80
81
82
83
84
85
86
...
205
206
207
 
208
209
0
@@ -76,6 +76,11 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
0
     assert_equal({:foo => "bar", :shell => "/bin/bash"}, @config.add_default_command_options(:foo => "bar"))
0
   end
0
 
0
+  def test_add_default_command_options_should_use_default_shell_of_false_if_present
0
+    @config.set :default_shell, false
0
+    assert_equal({:foo => "bar", :shell => false}, @config.add_default_command_options(:foo => "bar"))
0
+  end
0
+
0
   def test_add_default_command_options_should_use_shell_in_preference_of_default_shell
0
     @config.set :default_shell, "/bin/bash"
0
     assert_equal({:foo => "bar", :shell => "/bin/sh"}, @config.add_default_command_options(:foo => "bar", :shell => "/bin/sh"))
0
@@ -200,4 +205,4 @@ class ConfigurationActionsInvocationTest < Test::Unit::TestCase
0
       c = mock("data", :called => true)
0
       Capistrano::Command.expects(:process).with(command, sessions, options).yields(a, b, c)
0
     end
0
-end
0
\ No newline at end of file
0
+end

Comments