You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/02/27 01:35:48 UTC
[1/3] git commit: [#7214] make admin landing page not error when tool
not present
Repository: incubator-allura
Updated Branches:
refs/heads/master 4d4e1d806 -> 6143e75da
[#7214] make admin landing page not error when tool not present
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6143e75d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6143e75d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6143e75d
Branch: refs/heads/master
Commit: 6143e75dae7eee1e724c9e497c3ce1ec954ad9c2
Parents: 95a99c6
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Feb 24 23:17:44 2014 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 27 00:34:58 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/plugin.py | 4 +++-
Allura/allura/tests/test_plugin.py | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6143e75d/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 084501f..7773bf0 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -909,8 +909,10 @@ class ThemeProvider(object):
if isinstance(app, str):
if app in self.icons and size in self.icons[app]:
return g.theme_href(self.icons[app][size])
- else:
+ elif app in g.entry_points['tool']:
return g.entry_points['tool'][app].icon_url(size)
+ else:
+ return None
else:
return app.icon_url(size)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6143e75d/Allura/allura/tests/test_plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_plugin.py b/Allura/allura/tests/test_plugin.py
index 24a163a..d6f76d5 100644
--- a/Allura/allura/tests/test_plugin.py
+++ b/Allura/allura/tests/test_plugin.py
@@ -20,6 +20,7 @@ from mock import Mock, MagicMock, patch
from datetime import timedelta
from allura import model as M
+from allura.app import Application
from allura.lib.utils import TruthyCallable
from allura.lib.plugin import ProjectRegistrationProvider
from allura.lib.plugin import ThemeProvider
@@ -153,3 +154,33 @@ class TestThemeProvider(object):
assert_is(ThemeProvider().get_site_notification(), note)
response.set_cookie.assert_called_once_with(
'site-notification', 'deadbeef-1-False', max_age=timedelta(days=365))
+
+ @patch('allura.app.g')
+ @patch('allura.lib.plugin.g')
+ def test_app_icon_str(self, plugin_g, app_g):
+ class TestApp(Application):
+ icons = {
+ 24: 'images/testapp_24.png',
+ }
+ plugin_g.entry_points = {'tool': {'testapp': TestApp}}
+ assert_equals(ThemeProvider().app_icon_url('testapp', 24),
+ app_g.theme_href.return_value)
+ app_g.theme_href.assert_called_with('images/testapp_24.png')
+
+ @patch('allura.lib.plugin.g')
+ def test_app_icon_str_invalid(self, g):
+ g.entry_points = {'tool': {'testapp': Mock()}}
+ assert_equals(ThemeProvider().app_icon_url('invalid', 24),
+ None)
+
+ @patch('allura.app.g')
+ def test_app_icon_app(self, g):
+ class TestApp(Application):
+ icons = {
+ 24: 'images/testapp_24.png',
+ }
+ app = TestApp(None, None)
+ assert_equals(ThemeProvider().app_icon_url(app, 24),
+ g.theme_href.return_value)
+ g.theme_href.assert_called_with('images/testapp_24.png')
+
[3/3] git commit: [#7214] remove pytidylib dep (was removed from code
in 692eb02
Posted by jo...@apache.org.
[#7214] remove pytidylib dep (was removed from code in 692eb02
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8dceeb34
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8dceeb34
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8dceeb34
Branch: refs/heads/master
Commit: 8dceeb3494f13bed8c95ed10dfa9cdc946337514
Parents: 4d4e1d8
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Feb 24 15:46:02 2014 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 27 00:34:58 2014 +0000
----------------------------------------------------------------------
requirements-common.txt | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8dceeb34/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 3b8e47a..82be773 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -36,7 +36,6 @@ pysolr==2.1.0-beta
python-dateutil==1.5
python-magic==0.4.3
python-oembed==0.2.1
-pytidylib==0.2.1
requests==2.0.0
oauthlib==0.4.2
requests-oauthlib==0.4.0
[2/3] git commit: [#7214] Emphasize installing all tools rather than
one at a time
Posted by jo...@apache.org.
[#7214] Emphasize installing all tools rather than one at a time
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/95a99c6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/95a99c6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/95a99c6b
Branch: refs/heads/master
Commit: 95a99c6b8b7af79fc2470328b65dd7b2676a4ca8
Parents: 8dceeb3
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Feb 24 15:46:32 2014 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 27 00:34:58 2014 +0000
----------------------------------------------------------------------
INSTALL.markdown | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/95a99c6b/INSTALL.markdown
----------------------------------------------------------------------
diff --git a/INSTALL.markdown b/INSTALL.markdown
index cce192e..da90e4e 100644
--- a/INSTALL.markdown
+++ b/INSTALL.markdown
@@ -87,8 +87,7 @@ Optional, for SVN support: symlink the system pysvn package into our virtual env
(env-allura)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/env-allura/lib/python2.7/site-packages/
-And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
-If you only want to use a few tools, run:
+Next, run `./rebuild-all.bash` to setup all the Allura applications. If you only want to use a few tools, run:
cd Allura
python setup.py develop