[Rubygems-developers] `gem help` descriptions

Eric Hodel drbrain at segment7.net
Sat Sep 22 19:43:55 EDT 2007


I've added descriptions to `gem help` output, but only for the  
following commands:

lib/rubygems/commands/lock_command.rb
lib/rubygems/commands/mirror_command.rb
lib/rubygems/commands/pristine_command.rb
lib/rubygems/commands/server_command.rb

I'd like help writing the rest of them, unless the summary is  
sufficient.

For example, here's `gem help lock`:

$ ruby -Ilib bin/gem help lock
Usage: gem lock GEMNAME-VERSION [GEMNAME-VERSION ...] [options]

   Options:
     -s, --[no-]strict                fail if unable to satisfy a  
dependency

   Common Options:
     -h, --help                       Get help on this command
     -v, --[no-]verbose               Set the verbose level of output
         --config-file FILE           Use this config file instead of  
default
         --backtrace                  Show stack backtrace on errors
         --debug                      Turn on Ruby debugging


   Arguments:
     GEMNAME       name of gem to lock
     VERSION       version of gem to lock

   Summary:
     Generate a lockdown list of gems

   Description:
     The lock command will generate a list of +gem+ statements that  
will lock
     down
     the versions for the gem given in the command line.  It will  
specify exact
     versions in the requirements list to ensure that the gems loaded  
will always
     be consistent.  A full recursive search of all effected gems  
will be
     generated.

     Example:

       gemlock rails-1.0.0 > lockdown.rb

     will produce in lockdown.rb:

       require "rubygems"
       gem 'rails', '= 1.0.0'
       gem 'rake', '= 0.7.0.1'
       gem 'activesupport', '= 1.2.5'
       gem 'activerecord', '= 1.13.2'
       gem 'actionpack', '= 1.11.2'
       gem 'actionmailer', '= 1.1.5'
       gem 'actionwebservice', '= 1.0.0'

     Just load lockdown.rb from your application to ensure that the  
current
     versions are loaded.  Make sure that lockdown.rb is loaded  
*before* any
     other require statements.

     Notice that rails 1.0.0 only requires that rake 0.6.2 or better  
be used.
     Rake-0.7.0.1 is the most recent version installed that satisfies  
that, so we
     lock it down to the exact version.

   Defaults:
     --no-strict

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars




More information about the Rubygems-developers mailing list