Changeset 9025
- Timestamp:
- 03/14/08 03:20:08 (4 months ago)
- Files:
-
- tools/capistrano/CHANGELOG (modified) (1 diff)
- tools/capistrano/lib/capistrano/shell.rb (modified) (1 diff)
- tools/capistrano/test/shell_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/capistrano/CHANGELOG
r8995 r9025 1 1 *SVN* 2 3 * Ensure that the default run options are mixed into the command options when executing a command from the cap shell [Ken Collins] 2 4 3 5 * Added :none SCM module for deploying a specific directory's contents [Jamis Buck] tools/capistrano/lib/capistrano/shell.rb
r7696 r9025 170 170 processor = configuration.sudo_behavior_callback(Configuration.default_io_proc) 171 171 sessions = servers.map { |server| configuration.sessions[server] } 172 cmd = Command.new(command, sessions, :logger => configuration.logger, &processor) 172 options = configuration.add_default_command_options({}) 173 cmd = Command.new(command, sessions, options.merge(:logger => configuration.logger), &processor) 173 174 previous = trap("INT") { cmd.stop! } 174 175 cmd.process! tools/capistrano/test/shell_test.rb
r6457 r9025 62 62 assert @shell.read_and_execute 63 63 end 64 65 def test_task_command_with_bang_gets_processed_by_exec_tasks 66 while_testing_post_exec_commands do 67 @shell.expects(:read_line).returns("!deploy") 68 @shell.expects(:exec_tasks).with(["deploy"]) 69 assert @shell.read_and_execute 70 end 71 end 72 73 def test_normal_command_gets_processed_by_exec_command 74 while_testing_post_exec_commands do 75 @shell.expects(:read_line).returns("uptime") 76 @shell.expects(:exec_command).with("uptime",nil) 77 @shell.expects(:connect) 78 assert @shell.read_and_execute 79 end 80 end 81 82 83 private 84 85 def while_testing_post_exec_commands(&block) 86 @shell.instance_variable_set(:@mutex,Mutex.new) 87 yield 88 end 89 64 90 end