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/03/04 19:40:42 UTC
[1/6] git commit: [#7178] Always return a MockSOLR instead of None,
since things break without it
Repository: incubator-allura
Updated Branches:
refs/heads/cj/7204 3b1b9dae6 -> da9227258 (forced update)
[#7178] Always return a MockSOLR instead of None, since things break without it
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/dc4ca356
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dc4ca356
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dc4ca356
Branch: refs/heads/cj/7204
Commit: dc4ca356e10b9ede614eab783ae4e80089c78b14
Parents: 8fbd4d6
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Feb 26 20:58:44 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:33:17 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/app_globals.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dc4ca356/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index f46c1eb..9548cac 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -150,17 +150,15 @@ class Globals(object):
# skip empty strings in case of extra commas
self.solr_server = [s for s in self.solr_server if s]
self.solr_query_server = config.get('solr.query_server')
- if asbool(config.get('solr.mock')):
- self.solr = self.solr_short_timeout = MockSOLR()
- elif self.solr_server:
+ if self.solr_server:
self.solr = make_solr_from_config(
self.solr_server, self.solr_query_server)
self.solr_short_timeout = make_solr_from_config(
self.solr_server, self.solr_query_server,
timeout=int(config.get('solr.short_timeout', 10)))
else: # pragma no cover
- self.solr = None
- self.solr_short_timeout = None
+ log.warning('Solr config not set; using in-memory MockSOLR')
+ self.solr = self.solr_short_timeout = MockSOLR()
self.use_queue = asbool(config.get('use_queue', False))
# Load login/logout urls; only used for customized logins
[5/6] git commit: [#7204] Show project last-updated on user profile
Posted by jo...@apache.org.
[#7204] Show project last-updated on user profile
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/3d9031a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3d9031a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3d9031a3
Branch: refs/heads/cj/7204
Commit: 3d9031a3910c3c1eca58363e9a23e5b21efc7a4d
Parents: cb68a87
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Mon Mar 3 16:26:13 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:46:57 2014 +0000
----------------------------------------------------------------------
.../allura/ext/user_profile/templates/sections/projects.html | 6 ++++++
Allura/allura/nf/allura/css/site_style.css | 6 ++++++
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d9031a3/Allura/allura/ext/user_profile/templates/sections/projects.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/projects.html b/Allura/allura/ext/user_profile/templates/sections/projects.html
index 4f9fbc2..2b7d1a2 100644
--- a/Allura/allura/ext/user_profile/templates/sections/projects.html
+++ b/Allura/allura/ext/user_profile/templates/sections/projects.html
@@ -43,6 +43,12 @@
<a href="{{project.url()}}">{{project.name}}</a>
{{project.summary}}
</span>
+ <span class="project-last-updated">
+ Last Updated:
+ <time datetime="{{project.last_updated}}" title="{{project.last_updated}}">
+ {{h.ago(project.last_updated)}}
+ </time>
+ </span>
</li>
{% else %}
<li class="empty">No projects to display.</li>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d9031a3/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index b83a43c..9827e84 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3385,6 +3385,12 @@ ul.dropdown ul li a:hover {
content: '\A';
white-space: pre;
}
+.profile-section.projects ul .project-last-updated {
+ display: block;
+ text-align: right;
+ font-style: italic;
+ font-size: 10px;
+}
.profile-section.projects .show-more-projects {
text-align: center;
}
[3/6] git commit: [#7204] Order user projects list by name
Posted by jo...@apache.org.
[#7204] Order user projects list by name
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/a81b7921
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a81b7921
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a81b7921
Branch: refs/heads/cj/7204
Commit: a81b79216c29aff6a6a199d322d4ee97c6125eec
Parents: fe0aa16
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri Feb 28 22:51:08 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:46:56 2014 +0000
----------------------------------------------------------------------
Allura/allura/ext/user_profile/user_main.py | 5 ++++-
Allura/allura/model/auth.py | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a81b7921/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 9a9e5f1..881a9ec 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -296,7 +296,10 @@ class ProjectsSection(ProfileSectionBase):
context['projects'] = [
project
for project in self.user.my_projects()
- if project != c.project and (self.user == c.user or h.has_access(project, 'read'))]
+ if project != c.project
+ and (self.user == c.user or h.has_access(project, 'read'))
+ and not project.is_nbhd_project
+ and not project.is_user_project]
return context
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a81b7921/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index fbb06bc..4e93581 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -706,7 +706,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
# filter out projects to which the user belongs to no named groups (i.e., role['roles'] is empty)
projects = [r['project_id'] for r in roles if r['roles']]
from .project import Project
- return Project.query.find({'_id': {'$in': projects}, 'deleted': False}).sort('last_updated', pymongo.DESCENDING)
+ return Project.query.find({'_id': {'$in': projects}, 'deleted': False}).sort('name', pymongo.ASCENDING)
def my_projects_by_role_name(self, role_name):
"""
[4/6] git commit: [#7204] Added Social Networks user profile section
Posted by jo...@apache.org.
[#7204] Added Social Networks user profile section
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/cb68a872
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cb68a872
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cb68a872
Branch: refs/heads/cj/7204
Commit: cb68a8726cb5757c6995ebb98bcfc8c302270c67
Parents: a81b792
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri Feb 28 23:14:48 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:46:57 2014 +0000
----------------------------------------------------------------------
.../user_profile/templates/sections/social.html | 41 ++++++++++++++++++++
Allura/allura/ext/user_profile/user_main.py | 4 ++
Allura/allura/nf/allura/css/site_style.css | 26 +++++++++++++
Allura/setup.py | 1 +
4 files changed, 72 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb68a872/Allura/allura/ext/user_profile/templates/sections/social.html
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/templates/sections/social.html b/Allura/allura/ext/user_profile/templates/sections/social.html
new file mode 100644
index 0000000..4d2ea8c
--- /dev/null
+++ b/Allura/allura/ext/user_profile/templates/sections/social.html
@@ -0,0 +1,41 @@
+{#-
+ 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.
+-#}
+{% extends "allura.ext.user_profile:templates/profile_section_base.html" %}
+
+{% block title %}
+ Social Networks
+{% endblock %}
+
+{% block actions %}
+ {% if user == c.user %}
+ <a href="{{auth.account_urls['account_user_info']}}/contacts">Edit Social Networks</a>
+ {% endif %}
+{% endblock %}
+
+{% block section_class %}social{% endblock %}
+
+{% block content %}
+ <dl>
+ {% for contact in user.get_pref('socialnetworks') %}
+ <dt>{{ contact.socialnetwork }}</dt><dd>{{ contact.accounturl|urlize }}</dd>
+ {% else %}
+ <dd class="empty">No social networks entered.</dd>
+ {% endfor %}
+ </dl>
+{% endblock %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb68a872/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index 881a9ec..cd7bac9 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -309,3 +309,7 @@ class SkillsSection(ProfileSectionBase):
class ToolsSection(ProfileSectionBase):
template = 'allura.ext.user_profile:templates/sections/tools.html'
+
+
+class SocialSection(ProfileSectionBase):
+ template = 'allura.ext.user_profile:templates/sections/social.html'
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb68a872/Allura/allura/nf/allura/css/site_style.css
----------------------------------------------------------------------
diff --git a/Allura/allura/nf/allura/css/site_style.css b/Allura/allura/nf/allura/css/site_style.css
index 17cf48a..b83a43c 100644
--- a/Allura/allura/nf/allura/css/site_style.css
+++ b/Allura/allura/nf/allura/css/site_style.css
@@ -3417,6 +3417,32 @@ ul.dropdown ul li a:hover {
.profile-section.tools .section-body li.empty {
margin-left: 10px;
}
+.profile-section.social {
+ margin-top: 10px;
+}
+.profile-section.social .section-body {
+ padding: 10px;
+}
+.profile-section.social dl dt {
+ display: inline-block;
+ font-weight: bold;
+ margin-right: 4px;
+ width: 100px;
+ vertical-align: top;
+}
+.profile-section.social dl dd {
+ display: inline;
+}
+.profile-section.social dl dd:after {
+ content: '\A';
+ white-space: pre;
+}
+.profile-section.social dl dd.empty {
+ margin-left: 10px;
+}
+.profile-section.social dl dd a {
+ margin: 0;
+}
#user-message {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb68a872/Allura/setup.py
----------------------------------------------------------------------
diff --git a/Allura/setup.py b/Allura/setup.py
index 1d04828..f3a1a20 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -132,6 +132,7 @@ setup(
projects = allura.ext.user_profile.user_main:ProjectsSection
skills = allura.ext.user_profile.user_main:SkillsSection
tools = allura.ext.user_profile.user_main:ToolsSection
+ social = allura.ext.user_profile.user_main:SocialSection
[paste.paster_command]
taskd = allura.command.taskd:TaskdCommand
[2/6] git commit: Revert "[#7021] Bump version of GitPython for
gpg-signed commit fix"
Posted by jo...@apache.org.
Revert "[#7021] Bump version of GitPython for gpg-signed commit fix"
This reverts commit 8fbd4d6ee7fcc315f093fd8120fe974485e4fe65.
There is apparently an issue with this GitPython fix that I missed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/fe0aa167
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fe0aa167
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fe0aa167
Branch: refs/heads/cj/7204
Commit: fe0aa1678d41cea88505af1862bd434de6afe7e9
Parents: dc4ca35
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Mar 4 16:44:37 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Mar 4 16:45:14 2014 +0000
----------------------------------------------------------------------
requirements-sf.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fe0aa167/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 68b5e5b..5df966f 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -26,7 +26,7 @@ Unidecode==0.04.14
# use version built from https://github.com/johnsca/GitPython/tree/sf-master
# for unmerged fixes for [#5411], [#6000], and [#6078]
-GitPython==0.3.2.RC1-20140303
+GitPython==0.3.2.RC1-20140130
WebError==0.10.3-20130423
[6/6] git commit: [#7204] Added basic test of standard profile
sections
Posted by jo...@apache.org.
[#7204] Added basic test of standard profile sections
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/da922725
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/da922725
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/da922725
Branch: refs/heads/cj/7204
Commit: da9227258346104037e1883ed8d27cfbf269f942
Parents: 3d9031a
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Mar 4 16:17:02 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Mar 4 16:46:57 2014 +0000
----------------------------------------------------------------------
Allura/allura/tests/functional/test_user_profile.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/da922725/Allura/allura/tests/functional/test_user_profile.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_user_profile.py b/Allura/allura/tests/functional/test_user_profile.py
index 3d1270a..a3ea741 100644
--- a/Allura/allura/tests/functional/test_user_profile.py
+++ b/Allura/allura/tests/functional/test_user_profile.py
@@ -30,7 +30,17 @@ class TestUserProfile(TestController):
def test_profile(self):
r = self.app.get('/u/test-admin/profile/')
assert_equal('Test Admin',
- r.html.find('h1', 'project_title').find('a').text)
+ r.html.find('h1', 'project_title').find('a').text)
+ sections = set([c for s in r.html.findAll(None, 'profile-section') for c in s['class'].split()])
+ assert_in('personal-data', sections)
+ assert_in('Username:test-admin', r.html.find(None, 'personal-data').getText())
+ assert_in('projects', sections)
+ assert_in('Test Project', r.html.find(None, 'projects').getText())
+ assert_in('Last Updated:less than 1 minute ago', r.html.find(None, 'projects').getText())
+ assert_in('tools', sections)
+ assert_in('Admin', r.html.find(None, 'tools').getText())
+ assert_in('skills', sections)
+ assert_in('No skills entered', r.html.find(None, 'skills').getText())
def test_wrong_profile(self):
self.app.get('/u/no-such-user/profile/', status=404)