allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [7/8] allura git commit: [#8117] Docs improvements
Date Tue, 30 Aug 2016 14:18:33 GMT
[#8117] Docs improvements


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

Branch: refs/heads/db/8117
Commit: 85bf65821267013d05a08cfdb985437d1c8c09e1
Parents: 91b735f
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Aug 29 14:59:23 2016 -0400
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Mon Aug 29 17:22:21 2016 -0400

----------------------------------------------------------------------
 Allura/allura/lib/decorators.py       | 18 +++++++++---------
 Allura/allura/lib/helpers.py          |  2 +-
 Allura/allura/lib/multifactor.py      |  5 ++++-
 Allura/docs/api/lib/decorators.rst    | 24 ++++++++++++++++++++++++
 Allura/docs/api/lib/helpers.rst       | 24 ++++++++++++++++++++++++
 Allura/docs/api/lib/multifactor.rst   | 24 ++++++++++++++++++++++++
 Allura/docs/api/lib/phone.rst         | 24 ++++++++++++++++++++++++
 Allura/docs/development/extending.rst |  2 ++
 8 files changed, 112 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/allura/lib/decorators.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/decorators.py b/Allura/allura/lib/decorators.py
index dc4e1c3..7c311dc 100644
--- a/Allura/allura/lib/decorators.py
+++ b/Allura/allura/lib/decorators.py
@@ -43,20 +43,20 @@ log = logging.getLogger(__name__)
 def task(*args, **kw):
     """Decorator that adds a ``.post()`` function to the decorated callable.
 
-    Calling <original_callable>.post(*args, **kw) queues the callable for
+    Calling ``<original_callable>.post(*args, **kw)`` queues the callable for
     execution by a background worker process. All parameters must be
     BSON-serializable.
 
-    Example usage:
+    Example usage::
 
-    @task
-    def myfunc():
-        pass
+        @task
+        def myfunc():
+            pass
 
-    @task(notifications_disabled=True)
-    def myotherfunc():
-        # No email notifications will be sent for c.project during this task
-        pass
+        @task(notifications_disabled=True)
+        def myotherfunc():
+            # No email notifications will be sent for c.project during this task
+            pass
 
     """
     def task_(func):

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/allura/lib/helpers.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 890deb6..5148f17 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -1179,7 +1179,7 @@ def login_overlay(exceptions=None):
     the `_check_security()` method on a controller).  The `exceptions` param
     can be given a list of exposed views to leave with the original behavior.
 
-    For example:
+    For example::
 
         class MyController(BaseController);
             def _check_security(self):

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/allura/lib/multifactor.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/multifactor.py b/Allura/allura/lib/multifactor.py
index fadc0d4..429ea35 100644
--- a/Allura/allura/lib/multifactor.py
+++ b/Allura/allura/lib/multifactor.py
@@ -120,6 +120,9 @@ class TotpService(object):
 
 
 class MongodbTotpService(TotpService):
+    '''
+    Store in TOTP keys in mongodb.
+    '''
 
     def get_secret_key(self, user):
         from allura import model as M
@@ -140,7 +143,7 @@ class MongodbTotpService(TotpService):
 
 class GoogleAuthenticatorFile(object):
     '''
-    Server-side .google_authenticator file for PAM
+    Parse & write server-side .google_authenticator files for PAM.
     https://github.com/google/google-authenticator/blob/master/libpam/FILEFORMAT
     '''
 

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/docs/api/lib/decorators.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/api/lib/decorators.rst b/Allura/docs/api/lib/decorators.rst
new file mode 100644
index 0000000..142dd16
--- /dev/null
+++ b/Allura/docs/api/lib/decorators.rst
@@ -0,0 +1,24 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+.. _decorators_module:
+
+:mod:`allura.lib.decorators`
+-------------------------------------
+
+.. automodule:: allura.lib.decorators
+    :members:

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/docs/api/lib/helpers.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/api/lib/helpers.rst b/Allura/docs/api/lib/helpers.rst
new file mode 100644
index 0000000..95dbc3a
--- /dev/null
+++ b/Allura/docs/api/lib/helpers.rst
@@ -0,0 +1,24 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+.. _helpers_module:
+
+:mod:`allura.lib.helpers`
+-------------------------------------
+
+.. automodule:: allura.lib.helpers
+    :members:

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/docs/api/lib/multifactor.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/api/lib/multifactor.rst b/Allura/docs/api/lib/multifactor.rst
new file mode 100644
index 0000000..e33b91b
--- /dev/null
+++ b/Allura/docs/api/lib/multifactor.rst
@@ -0,0 +1,24 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+.. _multifactor_module:
+
+:mod:`allura.lib.multifactor`
+-------------------------------------
+
+.. automodule:: allura.lib.multifactor
+    :members:

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/docs/api/lib/phone.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/api/lib/phone.rst b/Allura/docs/api/lib/phone.rst
new file mode 100644
index 0000000..f39d17b
--- /dev/null
+++ b/Allura/docs/api/lib/phone.rst
@@ -0,0 +1,24 @@
+..     Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+
+.. _phone_module:
+
+:mod:`allura.lib.phone`
+-------------------------------------
+
+.. automodule:: allura.lib.phone
+    :members:

http://git-wip-us.apache.org/repos/asf/allura/blob/85bf6582/Allura/docs/development/extending.rst
----------------------------------------------------------------------
diff --git a/Allura/docs/development/extending.rst b/Allura/docs/development/extending.rst
index 3132838..2ee51e0 100644
--- a/Allura/docs/development/extending.rst
+++ b/Allura/docs/development/extending.rst
@@ -33,10 +33,12 @@ The available extension points for Allura are:
 * :class:`allura.lib.plugin.ThemeProvider`
 * :class:`allura.lib.plugin.ProjectRegistrationProvider`
 * :class:`allura.lib.plugin.AuthenticationProvider`
+* :class:`allura.lib.multifactor.TotpService`
 * :class:`allura.lib.plugin.UserPreferencesProvider`
 * :class:`allura.lib.plugin.AdminExtension`
 * :class:`allura.lib.plugin.SiteAdminExtension`
 * :class:`allura.lib.spam.SpamFilter`
+* :class:`allura.lib.phone.PhoneService`
 * ``site_stats`` in the root API data.  Docs in :class:`allura.controllers.rest.RestController`
 * :mod:`allura.lib.package_path_loader` (for overriding templates)
 * ``[allura.timers]`` functions which return a list or single :class:`timermiddleware.Timer`
which will be included in stats.log timings


Mime
View raw message