The Capistrano::Shell class is the guts of the "shell" task. It implements an interactive REPL interface that users can employ to execute tasks and commands. It makes for a GREAT way to monitor systems, and perform quick maintenance on one or more machines.
# File lib/capistrano/shell.rb, line 57 def read_and_execute command = read_line case command when "?", "help" then help when "quit", "exit" then puts "exiting" return false when /^set -(\w)\s*(\S+)/ set_option($1, $2) when /^(?:(with|on)\s*(\S+))?\s*(\S.*)?/ process_command($1, $2, $3) else raise "eh?" end return true end
Start the shell running. This method will block until the shell terminates.
# File lib/capistrano/shell.rb, line 39 def run! setup puts ====================================================================Welcome to the interactive Capistrano shell! This is an experimentalfeature, and is liable to change in future releases. Type 'help' fora summary of how to use the shell.-------------------------------------------------------------------- loop do break if !read_and_execute end @bgthread.kill end
Generated with the Darkfish Rdoc Generator 2.