From cc6e90181eb63f32757430bfcfa0a3dc4c91ac47 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Tue, 27 Aug 2013 11:26:00 -0700 Subject: [PATCH] Update gear docs to include gearman server daemon Use the sphinxcontrib-programoutput package to document command line interface for geard. Change-Id: Ibe53e9cd176e4cdacd1519c7f1da890002a67125 --- doc/source/conf.py | 2 +- doc/source/index.rst | 6 ++---- test-requirements.txt | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 9eac01e..7816277 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath('../..')) # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinxcontrib.programoutput'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/source/index.rst b/doc/source/index.rst index 9d181fc..5b62114 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -55,7 +55,7 @@ An example of a Gearman worker:: while True: job = worker.getJob() - job.sendWorkComplete(job.arguments.reverse()) + job.sendWorkComplete(job.arguments[::-1]) SSL Connections --------------- @@ -156,10 +156,8 @@ AdminRequest Objects Server Usage ------------ +.. program-output:: geard --help -A simple Gearman server is provided for convenience in unit testing, -but is not designed for production use at scale. It takes no -parameters other than the port number on which to listen. Server Objects ^^^^^^^^^^^^^^ diff --git a/test-requirements.txt b/test-requirements.txt index 6b80556..4dab357 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,3 +8,4 @@ testrepository>=0.0.13 testresources testscenarios testtools>=0.9.27 +sphinxcontrib-programoutput