You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by no...@apache.org on 2014/08/11 19:42:25 UTC

[1/2] git commit: docs: Turn on Docutils setting to autolink RFC references

Repository: trafficserver
Updated Branches:
  refs/heads/master e978ff1e4 -> 8ec35f2c7


docs: Turn on Docutils setting to autolink RFC references


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fffef4bb
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fffef4bb
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fffef4bb

Branch: refs/heads/master
Commit: fffef4bbf47fe5e63833f148c6093b05b56ff715
Parents: e978ff1
Author: Jack Bates <ja...@nottheoilrig.com>
Authored: Mon Aug 11 10:32:56 2014 -0700
Committer: Jack Bates <ja...@nottheoilrig.com>
Committed: Mon Aug 11 10:32:56 2014 -0700

----------------------------------------------------------------------
 doc/docutils.conf                                       | 2 ++
 doc/reference/configuration/ssl_multicert.config.en.rst | 2 +-
 doc/reference/plugins/metalink.en.rst                   | 8 ++++----
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fffef4bb/doc/docutils.conf
----------------------------------------------------------------------
diff --git a/doc/docutils.conf b/doc/docutils.conf
new file mode 100644
index 0000000..d35769c
--- /dev/null
+++ b/doc/docutils.conf
@@ -0,0 +1,2 @@
+[restructuredtext parser]
+rfc_references: on

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fffef4bb/doc/reference/configuration/ssl_multicert.config.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/configuration/ssl_multicert.config.en.rst b/doc/reference/configuration/ssl_multicert.config.en.rst
index 298899b..f044868 100644
--- a/doc/reference/configuration/ssl_multicert.config.en.rst
+++ b/doc/reference/configuration/ssl_multicert.config.en.rst
@@ -91,7 +91,7 @@ ssl_ca_name=FILENAME (optional)
   :ts:cv:`proxy.config.ssl.CA.cert.path` configuration variable.
 
 ssl_ticket_enabled=1|0 (optional)
-  Enable :rfc:`5077` stateless TLS session tickets. To support this,
+  Enable RFC 5077 stateless TLS session tickets. To support this,
   OpenSSL should be upgraded to version 0.9.8f or higher. This
   option must be set to `0` to disable session ticket support.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fffef4bb/doc/reference/plugins/metalink.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/plugins/metalink.en.rst b/doc/reference/plugins/metalink.en.rst
index 20a53fd..dc4a60a 100644
--- a/doc/reference/plugins/metalink.en.rst
+++ b/doc/reference/plugins/metalink.en.rst
@@ -27,9 +27,9 @@ improves cache efficiency and speeds up users' downloads.
 It takes standard headers and knowledge about objects in the cache and
 potentially rewrites those headers so that a client will use a URL
 that's already cached instead of one that isn't.  The headers are
-specified in :rfc:`6249` (Metalink/HTTP: Mirrors and Hashes) and
-:rfc:`3230` (Instance Digests in HTTP) and are sent by various
-download redirectors or content distribution networks.
+specified in RFC 6249 (Metalink/HTTP: Mirrors and Hashes) and RFC 3230
+(Instance Digests in HTTP) and are sent by various download
+redirectors or content distribution networks.
 
 A lot of download sites distribute the same files from many different
 mirrors and users don't know which mirrors are already cached.  These
@@ -107,7 +107,7 @@ headers.
 
 The :mailheader:`Digest: SHA-256=...` header is also more efficient
 than :mailheader:`Link: <...>; rel=duplicate` headers because it
-involves a constant number of cache lookups.  :rfc:`6249` requires a
+involves a constant number of cache lookups.  RFC 6249 requires a
 :mailheader:`Digest: SHA-256=...` header or :mailheader:`Link: <...>;
 rel=duplicate` headers MUST be ignored:
 


[2/2] git commit: docs: Autolink issue references

Posted by no...@apache.org.
docs: Autolink issue references


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8ec35f2c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8ec35f2c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8ec35f2c

Branch: refs/heads/master
Commit: 8ec35f2c7cbefef282fb342f975cb81da486ee60
Parents: fffef4b
Author: Jack Bates <ja...@nottheoilrig.com>
Authored: Mon Aug 11 10:39:48 2014 -0700
Committer: Jack Bates <ja...@nottheoilrig.com>
Committed: Mon Aug 11 10:39:48 2014 -0700

----------------------------------------------------------------------
 doc/arch/cache/cache-arch.en.rst            |  2 +-
 doc/conf.py                                 | 42 +++++++++++++++++++++++-
 doc/reference/api/TSLifecycleHookAdd.en.rst |  2 +-
 3 files changed, 43 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8ec35f2c/doc/arch/cache/cache-arch.en.rst
----------------------------------------------------------------------
diff --git a/doc/arch/cache/cache-arch.en.rst b/doc/arch/cache/cache-arch.en.rst
index 85384ef..78764d7 100644
--- a/doc/arch/cache/cache-arch.en.rst
+++ b/doc/arch/cache/cache-arch.en.rst
@@ -848,7 +848,7 @@ While this procedure is determinstic it is sensitive to initial conditions, incl
    are in the ram cache.
 
 .. [#] This linked list is mostly ignored in later processing, causing all but one file or directory storage units on
-   the same device to be ignored. See `TS-1869 <https://issues.apache.org/jira/browse/TS-1869>`_.
+   the same device to be ignored. See TS-1869.
 
 .. [#] It is unclear to me how that can happen, as the offsets are computed later and should all be zero at the time the
    spans are coalesced, and as far as I can tell the sort / coalesce is only done during initialization.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8ec35f2c/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 69d7454..13ee26f 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -140,6 +140,47 @@ pygments_style = 'sphinx'
 
 nitpicky=1
 
+# Autolink issue references
+
+import re
+from docutils import nodes
+from docutils.parsers.rst import states
+from docutils.utils import unescape
+
+# Customize parser.inliner in the only way that Sphinx supports.
+# docutils.parsers.rst.Parser takes an instance of states.Inliner or a
+# subclass but Sphinx initializes it from
+# SphinxStandaloneReader.set_parser('restructuredtext') which is called
+# from Publisher.set_components() and initializes the parser without
+# arguments.
+
+BaseInliner = states.Inliner
+class Inliner(BaseInliner):
+  def __init__(self):
+    BaseInliner.__init__(self)
+
+    issue_pattern = re.compile(u'''
+      {start_string_prefix}
+      TS-\d+
+      {end_string_suffix}'''.format(
+        start_string_prefix=self.start_string_prefix,
+        end_string_suffix=self.end_string_suffix),
+      re.VERBOSE | re.UNICODE)
+
+    self.implicit_dispatch.append((issue_pattern, self.issue_reference))
+
+  def issue_reference(self, match, lineno):
+    text = match.group(0)
+
+    rawsource = unescape(text, True)
+    text = unescape(text, False)
+
+    refuri = 'https://issues.apache.org/jira/browse/' + text
+
+    return [nodes.reference(rawsource, text, refuri=refuri)]
+
+states.Inliner = Inliner
+
 # -- Options for HTML output ---------------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
@@ -271,7 +312,6 @@ latex_documents = [
 # documents and includes the same brief description in both the HTML
 # and manual page outputs.
 
-from docutils import nodes
 from docutils.transforms import frontmatter
 from sphinx.writers import manpage
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8ec35f2c/doc/reference/api/TSLifecycleHookAdd.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSLifecycleHookAdd.en.rst b/doc/reference/api/TSLifecycleHookAdd.en.rst
index 672707c..3f58f5c 100644
--- a/doc/reference/api/TSLifecycleHookAdd.en.rst
+++ b/doc/reference/api/TSLifecycleHookAdd.en.rst
@@ -99,7 +99,7 @@ to be initialized and therefore does not work if called from :func:`TSPluginInit
 History
 =======
 
-Lifecycle hooks were introduced to solve process initialization ordering issues (`TS-1487 <https://issues.apache.org/jira/browse/TS-1487>`_). Different API calls required
+Lifecycle hooks were introduced to solve process initialization ordering issues (TS-1487). Different API calls required
 different modules of Traffic Server to be initialized for the call to work, but others did not work that late in initialization, which was problematic because all of them could effectively only be called from :func:`TSPluginInit` . The
 solution was to move :func:`TSPluginInit` as early as possible in the process initialization and provide hooks for API
 calls that needed to be invoked later which served essentially as additional pluging initialization points.