about summary refs log tree commit homepage
path: root/lib/mongrel/command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mongrel/command.rb')
-rw-r--r--lib/mongrel/command.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb
index 7790b64..8f65426 100644
--- a/lib/mongrel/command.rb
+++ b/lib/mongrel/command.rb
@@ -157,6 +157,10 @@ module Mongrel
         puts "#{Mongrel::Command::BANNER}\nAvailable commands are:\n\n"
 
         self.commands.each do |name|
+          if /mongrel::/ =~ name
+            name = name[9 .. -1]
+          end
+
           puts " - #{name[1 .. -1]}\n"
         end
 
@@ -179,8 +183,12 @@ module Mongrel
           return true
         end
 
-        # command exists, set it up and validate it
         begin
+          # quick hack so that existing commands will keep working but the Mongrel:: ones can be moved
+          if ["start", "stop", "restart"].include? cmd_name
+            cmd_name = "mongrel::" + cmd_name
+          end
+
           command = GemPlugin::Manager.instance.create("/commands/#{cmd_name}", :argv => args)
         rescue OptionParser::InvalidOption
           STDERR.puts "#$! for command '#{cmd_name}'"