You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/05/27 13:57:59 UTC

[27/50] [abbrv] allura git commit: [#7868] ticket:759 Add phone service configuration code and examples

[#7868] ticket:759 Add phone service configuration code and examples


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

Branch: refs/heads/ib/7868
Commit: 5c6d79d3400dd897ce2d6b722a20a741a2ebbf2b
Parents: 33d9106
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon May 4 12:40:14 2015 +0000
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon May 25 15:53:39 2015 +0000

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py | 7 +++++++
 Allura/development.ini           | 5 +++++
 Allura/setup.py                  | 3 +++
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/5c6d79d3/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index e9879de..05fc254 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -284,6 +284,7 @@ class Globals(object):
             theme=_cache_eps('allura.theme'),
             user_prefs=_cache_eps('allura.user_prefs'),
             spam=_cache_eps('allura.spam'),
+            phone=_cache_eps('allura.phone'),
             stats=_cache_eps('allura.stats'),
             site_stats=_cache_eps('allura.site_stats'),
             admin=_cache_eps('allura.admin'),
@@ -317,6 +318,12 @@ class Globals(object):
         return spam.SpamFilter.get(config, self.entry_points['spam'])
 
     @LazyProperty
+    def phone_service(self):
+        """Return a :class:`allura.lib.phone.PhoneService` implementation"""
+        from allura.lib import phone
+        return phone.PhoneService.get(config, self.entry_points['phone'])
+
+    @LazyProperty
     def director(self):
         """Return activitystream director"""
         if asbool(config.get('activitystream.recording.enabled', False)):

http://git-wip-us.apache.org/repos/asf/allura/blob/5c6d79d3/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 5d68aed..08a4828 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -193,6 +193,11 @@ site_admin_project_nbhd = Projects
 ;spam.public_key =
 ;spam.private_key =
 
+; Phone verification service: Nexmo Verify
+; phone.method = nexmo
+; phone.api_key =
+; phone.api_secret =
+
 ; Webhook timeout in seconds
 webhook.timeout = 30
 ; List of pauses between retries, if hook fails (in seconds)

http://git-wip-us.apache.org/repos/asf/allura/blob/5c6d79d3/Allura/setup.py
----------------------------------------------------------------------
diff --git a/Allura/setup.py b/Allura/setup.py
index 05cbf0b..a9607f8 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -123,6 +123,9 @@ setup(
     akismet = allura.lib.spam.akismetfilter:AkismetSpamFilter
     mollom = allura.lib.spam.mollomfilter:MollomSpamFilter
 
+    [allura.phone]
+    nexmo = allura.lib.phone.nexmo:NexmoPhoneService
+
     [allura.site_admin]
     stats = allura.controllers.site_admin:StatsSiteAdminExtension
     troves = allura.controllers.trovecategories:TroveCategorySiteAdminExtension