From ae824894609851dd113cdcc1ff2140bee90761a6 Mon Sep 17 00:00:00 2001 From: Mike Gunderloy Date: Mon, 9 Jan 2012 15:57:15 -0600 Subject: [PATCH] Usage should come before arguments --- command-reference.erb | 8 +- command-reference.md | 192 +++++++++++++++++++++--------------------- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/command-reference.erb b/command-reference.erb index 4f6b8488..9a3016d5 100644 --- a/command-reference.erb +++ b/command-reference.erb @@ -15,6 +15,10 @@ What each `gem` command does, and how to use it. <%= htmlify(command.summary) %> +### Usage + + <%= command.usage %> [options] + <% if command.arguments != "" %> ### Arguments @@ -23,10 +27,6 @@ What each `gem` command does, and how to use it. <% end %> <% end %> -### Usage - - <%= command.usage %> [options] - <% if command.description && command.description != "" %> ### Description diff --git a/command-reference.md b/command-reference.md index 2bddfce3..d651d940 100644 --- a/command-reference.md +++ b/command-reference.md @@ -42,6 +42,10 @@ What each `gem` command does, and how to use it. Build a gem from a gemspec +### Usage + + gem build GEMSPEC_FILE [options] + ### Arguments @@ -50,40 +54,40 @@ Build a gem from a gemspec -### Usage - - gem build GEMSPEC_FILE [options] - ## gem cert Manage RubyGems certificates and signing settings - - ### Usage gem cert [options] + + ## gem check Check installed gems - - ### Usage gem check [options] + + ## gem cleanup Clean up old versions of installed gems in the local repository +### Usage + + gem cleanup [GEMNAME ...] [options] + ### Arguments @@ -92,10 +96,6 @@ Clean up old versions of installed gems in the local repository -### Usage - - gem cleanup [GEMNAME ...] [options] - ### Description @@ -108,6 +108,10 @@ installed elsewhere in GEM_PATH the cleanup command won't touch it. Display the contents of the installed gems +### Usage + + gem contents GEMNAME [GEMNAME ...] [options] + ### Arguments @@ -116,16 +120,16 @@ Display the contents of the installed gems -### Usage - - gem contents GEMNAME [GEMNAME ...] [options] - ## gem dependency Show the dependencies of an installed gem +### Usage + + gem dependency GEMNAME [options] + ### Arguments @@ -134,16 +138,16 @@ Show the dependencies of an installed gem -### Usage - - gem dependency GEMNAME [options] - ## gem environment Display information about the RubyGems environment +### Usage + + gem environment [arg] [options] + ### Arguments @@ -158,10 +162,6 @@ Display information about the RubyGems environment -### Usage - - gem environment [arg] [options] - ### Description @@ -205,6 +205,10 @@ lib/rubygems/defaults/operating_system.rb Download a gem and place it in the current directory +### Usage + + gem fetch GEMNAME [GEMNAME ...] [options] + ### Arguments @@ -213,23 +217,19 @@ Download a gem and place it in the current directory -### Usage - - gem fetch GEMNAME [GEMNAME ...] [options] - ## gem generate_index Generates the index files for a gem server directory - - ### Usage gem generate_index [options] + + ### Description The generate_index command creates a set of indexes for serving gems @@ -267,6 +267,10 @@ index.rss containing gems released in the last two days. Provide help on the 'gem' command +### Usage + + gem help ARGUMENT [options] + ### Arguments @@ -277,16 +281,16 @@ Provide help on the 'gem' command -### Usage - - gem help ARGUMENT [options] - ## gem install Install a gem into the local repository +### Usage + + gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options] + ### Arguments @@ -295,10 +299,6 @@ Install a gem into the local repository -### Usage - - gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options] - ### Description @@ -357,6 +357,10 @@ to write the specification by hand. For example: Display gems whose name starts with STRING +### Usage + + gem list [STRING] [options] + ### Arguments @@ -365,16 +369,16 @@ Display gems whose name starts with STRING -### Usage - - gem list [STRING] [options] - ## gem lock Generate a lockdown list of gems +### Usage + + gem lock GEMNAME-VERSION [GEMNAME-VERSION ...] [options] + ### Arguments @@ -384,10 +388,6 @@ Generate a lockdown list of gems -### Usage - - gem lock GEMNAME-VERSION [GEMNAME-VERSION ...] [options] - ### Description @@ -426,18 +426,22 @@ lock it down to the exact version. Display all gems that need updates - - ### Usage gem outdated [options] + + ## gem owner Manage gem owners on RubyGems.org. +### Usage + + gem owner [options] + ### Arguments @@ -446,10 +450,6 @@ Manage gem owners on RubyGems.org. -### Usage - - gem owner [options] - ### Description @@ -460,6 +460,10 @@ Manage gem owners on RubyGems.org. Restores installed gems to pristine condition from files located in the gem cache +### Usage + + gem pristine [args] [options] + ### Arguments @@ -468,10 +472,6 @@ Restores installed gems to pristine condition from files located in the gem cach -### Usage - - gem pristine [args] [options] - ### Description @@ -494,6 +494,10 @@ extensions. Push a gem up to RubyGems.org +### Usage + + gem push GEM [options] + ### Arguments @@ -502,10 +506,6 @@ Push a gem up to RubyGems.org -### Usage - - gem push GEM [options] - ### Description @@ -516,18 +516,22 @@ Push a gem up to RubyGems.org Query gem information in local or remote repositories - - ### Usage gem query [options] + + ## gem rdoc Generates RDoc for pre-installed gems +### Usage + + gem rdoc [args] [options] + ### Arguments @@ -536,10 +540,6 @@ Generates RDoc for pre-installed gems -### Usage - - gem rdoc [args] [options] - ### Description @@ -552,6 +552,10 @@ The rdoc command builds RDoc and RI documentation for installed gems. Use Display all gems whose name contains STRING +### Usage + + gem search [STRING] [options] + ### Arguments @@ -560,23 +564,19 @@ Display all gems whose name contains STRING -### Usage - - gem search [STRING] [options] - ## gem server Documentation and gem repository HTTP server - - ### Usage gem server [options] + + ### Description The server command starts up a web server that hosts the RDoc for your @@ -601,18 +601,22 @@ You can set up a shortcut to gem server documentation using the URL: Manage the sources and cache file RubyGems uses to search for gems - - ### Usage gem sources [options] + + ## gem specification Display gem specification (in yaml) +### Usage + + gem specification [GEMFILE] [FIELD] [options] + ### Arguments @@ -622,28 +626,28 @@ Display gem specification (in yaml) -### Usage - - gem specification [GEMFILE] [FIELD] [options] - ## gem stale List gems along with access times - - ### Usage gem stale [options] + + ## gem uninstall Uninstall gems from the local repository +### Usage + + gem uninstall GEMNAME [GEMNAME ...] [options] + ### Arguments @@ -652,16 +656,16 @@ Uninstall gems from the local repository -### Usage - - gem uninstall GEMNAME [GEMNAME ...] [options] - ## gem unpack Unpack an installed gem to the current directory +### Usage + + gem unpack GEMNAME [options] + ### Arguments @@ -670,16 +674,16 @@ Unpack an installed gem to the current directory -### Usage - - gem unpack GEMNAME [options] - ## gem update Update the named gems (or all installed gems) in the local repository +### Usage + + gem update GEMNAME [GEMNAME ...] [options] + ### Arguments @@ -688,16 +692,16 @@ Update the named gems (or all installed gems) in the local repository -### Usage - - gem update GEMNAME [GEMNAME ...] [options] - ## gem which Find the location of a library file you can require +### Usage + + gem which FILE [FILE ...] [options] + ### Arguments @@ -706,9 +710,5 @@ Find the location of a library file you can require -### Usage - - gem which FILE [FILE ...] [options] -