allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [02/14] allura git commit: [#7868] ticket:759 Add phone service configuration code and examples
Date Tue, 12 May 2015 12:05:23 GMT
[#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/d9d58caf
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d9d58caf
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d9d58caf

Branch: refs/heads/ib/7868
Commit: d9d58caf84a3dcc4df72bdae74d7b07b10b24113
Parents: 1bcf411
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon May 4 12:40:14 2015 +0000
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Mon May 4 13:04:34 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/d9d58caf/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/d9d58caf/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/d9d58caf/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


Mime
View raw message