about summary refs log tree commit homepage
path: root/lib/mongrel/command.rb
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-13 21:54:05 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-05-13 21:54:05 +0000
commitd51ec2ce14523f1b9cb42cca3043ad966cf05555 (patch)
treeb1504f6ada1d54c912abb57543f7065d1150a4bc /lib/mongrel/command.rb
parent429ebcd5dfbdc54c239fa9425048119026fe9bef (diff)
downloadunicorn-d51ec2ce14523f1b9cb42cca3043ad966cf05555.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@174 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'lib/mongrel/command.rb')
-rw-r--r--lib/mongrel/command.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mongrel/command.rb b/lib/mongrel/command.rb
index 2277063..cfad43f 100644
--- a/lib/mongrel/command.rb
+++ b/lib/mongrel/command.rb
@@ -10,6 +10,8 @@ module Mongrel
 
   module Command
 
+    BANNER = "Usage: mongrel_rails <command> [options]"
+    
     # A Command pattern implementation used to create the set of command available to the user
     # from Mongrel.  The script uses objects which implement this interface to do the
     # user's bidding.
@@ -35,6 +37,7 @@ module Mongrel
       def initialize(options={})
         argv = options[:argv] || []
         @opt = OptionParser.new
+        @opt.banner = Mongrel::Command::BANNER
         @valid = true
         # this is retarded, but it has to be done this way because -h and -v exit
         @done_validating = false
@@ -125,7 +128,7 @@ module Mongrel
 
       # Prints a list of available commands.
       def print_command_list
-        puts "Available commands are:\n\n"
+        puts "#{Mongrel::Command::BANNER}\nAvailable commands are:\n\n"
         
         self.commands.each do |name|
           puts " - #{name[1 .. -1]}\n"
@@ -161,7 +164,7 @@ module Mongrel
         # needed so the command is already valid so we can skip it.
         if not command.done_validating
           if not command.validate
-            STDERR.puts "#{cmd_name} reported an error. Use -h to get help."
+            STDERR.puts "#{cmd_name} reported an error. Use mongrel_rails #{cmd_name} -h to get help."
             return false
           else
             command.run