Commits

SHIBUKAWA Yoshiki  committed b0ae37e

* [rubydomain]: fix minor bug about module function/method
* [rubydomain]: add README contents
* [rubydomain]: published sphinxcontrib-rubydomain to PyPI

  • Participants
  • Parent commits 3601005

Comments (0)

Files changed (8)

 paverutils:
    Doug Hellmann <doug.hellmann@gmail.com>
 
+rubydomain:
+   SHIBUKAWA Yoshiki <yoshiki@shibu.jp>
+
 sword:
    Wei-Wei Guo <wwguocn@gmail.com>
 
 
 cheeseshop:
    Richard Jones <r1chardj0n3s@gmail.com>
-   Georg Brandl <georg@python.org>
+   Georg Brandl <georg@python.org>

File rubydomain/CHANGES

 
 This file describes user-visible changes between the extension versions.
 
-Version 0.1 (2010-04-24)
+Version 0.1 (2010-08-04)
 ------------------------
 
 * Initial version.

File rubydomain/README

 Ruby Domain
 ===========
 
+:author: SHIBUKAWA Yoshiki <yoshiki at shibu.jp>
+
+About
+=====
+
 This is the Ruby domain for Sphinx 1.0.
 Sphinx 1.0 will deliver new feature -- Domain.
 It will enable other language support except Python and C language.
 
 This extension provides directives and roles to write Ruby documents.
+
 Ruby Domain supports following objects:
 
 * Global Variable
 
    Take care separator charactors!
 
+URLs
+====
+
+:PyPI: http://pypi.python.org/pypi/sphinxcontrib-rubydomain
+:Detail Document: http://packages.python.org/sphinxcontrib-rubydomain
+
+Quick Sample
+============
+
+.. note::
+   These contents is copied from http://ruby-doc.org/stdlib/libdoc/drb/rdoc/classes/DRb/DRbObject.html
+
+This is source::
+
+  .. rb:module:: DRb
+
+  .. rb:class:: DRbObject
+
+     Object wrapping a reference to a remote drb object.
+
+     Method calls on this object are relayed to the remote object that this object is a stub for.
+
+     .. rb:classmethod:: new(obj[, uri=nil])
+
+        Create a new remote object stub.
+
+        obj is the (local) object we want to create a stub for. Normally this is nil. 
+        uri is the URI of the remote object that this will be a stub for.
+
+     .. rb:classmethod:: new_with_uri(uri)
+
+        Create a new DRbObject from a URI alone.
+
+     .. rb:method:: method_missing(msg_id, *a, &b)
+
+        Routes method calls to the referenced object.
+
+Result:
+
+-----------------
+
+.. rb:module:: DRb
+
+.. rb:class:: DRbObject
+
+    Object wrapping a reference to a remote drb object.
+
+    Method calls on this object are relayed to the remote object that this object is a stub for.
+
+    .. rb:classmethod:: new(obj[, uri=nil])
+
+       Create a new remote object stub.
+
+       obj is the (local) object we want to create a stub for. Normally this is nil. 
+       uri is the URI of the remote object that this will be a stub for.
+
+    .. rb:classmethod:: new_with_uri(uri)
+
+       Create a new DRbObject from a URI alone.
+
+    .. rb:method:: method_missing(msg_id, *a, &b)
+
+       Routes method calls to the referenced object.
+
+------------------
+
+From other place, you can create cross reference like that::
+
+   If you want to connect other node, use :rb:meth:`DRb::DRbObject.new_with_uri` and get front object.
+
+Result:
+
+-----------
+
+If you want to connect other node, use :rb:meth:`DRb::DRbObject.new_with_uri` and get front object.
+
+-----------
+
+Install
+=======
+
+.. code-block::
+
+   easy_install -U sphinxcontrib-rubydomain
+

File rubydomain/doc/conf.py

 # -- General configuration -----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinxcontrib.rubydomain']
+extensions = ['sphinxcontrib.rubydomain',
+              'sphinx.ext.intersphinx']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 # A list of ignored prefixes for module index sorting.
 #modindex_common_prefix = []
 
+intersphinx_mapping = {
+    'sphinx': ('http://sphinx.pocoo.org', None)
+}
 
 # -- Options for HTML output ---------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
+html_theme = 'sphinxdoc'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the

File rubydomain/doc/index.rst

    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to sphinxcontrib-rubydomain's documentation!
-====================================================
+.. include:: ../README
 
 Contents:
 
    reference
    sample_doc
 
-Indices and tables
-==================
-
 * :ref:`genindex`
-* :ref:`modindex`
 * :ref:`search`
 
 ChangeLog

File rubydomain/doc/reference.rst

 
 .. highlight:: rst
 
-The Ruby Domain
------------------
-
 The Ruby domain (name **rb**) provides the following directives for module
 declarations. Almost all directives are similar to Python's.
 

File rubydomain/setup.py

 
 This extension adds Ruby Domain to Sphinx.
 It needs Sphinx 1.0 or newer.
+
+Detail document: http://packages.python.org/sphinxcontrib-rubydomain/
 '''
 
 requires = ['Sphinx>=1.0']
         'License :: OSI Approved :: BSD License',
         'Operating System :: OS Independent',
         'Programming Language :: Python',
+        'Programming Language :: Ruby',
         'Topic :: Documentation',
         'Topic :: Utilities',
     ],

File rubydomain/sphinxcontrib/rubydomain.py

         newname = None
         if searchorder == 1:
             if modname and classname and \
-                   modname + '::' + classname + '#' + name in objects:
+                     modname + '::' + classname + '#' + name in objects:
                 newname = modname + '::' + classname + '#' + name
             elif modname and classname and \
-                   modname + '::' + classname + '.' + name in objects:
+                     modname + '::' + classname + '.' + name in objects:
                 newname = modname + '::' + classname + '.' + name
             elif modname and modname + '::' + name in objects:
                 newname = modname + '::' + name
+            elif modname and modname + '#' + name in objects:
+                newname = modname + '#' + name
+            elif modname and modname + '.' + name in objects:
+                newname = modname + '.' + name
+            elif classname and classname + '.' + name in objects:
+                newname = classname + '.' + name
+            elif classname and classname + '#' + name in objects:
+                newname = classname + '#' + name
             elif name in objects:
                 newname = name
         else:
                 newname = classname + '#' + name
             elif modname and modname + '::' + name in objects:
                 newname = modname + '::' + name
+            elif modname and modname + '#' + name in objects:
+                newname = modname + '#' + name
+            elif modname and modname + '.' + name in objects:
+                newname = modname + '.' + name
             elif modname and classname and \
                      modname + '::' + classname + '#' + name in objects:
                 newname = modname + '::' + classname + '#' + name