You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/06/02 22:07:01 UTC
[10/39] 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/3b554d01
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/3b554d01
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/3b554d01
Branch: refs/heads/hs/7825
Commit: 3b554d01eca593e4dca311ba061da58d136c059e
Parents: cd74d92
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon May 4 12:40:14 2015 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu May 28 20:11:44 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/3b554d01/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/3b554d01/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/3b554d01/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