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 17:18:18 UTC
[01/16] git commit: [#7128] move drawGraph() function up so that
get_data() can reference it (broke FF in c32547b)
Repository: incubator-allura
Updated Branches:
refs/heads/cj/7210 0ec702191 -> 2d342645e (forced update)
[#7128] move drawGraph() function up so that get_data() can reference it (broke FF in c32547b)
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/17eba62c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/17eba62c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/17eba62c
Branch: refs/heads/cj/7210
Commit: 17eba62c69745d324f16e434c7234e16fcea717f
Parents: ab5f24b
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Feb 24 21:41:39 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Feb 24 21:41:39 2014 +0000
----------------------------------------------------------------------
.../lib/widgets/resources/js/commit_browser.js | 122 +++++++++----------
1 file changed, 61 insertions(+), 61 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/17eba62c/Allura/allura/lib/widgets/resources/js/commit_browser.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/commit_browser.js b/Allura/allura/lib/widgets/resources/js/commit_browser.js
index 545ac18..b016b87 100644
--- a/Allura/allura/lib/widgets/resources/js/commit_browser.js
+++ b/Allura/allura/lib/widgets/resources/js/commit_browser.js
@@ -100,6 +100,67 @@ if($('#commit_graph')){
$scroll_placeholder.height(graph_height);
}
+ function drawGraph(offset) {
+ // Clear the canvas and set the contetx
+ var canvas_ctx = canvas.getContext('2d');
+ highlighter_ctx.clearRect(0, 0, canvas.width, canvas.height);
+ canvas_ctx.clearRect(0, 0, canvas.width, canvas.height);
+ canvas_ctx.fillStyle = "rgb(0,0,0)";
+ canvas_ctx.lineWidth = 1;
+ canvas_ctx.lineJoin = 'round';
+ canvas_ctx.textBaseline = "top";
+ canvas_ctx.font = "12px sans-serif";
+
+ for(var c in tree){
+ var commit = tree[c];
+ var x_pos = x_space+(commit.column*x_space);
+ var y_pos = y_space+((commit.row-offset)*y_space);
+
+ for(var i=0,len=commit.parents.length;i<len;i++){
+ var parent = tree[commit.parents[i]];
+ if (!parent) {
+ continue;
+ }
+ var parent_x = x_space+parent.column*x_space
+ var parent_y = y_space+(parent.row-offset)*y_space;
+
+ canvas_ctx.strokeStyle = color(parent.column % 6);
+
+ // Vertical
+ canvas_ctx.beginPath();
+ canvas_ctx.moveTo(parent_x+point_offset, y_pos+y_space);
+ canvas_ctx.lineTo(parent_x+point_offset, parent_y+point_offset);
+ canvas_ctx.stroke();
+
+ // Diagonal
+ canvas_ctx.beginPath()
+ canvas_ctx.moveTo(x_pos + point_offset, y_pos+point_offset);
+ canvas_ctx.lineTo(parent_x+point_offset, y_pos+y_space);
+ canvas_ctx.stroke();
+ }
+ }
+ // draw commit points and message text
+ canvas_ctx.fillStyle = "rgb(0,0,0)";
+ for(var c in tree){
+ var commit = tree[c];
+ var x_pos = x_space+(commit.column*x_space);
+ var y_pos = y_space+((commit.row-offset)*y_space);
+
+ canvas_ctx.strokeStyle = canvas_ctx.fillStyle = color(commit.column % 6);
+ canvas_ctx.beginPath();
+ canvas_ctx.arc(x_pos + point_offset, y_pos + point_offset, point_offset, 0, 2 * Math.PI, false);
+ canvas_ctx.fill();
+ canvas_ctx.stroke();
+ canvas_ctx.fillStyle = "#000";
+ canvas_ctx.fillText(commit.short_id + " " + commit.message, (2+next_column) * x_space, y_pos);
+ }
+ if (data['next_commit']) {
+ var y_pos = y_space+((next_row-offset)*y_space);
+ canvas_ctx.fillStyle = 'rgb(0,0,256)';
+ canvas_ctx.fillText(pending ? 'Loading...' : 'Show more', (2+next_column) * x_space, y_pos);
+ }
+ }
+
var pending = false;
function get_data(select_first) {
if (pending) {
@@ -186,67 +247,6 @@ if($('#commit_graph')){
}
}
- function drawGraph(offset) {
- // Clear the canvas and set the contetx
- var canvas_ctx = canvas.getContext('2d');
- highlighter_ctx.clearRect(0, 0, canvas.width, canvas.height);
- canvas_ctx.clearRect(0, 0, canvas.width, canvas.height);
- canvas_ctx.fillStyle = "rgb(0,0,0)";
- canvas_ctx.lineWidth = 1;
- canvas_ctx.lineJoin = 'round';
- canvas_ctx.textBaseline = "top";
- canvas_ctx.font = "12px sans-serif";
-
- for(var c in tree){
- var commit = tree[c];
- var x_pos = x_space+(commit.column*x_space);
- var y_pos = y_space+((commit.row-offset)*y_space);
-
- for(var i=0,len=commit.parents.length;i<len;i++){
- var parent = tree[commit.parents[i]];
- if (!parent) {
- continue;
- }
- var parent_x = x_space+parent.column*x_space
- var parent_y = y_space+(parent.row-offset)*y_space;
-
- canvas_ctx.strokeStyle = color(parent.column % 6);
-
- // Vertical
- canvas_ctx.beginPath();
- canvas_ctx.moveTo(parent_x+point_offset, y_pos+y_space);
- canvas_ctx.lineTo(parent_x+point_offset, parent_y+point_offset);
- canvas_ctx.stroke();
-
- // Diagonal
- canvas_ctx.beginPath()
- canvas_ctx.moveTo(x_pos + point_offset, y_pos+point_offset);
- canvas_ctx.lineTo(parent_x+point_offset, y_pos+y_space);
- canvas_ctx.stroke();
- }
- }
- // draw commit points and message text
- canvas_ctx.fillStyle = "rgb(0,0,0)";
- for(var c in tree){
- var commit = tree[c];
- var x_pos = x_space+(commit.column*x_space);
- var y_pos = y_space+((commit.row-offset)*y_space);
-
- canvas_ctx.strokeStyle = canvas_ctx.fillStyle = color(commit.column % 6);
- canvas_ctx.beginPath();
- canvas_ctx.arc(x_pos + point_offset, y_pos + point_offset, point_offset, 0, 2 * Math.PI, false);
- canvas_ctx.fill();
- canvas_ctx.stroke();
- canvas_ctx.fillStyle = "#000";
- canvas_ctx.fillText(commit.short_id + " " + commit.message, (2+next_column) * x_space, y_pos);
- }
- if (data['next_commit']) {
- var y_pos = y_space+((next_row-offset)*y_space);
- canvas_ctx.fillStyle = 'rgb(0,0,256)';
- canvas_ctx.fillText(pending ? 'Loading...' : 'Show more', (2+next_column) * x_space, y_pos);
- }
- }
-
function setOffset(x) {
offset = Math.round(x);
if (offset < 1)
[16/16] git commit: [#7205] Clean up timeline on user profile page
Posted by jo...@apache.org.
[#7205] Clean up timeline on user profile page
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2d342645
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2d342645
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2d342645
Branch: refs/heads/cj/7210
Commit: 2d342645e6783d3ef6a00c70ae42764f804a0a35
Parents: 3422d68
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Wed Feb 26 05:17:08 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Feb 27 16:03:42 2014 +0000
----------------------------------------------------------------------
Allura/allura/model/timeline.py | 36 ++++++++++++--------
ForgeActivity/forgeactivity/main.py | 15 +++++++-
.../templates/widgets/profile_section.html | 3 +-
3 files changed, 38 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2d342645/Allura/allura/model/timeline.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/timeline.py b/Allura/allura/model/timeline.py
index 7530221..e9d9d99 100644
--- a/Allura/allura/model/timeline.py
+++ b/Allura/allura/model/timeline.py
@@ -115,24 +115,32 @@ class TransientActor(NodeBase, ActivityObjectBase):
self.activity_name = activity_name
+def get_activity_object(activity_object_dict):
+ """Given a BSON-serialized activity object (e.g. activity.obj dict in a
+ timeline), return the corresponding :class:`ActivityObject`.
+
+ """
+ extras_dict = activity_object_dict.activity_extras
+ if not extras_dict:
+ return None
+ allura_id = extras_dict.get('allura_id')
+ if not allura_id:
+ return None
+ classname, _id = allura_id.split(':', 1)
+ cls = Mapper.by_classname(classname).mapped_class
+ try:
+ _id = bson.ObjectId(_id)
+ except bson.errors.InvalidId:
+ pass
+ return cls.query.get(_id=_id)
+
+
def perm_check(user):
"""
Return a function that returns True if ``user`` has 'read' access to a given activity,
otherwise returns False.
"""
def _perm_check(activity):
- extras_dict = activity.obj.activity_extras
- if not extras_dict:
- return True
- allura_id = extras_dict.get('allura_id')
- if not allura_id:
- return True
- classname, _id = allura_id.split(':', 1)
- cls = Mapper.by_classname(classname).mapped_class
- try:
- _id = bson.ObjectId(_id)
- except bson.errors.InvalidId:
- pass
- obj = cls.query.get(_id=_id)
- return obj and obj.has_activity_access('read', user, activity)
+ obj = get_activity_object(activity.obj)
+ return obj is None or obj.has_activity_access('read', user, activity)
return _perm_check
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2d342645/ForgeActivity/forgeactivity/main.py
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/main.py b/ForgeActivity/forgeactivity/main.py
index ca6ceaf..6af2da8 100644
--- a/ForgeActivity/forgeactivity/main.py
+++ b/ForgeActivity/forgeactivity/main.py
@@ -19,6 +19,7 @@ import logging
import calendar
from itertools import islice, ifilter
+from ming.orm import session
from pylons import tmpl_context as c, app_globals as g
from pylons import request, response
from tg import expose, validate, config
@@ -32,7 +33,7 @@ from allura import version
from allura import model as M
from allura.controllers import BaseController
from allura.lib.security import require_authenticated, require_access
-from allura.model.timeline import perm_check
+from allura.model.timeline import perm_check, get_activity_object
from allura.lib import helpers as h
from allura.lib.decorators import require_post
from allura.lib.widgets.form_fields import PageList
@@ -254,6 +255,18 @@ class ForgeActivityProfileSection(ProfileSectionBase):
)
filtered_timeline = list(islice(ifilter(perm_check(c.user), full_timeline),
0, 8))
+ for activity in filtered_timeline:
+ # Get the project for the activity.obj so we can use it in the
+ # template. Expunge first so Ming doesn't try to flush the attr
+ # we create to temporarily store the project.
+ #
+ # The get_activity_object() calls are cheap, pulling from
+ # the session identity map instead of mongo since identical
+ # calls are made by perm_check() above.
+ session(activity).expunge(activity)
+ activity_obj = get_activity_object(activity.obj)
+ activity.obj.project = activity_obj.project if activity_obj else None
+
context.update({
'follow_toggle': W.follow_toggle,
'following': g.director.is_connected(c.user, self.user),
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2d342645/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
----------------------------------------------------------------------
diff --git a/ForgeActivity/forgeactivity/templates/widgets/profile_section.html b/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
index 28ba645..8d09ef3 100644
--- a/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
+++ b/ForgeActivity/forgeactivity/templates/widgets/profile_section.html
@@ -41,8 +41,9 @@
{% for a in timeline %}
<li>
<b>
- {{am.icon(a.actor, 16, 'avatar')}}{{am.activity_obj(a.actor)}} {{a.verb}} {{am.activity_obj(a.obj)}}
+ {{a.verb.capitalize()}} {{am.activity_obj(a.obj)}}
{% if a.target.activity_name %}on {{am.activity_obj(a.target)}}{% endif %}
+ {% if a.obj.project %}on <a href="{{a.obj.project.url()}}">{{a.obj.project.name}}</a>{% endif %}
</b>
{% if a.obj.activity_extras.get('summary') %}
<p>
[08/16] git commit: bump MediawikiImporter version for better form
text
Posted by jo...@apache.org.
bump MediawikiImporter version for better form text
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1d044d9b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1d044d9b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1d044d9b
Branch: refs/heads/cj/7210
Commit: 1d044d9bbd8de4e160b23d407f47b1c197f25dd3
Parents: f2f5514
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Feb 26 16:21:34 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Feb 26 16:21:34 2014 +0000
----------------------------------------------------------------------
requirements-sf.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d044d9b/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 995d9c5..5df966f 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -21,7 +21,7 @@ pyzmq==2.1.7
html2text==3.200.3dev-20121112
PyMollom==0.1
TracWikiImporter==0.4.1
-MediawikiImporter==0.1.0
+MediawikiImporter==0.1.1
Unidecode==0.04.14
# use version built from https://github.com/johnsca/GitPython/tree/sf-master
[13/16] 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/cj/7210
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
[04/16] git commit: [#7210] Fixed and added test for
substitute_extensions not flushing after error
Posted by jo...@apache.org.
[#7210] Fixed and added test for substitute_extensions not flushing after error
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/045cf231
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/045cf231
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/045cf231
Branch: refs/heads/cj/7210
Commit: 045cf2313fa61ba8cc72c8a00627a3476b1bc565
Parents: 7ba3fb7
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Feb 25 23:11:44 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Feb 25 23:14:54 2014 +0000
----------------------------------------------------------------------
Allura/allura/tests/unit/test_session.py | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/045cf231/Allura/allura/tests/unit/test_session.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/unit/test_session.py b/Allura/allura/tests/unit/test_session.py
index a5fb080..89aa8b8 100644
--- a/Allura/allura/tests/unit/test_session.py
+++ b/Allura/allura/tests/unit/test_session.py
@@ -27,6 +27,19 @@ from allura.model.session import BatchIndexer, substitute_extensions
def test_extensions_cm():
session = mock.Mock(_kwargs=dict(extensions=[]))
extension = mock.Mock()
+ with substitute_extensions(session, [extension]) as sess:
+ assert session.flush.call_count == 1
+ assert session.close.call_count == 1
+ assert sess == session
+ assert sess._kwargs['extensions'] == [extension]
+ assert session.flush.call_count == 2
+ assert session.close.call_count == 2
+ assert session._kwargs['extensions'] == []
+
+
+def test_extensions_cm_raises():
+ session = mock.Mock(_kwargs=dict(extensions=[]))
+ extension = mock.Mock()
with td.raises(ValueError):
with substitute_extensions(session, [extension]) as sess:
assert session.flush.call_count == 1
@@ -34,8 +47,8 @@ def test_extensions_cm():
assert sess == session
assert sess._kwargs['extensions'] == [extension]
raise ValueError('test')
- assert session.flush.call_count == 2
- assert session.close.call_count == 2
+ assert session.flush.call_count == 1
+ assert session.close.call_count == 1
assert session._kwargs['extensions'] == []
[12/16] git commit: [#7214] make admin landing page not error when
tool not present
Posted by jo...@apache.org.
[#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/cj/7210
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')
+
[09/16] git commit: [#7224] time many more pymongo & ming methods
Posted by jo...@apache.org.
[#7224] time many more pymongo & ming methods
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7ad8965e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7ad8965e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7ad8965e
Branch: refs/heads/cj/7210
Commit: 7ad8965e8bcff3246921e38bc0a3b2e34d50b324
Parents: 1d044d9
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Feb 26 16:48:20 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Feb 26 16:48:20 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/custom_middleware.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ad8965e/Allura/allura/lib/custom_middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index 2a07e58..b6797e3 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -217,14 +217,19 @@ class AlluraTimerMiddleware(TimerMiddleware):
Timer('markdown', markdown.Markdown, 'convert'),
Timer('ming', ming.odm.odmsession.ODMCursor, 'next', # FIXME: this may captures timings ok, but is misleading for counts
debug_each_call=False),
- Timer('ming', ming.odm.odmsession.ODMSession, 'flush', 'find'),
+ Timer('ming', ming.odm.odmsession.ODMSession, 'flush',
+ 'find', 'find_and_modify', 'remove', 'update', 'update_if_not_modified',
+ 'aggregate', 'group', 'map_reduce', 'inline_map_reduce', 'distinct',
+ ),
Timer('ming', ming.schema.Document, 'validate',
debug_each_call=False),
Timer('ming', ming.schema.FancySchemaItem, '_validate_required',
'_validate_fast_missing', '_validate_optional',
debug_each_call=False),
Timer('mongo', pymongo.collection.Collection, 'count', 'find',
- 'find_one'),
+ 'find_one', 'aggregate', 'group', 'map_reduce',
+ 'inline_map_reduce', 'find_and_modify',
+ 'insert', 'save', 'update', 'remove', 'drop'),
Timer('mongo', pymongo.cursor.Cursor, 'count', 'distinct',
'_refresh'),
# urlopen and socket io may or may not overlap partially
[03/16] git commit: [#7210] Skip flush before restoring Ming session
extensions on error
Posted by jo...@apache.org.
[#7210] Skip flush before restoring Ming session extensions on error
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7ba3fb79
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7ba3fb79
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7ba3fb79
Branch: refs/heads/cj/7210
Commit: 7ba3fb794a3c8ff04b8637a0394309de69bc4ad6
Parents: e3af39b
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Mon Feb 24 22:05:53 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Feb 25 21:28:53 2014 +0000
----------------------------------------------------------------------
Allura/allura/model/session.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ba3fb79/Allura/allura/model/session.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py
index 68c8099..50bbb8a 100644
--- a/Allura/allura/model/session.py
+++ b/Allura/allura/model/session.py
@@ -177,15 +177,20 @@ def substitute_extensions(session, extensions=None):
"""
original_exts = session._kwargs.get('extensions', [])
- def _set_exts(exts):
- session.flush()
- session.close()
- session._kwargs['extensions'] = exts
- _set_exts(extensions or [])
+ # flush the session to ensure everything so far
+ # is written using the original extensions
+ session.flush()
+ session.close()
try:
+ session._kwargs['extensions'] = extensions or []
yield session
+ # if successful, flush the session to ensure everything
+ # new is written using the modified extensions
+ session.flush()
+ session.close()
finally:
- _set_exts(original_exts)
+ # restore proper session extension even if everything goes horribly awry
+ session._kwargs['extensions'] = original_exts
main_doc_session = Session.by_name('main')
[02/16] git commit: [#7215] Skip trove update events during test
setup, for performance
Posted by jo...@apache.org.
[#7215] Skip trove update events during test setup, for performance
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e3af39b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e3af39b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e3af39b3
Branch: refs/heads/cj/7210
Commit: e3af39b3e4a7737164bf96a63bc88b296ff375d6
Parents: 17eba62
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Feb 25 19:11:20 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Feb 25 19:11:20 2014 +0000
----------------------------------------------------------------------
AlluraTest/alluratest/controller.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e3af39b3/AlluraTest/alluratest/controller.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/controller.py b/AlluraTest/alluratest/controller.py
index dcd7c53..5e81b37 100644
--- a/AlluraTest/alluratest/controller.py
+++ b/AlluraTest/alluratest/controller.py
@@ -68,8 +68,11 @@ def setup_basic_test(config=None, app_name=DFL_APP_NAME):
conf_dir = os.getcwd()
ew.TemplateEngine.initialize({})
test_file = os.path.join(conf_dir, get_config_file(config))
- cmd = SetupCommand('setup-app')
- cmd.run([test_file])
+ with mock.patch.object(M.project.TroveCategoryMapperExtension, 'after_insert'),\
+ mock.patch.object(M.project.TroveCategoryMapperExtension, 'after_update'),\
+ mock.patch.object(M.project.TroveCategoryMapperExtension, 'after_delete'):
+ cmd = SetupCommand('setup-app')
+ cmd.run([test_file])
# run all tasks, e.g. indexing from bootstrap operations
while M.MonQTask.run_ready('setup'):
[07/16] git commit: add apache license header to new file
Posted by jo...@apache.org.
add apache license header to new file
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/f2f55148
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/f2f55148
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/f2f55148
Branch: refs/heads/cj/7210
Commit: f2f5514858ba910e9ec3a56da15729886e3b9aad
Parents: dfde920
Author: Dave Brondsema <da...@brondsema.net>
Authored: Wed Feb 26 09:57:41 2014 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Feb 26 09:57:41 2014 -0500
----------------------------------------------------------------------
.../allura/tests/functional/test_trovecategory.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/f2f55148/Allura/allura/tests/functional/test_trovecategory.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_trovecategory.py b/Allura/allura/tests/functional/test_trovecategory.py
index c9a8cc3..b30b63a 100644
--- a/Allura/allura/tests/functional/test_trovecategory.py
+++ b/Allura/allura/tests/functional/test_trovecategory.py
@@ -1,3 +1,20 @@
+# 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.
+
import mock
from tg import config
[06/16] git commit: [#4701] ticket:540 Add current ticket's
milestones to email notification
Posted by jo...@apache.org.
[#4701] ticket:540 Add current ticket's milestones to email notification
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dfde920a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dfde920a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dfde920a
Branch: refs/heads/cj/7210
Commit: dfde920acca4396eb4da4f4d3c301809c86ae449
Parents: 63bd019
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri Feb 21 15:58:01 2014 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Feb 26 05:47:36 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/mail/Ticket.txt | 3 ++
.../forgetracker/tests/functional/test_root.py | 34 ++++++++++++++++++++
2 files changed, 37 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dfde920a/Allura/allura/templates/mail/Ticket.txt
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/mail/Ticket.txt b/Allura/allura/templates/mail/Ticket.txt
index 7c4c4da..64b704c 100644
--- a/Allura/allura/templates/mail/Ticket.txt
+++ b/Allura/allura/templates/mail/Ticket.txt
@@ -23,6 +23,9 @@
** [{{data.app_config.options.mount_point}}:#{{data.ticket_num}}] {{data.summary|e}}**
**Status:** {{data.status}}
+{% for f in data.globals.milestone_fields -%}
+ **{{ f.label }}:** {{ data.custom_fields.get(f.name, '') }}
+{% endfor -%}
{% if data.labels.__len__() -%}
**Labels:** {% for label in data.labels %}{{label}} {% else %}None{% endfor %}
{% endif -%}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dfde920a/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index b79a8e3..6a5fc02 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1516,6 +1516,40 @@ class TestFunctionalController(TrackerTestController):
assert_in('test second ticket', str(ticket_rows))
assert_false('test third ticket' in str(ticket_rows))
+ def test_ticket_notification_contains_milestones(self):
+ params = dict(
+ custom_fields=[
+ dict(
+ name='_releases',
+ label='Releases',
+ type='milestone',
+ milestones=[{'name': '0.9.3'}, {'name': '1.0-beta'}],
+ show_in_search='on',
+ ),
+ dict(
+ name='_milestone',
+ label='Milestone',
+ type='milestone',
+ milestones=[{'name': '1.0'}, {'name': '2.0'}],
+ show_in_search='on',
+ ),
+ ],
+ open_status_names='aa bb',
+ closed_status_names='cc',
+ )
+ self.app.post(
+ '/admin/bugs/set_custom_fields',
+ params=variable_encode(params))
+ self.new_ticket(summary='test new milestone', _milestone='2.0',
+ **{'custom_fields._releases': '1.0-beta'})
+ ThreadLocalORMSession.flush_all()
+ M.MonQTask.run_ready()
+ ThreadLocalORMSession.flush_all()
+ email = M.MonQTask.query.find(
+ dict(task_name='allura.tasks.mail_tasks.sendmail')).first()
+ assert_in('**Releases:** 1.0-beta', email.kwargs.text)
+ assert_in('**Milestone:** 2.0', email.kwargs.text)
+
def test_bulk_edit_notifications(self):
self.new_ticket(summary='test first ticket',
status='open', _milestone='2.0')
[15/16] git commit: [#7207] add comment,
support potential future embed source that does not have iframes
Posted by jo...@apache.org.
[#7207] add comment, support potential future embed source that does not have iframes
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3422d680
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3422d680
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3422d680
Branch: refs/heads/cj/7210
Commit: 3422d6803c556bf883073fd5b216dde631f68eeb
Parents: 9bdfdd1
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Feb 27 14:47:47 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Feb 27 14:48:37 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/macro.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3422d680/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 2116c23..29181fb 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -401,6 +401,7 @@ def embed(url=None):
html = None
if html:
+ # convert iframe src from http to https, to avoid mixed security blocking when used on an https page
html = BeautifulSoup(html)
embed_url = html.find('iframe').get('src')
if embed_url:
@@ -410,6 +411,6 @@ def embed(url=None):
else:
embed_url = embed_url.geturl()
html.find('iframe')['src'] = embed_url
- return jinja2.Markup('<div class="grid-20">%s</div>' % html)
+ return jinja2.Markup('<div class="grid-20">%s</div>' % html)
return '[[embed url=%s]]' % url
[10/16] git commit: [#7224] instead of timing a whole ming flush(),
time each object op within a flush
Posted by jo...@apache.org.
[#7224] instead of timing a whole ming flush(), time each object op within a flush
This will give us more accurate representation in call counts, and more
useful and detailed information when DEBUG logging timermiddleware.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4d4e1d80
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4d4e1d80
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4d4e1d80
Branch: refs/heads/cj/7210
Commit: 4d4e1d80680d835e11a5a0012f8ca188dc28e215
Parents: 7ad8965
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Feb 26 16:58:57 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Feb 26 16:58:57 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/custom_middleware.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4d4e1d80/Allura/allura/lib/custom_middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py
index b6797e3..ad1f276 100644
--- a/Allura/allura/lib/custom_middleware.py
+++ b/Allura/allura/lib/custom_middleware.py
@@ -217,7 +217,8 @@ class AlluraTimerMiddleware(TimerMiddleware):
Timer('markdown', markdown.Markdown, 'convert'),
Timer('ming', ming.odm.odmsession.ODMCursor, 'next', # FIXME: this may captures timings ok, but is misleading for counts
debug_each_call=False),
- Timer('ming', ming.odm.odmsession.ODMSession, 'flush',
+ Timer('ming', ming.odm.odmsession.ODMSession,
+ 'insert_now', 'update_now', 'delete_now',
'find', 'find_and_modify', 'remove', 'update', 'update_if_not_modified',
'aggregate', 'group', 'map_reduce', 'inline_map_reduce', 'distinct',
),
[11/16] 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/cj/7210
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
[14/16] git commit: [#7202] ticket:548 Use https when embedding
youtube videos
Posted by jo...@apache.org.
[#7202] ticket:548 Use https when embedding youtube videos
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9bdfdd1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9bdfdd1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9bdfdd1d
Branch: refs/heads/cj/7210
Commit: 9bdfdd1db1dd19e896e90011af9dff56a8be0241
Parents: 6143e75
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Feb 25 10:34:32 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Feb 27 14:48:37 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/macro.py | 20 ++++++++++++++++++--
Allura/allura/lib/utils.py | 2 +-
Allura/allura/tests/test_globals.py | 2 +-
Allura/allura/tests/test_utils.py | 4 ++--
4 files changed, 22 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bdfdd1d/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index efb1433..2116c23 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -23,11 +23,13 @@ import traceback
import oembed
import jinja2
from operator import attrgetter
+from urlparse import urlparse, urlunparse
import pymongo
from pylons import tmpl_context as c, app_globals as g
from pylons import request
from paste.deploy.converters import asint
+from BeautifulSoup import BeautifulSoup
from . import helpers as h
from . import security
@@ -394,6 +396,20 @@ def embed(url=None):
'http://www.youtube.com/oembed', ['http://*.youtube.com/*', 'https://*.youtube.com/*'])
consumer.addEndpoint(endpoint)
try:
- return jinja2.Markup('<div class="grid-20">%s</div>' % consumer.embed(url)['html'])
+ html = consumer.embed(url)['html']
except oembed.OEmbedNoEndpoint:
- return '[[embed url=%s]]' % url
+ html = None
+
+ if html:
+ html = BeautifulSoup(html)
+ embed_url = html.find('iframe').get('src')
+ if embed_url:
+ embed_url = urlparse(embed_url)
+ if embed_url.scheme == 'http':
+ embed_url = urlunparse(['https'] + list(embed_url[1:]))
+ else:
+ embed_url = embed_url.geturl()
+ html.find('iframe')['src'] = embed_url
+ return jinja2.Markup('<div class="grid-20">%s</div>' % html)
+
+ return '[[embed url=%s]]' % url
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bdfdd1d/Allura/allura/lib/utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 95622c9..ae11ef4 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -543,7 +543,7 @@ class ForgeHTMLSanitizer(_HTMLSanitizer):
def unknown_starttag(self, tag, attrs):
if 'iframe' in self.acceptable_elements:
self.acceptable_elements.remove('iframe')
- if (tag == 'iframe') and (dict(attrs).get('src', '').startswith('http://www.youtube.com/embed/') or
+ if (tag == 'iframe') and (dict(attrs).get('src', '').startswith('https://www.youtube.com/embed/') or
dict(attrs).get('src', '').startswith('https://www.gittip.com/')):
self.acceptable_elements.append('iframe')
_HTMLSanitizer.unknown_starttag(self, tag, attrs)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bdfdd1d/Allura/allura/tests/test_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_globals.py b/Allura/allura/tests/test_globals.py
index 704514b..d8f6b52 100644
--- a/Allura/allura/tests/test_globals.py
+++ b/Allura/allura/tests/test_globals.py
@@ -285,7 +285,7 @@ def test_macro_include_extra_br():
def test_macro_embed():
r = g.markdown_wiki.convert(
'[[embed url=http://www.youtube.com/watch?v=kOLpSPEA72U]]')
- assert '''<div class="grid-20"><iframe height="270" src="http://www.youtube.com/embed/kOLpSPEA72U?feature=oembed" width="480"></iframe></div>''' in r
+ assert '''<div class="grid-20"><iframe height="270" src="https://www.youtube.com/embed/kOLpSPEA72U?feature=oembed" width="480"></iframe></div>''' in r
r = g.markdown_wiki.convert('[[embed url=http://vimeo.com/46163090]]')
assert_equal(
r, '<div class="markdown_content"><p>[[embed url=http://vimeo.com/46163090]]</p></div>')
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bdfdd1d/Allura/allura/tests/test_utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_utils.py b/Allura/allura/tests/test_utils.py
index 92f1e28..e791503 100644
--- a/Allura/allura/tests/test_utils.py
+++ b/Allura/allura/tests/test_utils.py
@@ -247,6 +247,6 @@ class TestHTMLSanitizer(unittest.TestCase):
def test_html_sanitizer_youtube_iframe(self):
p = utils.ForgeHTMLSanitizer('utf-8', '')
p.feed(
- '<div><iframe src="http://www.youtube.com/embed/kOLpSPEA72U?feature=oembed"></iframe></div>')
+ '<div><iframe src="https://www.youtube.com/embed/kOLpSPEA72U?feature=oembed"></iframe></div>')
assert_equal(
- p.output(), '<div><iframe src="http://www.youtube.com/embed/kOLpSPEA72U?feature=oembed"></iframe></div>')
+ p.output(), '<div><iframe src="https://www.youtube.com/embed/kOLpSPEA72U?feature=oembed"></iframe></div>')
[05/16] git commit: [#5175] ticket:544 Fix title for merge request
pages
Posted by jo...@apache.org.
[#5175] ticket:544 Fix title for merge request pages
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/63bd019d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/63bd019d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/63bd019d
Branch: refs/heads/cj/7210
Commit: 63bd019d329d63e4f1f16dc3155adeedf23b139d
Parents: 045cf23
Author: tramzzz <st...@gmail.com>
Authored: Mon Feb 24 21:47:24 2014 +0200
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Feb 26 05:23:00 2014 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/merge_request.html | 6 +-----
Allura/allura/templates/repo/merge_requests.html | 6 +-----
Allura/allura/templates/repo/request_merge.html | 6 +-----
3 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/63bd019d/Allura/allura/templates/repo/merge_request.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_request.html b/Allura/allura/templates/repo/merge_request.html
index 4454066..3c79654 100644
--- a/Allura/allura/templates/repo/merge_request.html
+++ b/Allura/allura/templates/repo/merge_request.html
@@ -19,11 +19,7 @@
{% extends 'allura:templates/repo/repo_master.html' %}
{% block title %}
- {% if c.app.repo %}
- Repository: {{c.app.repo.name}}
- {% else %}
- Repository
- {% endif %}
+ {{c.project.name}} / {{c.app.config.options.mount_label}} / Merge Request #{{req.request_number}}: {{req.summary}} ({{req.status}})
{% endblock %}
{% block header %}{{c.app.config.options.mount_label}}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/63bd019d/Allura/allura/templates/repo/merge_requests.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/merge_requests.html b/Allura/allura/templates/repo/merge_requests.html
index b1d83c6..2c37a45 100644
--- a/Allura/allura/templates/repo/merge_requests.html
+++ b/Allura/allura/templates/repo/merge_requests.html
@@ -19,11 +19,7 @@
{% extends 'allura:templates/repo/repo_master.html' %}
{% block title %}
- {% if c.app.repo %}
- Repository: {{c.app.repo.name}}
- {% else %}
- Repository
- {% endif %}
+ {{c.project.name}} / {{c.app.config.options.mount_label}} / Merge Requests
{% endblock %}
{% block header %}{{c.app.config.options.mount_label}} Merge Requests{% endblock %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/63bd019d/Allura/allura/templates/repo/request_merge.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/request_merge.html b/Allura/allura/templates/repo/request_merge.html
index a55a67c..ad5222d 100644
--- a/Allura/allura/templates/repo/request_merge.html
+++ b/Allura/allura/templates/repo/request_merge.html
@@ -19,11 +19,7 @@
{% extends 'allura:templates/repo/repo_master.html' %}
{% block title %}
- {% if c.app.repo %}
- Repository: {{c.app.repo.name}}
- {% else %}
- Repository
- {% endif %}
+ {{c.project.name}} / {{c.app.config.options.mount_label}} / Request merge
{% endblock %}
{% block header %}Request merge of {{c.app.config.options.mount_label}} {% endblock %}