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/19 19:50:54 UTC
[1/2] git commit: [#7185] Minor refactor for clarity
Repository: incubator-allura
Updated Branches:
refs/heads/master 09f213800 -> 6bb7fcf4d
[#7185] Minor refactor for clarity
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/6bb7fcf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6bb7fcf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6bb7fcf4
Branch: refs/heads/master
Commit: 6bb7fcf4d6e06e40568338de25ae4c86368fe8c6
Parents: 4e6149d
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Feb 19 18:43:11 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Feb 19 18:50:33 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/project_list.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6bb7fcf4/Allura/allura/lib/widgets/project_list.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/project_list.py b/Allura/allura/lib/widgets/project_list.py
index d89393a..cc2b933 100644
--- a/Allura/allura/lib/widgets/project_list.py
+++ b/Allura/allura/lib/widgets/project_list.py
@@ -19,6 +19,7 @@ import ew as ew_core
import ew.jinja2_ew as ew
from pylons import tmpl_context as c
+from paste.deploy.converters import asbool
from allura import model as M
from allura.lib.security import Credentials
@@ -127,13 +128,8 @@ class ProjectList(ew_core.Widget):
cred.load_user_roles(c.user._id, *[p._id for p in projects])
cred.load_project_roles(*[p._id for p in projects])
- true_list = ['true', 't', '1', 'yes', 'y']
for opt in ['show_proj_icon', 'show_download_button', 'show_awards_banner']:
- if type(response[opt]) == unicode:
- if response[opt].lower() in true_list:
- response[opt] = True
- else:
- response[opt] = False
+ response[opt] = asbool(response[opt])
if response['sitemaps'] is None and response['display_mode'] != 'list':
response['sitemaps'] = M.Project.menus(projects)
[2/2] git commit: [#7185] move project list conditionals from the
template to the data fetching logic
Posted by jo...@apache.org.
[#7185] move project list conditionals from the template to the data fetching logic
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4e6149d5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4e6149d5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4e6149d5
Branch: refs/heads/master
Commit: 4e6149d52f5e136bc47383c432610586b654c476
Parents: 09f2138
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Feb 18 16:36:06 2014 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Feb 19 18:50:33 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/widgets/project_list.py | 32 ++++++++------------
.../templates/widgets/project_summary.html | 12 ++++----
run_tests | 4 +--
scripts/asf-release.sh | 5 ++-
4 files changed, 22 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4e6149d5/Allura/allura/lib/widgets/project_list.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/project_list.py b/Allura/allura/lib/widgets/project_list.py
index f14fba9..d89393a 100644
--- a/Allura/allura/lib/widgets/project_list.py
+++ b/Allura/allura/lib/widgets/project_list.py
@@ -126,33 +126,25 @@ class ProjectList(ew_core.Widget):
projects = response['projects']
cred.load_user_roles(c.user._id, *[p._id for p in projects])
cred.load_project_roles(*[p._id for p in projects])
- if response['sitemaps'] is None:
+
+ true_list = ['true', 't', '1', 'yes', 'y']
+ for opt in ['show_proj_icon', 'show_download_button', 'show_awards_banner']:
+ if type(response[opt]) == unicode:
+ if response[opt].lower() in true_list:
+ response[opt] = True
+ else:
+ response[opt] = False
+
+ if response['sitemaps'] is None and response['display_mode'] != 'list':
response['sitemaps'] = M.Project.menus(projects)
- if response['icon_urls'] is None:
+ if response['icon_urls'] is None and response['show_proj_icon']:
response['icon_urls'] = M.Project.icon_urls(projects)
- if response['accolades_index'] is None:
+ if response['accolades_index'] is None and response['show_awards_banner']:
response['accolades_index'] = M.Project.accolades_index(projects)
if type(response['columns']) == unicode:
response['columns'] = int(response['columns'])
- true_list = ['true', 't', '1', 'yes', 'y']
- if type(response['show_proj_icon']) == unicode:
- if response['show_proj_icon'].lower() in true_list:
- response['show_proj_icon'] = True
- else:
- response['show_proj_icon'] = False
- if type(response['show_download_button']) == unicode:
- if response['show_download_button'].lower() in true_list:
- response['show_download_button'] = True
- else:
- response['show_download_button'] = False
- if type(response['show_awards_banner']) == unicode:
- if response['show_awards_banner'].lower() in true_list:
- response['show_awards_banner'] = True
- else:
- response['show_awards_banner'] = False
-
return response
def resources(self):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4e6149d5/Allura/allura/templates/widgets/project_summary.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/project_summary.html b/Allura/allura/templates/widgets/project_summary.html
index 75c9527..734ccd3 100644
--- a/Allura/allura/templates/widgets/project_summary.html
+++ b/Allura/allura/templates/widgets/project_summary.html
@@ -19,12 +19,12 @@
{% if display_mode == 'list' %}
<div class="list card{% if show_proj_icon%} proj_icon{% endif %}"
{%- if columns == 2 %} style="width: 330px"{% elif columns == 3 %} style="width: 220px"{% endif %}>
- {% if accolades and show_awards_banner %}
+ {% if accolades %}
<div class="box notch sponsor">
<div class="feature">{{accolades[0].award.short}}</div>
- {% if show_proj_icon and icon_url %}<img src="{{icon_url}}" alt="{{value.name}} Logo"/>{% endif %}
+ {% if icon_url %}<img src="{{icon_url}}" alt="{{value.name}} Logo"/>{% endif %}
</div>
- {% elif show_proj_icon and icon_url %}
+ {% elif icon_url %}
<div class="box">
<img src="{{icon_url}}" alt="{{value.name}} Logo"/>
</div>
@@ -35,12 +35,12 @@
</div>
{% else %}
<div class="border card">
- {% if accolades and show_awards_banner %}
+ {% if accolades %}
<div class="box notch sponsor">
<div class="feature">{{accolades[0].award.short}}</div>
- {% if show_proj_icon and icon_url %}<img src="{{icon_url}}" alt="{{value.name}} Logo"/>{% endif %}
+ {% if icon_url %}<img src="{{icon_url}}" alt="{{value.name}} Logo"/>{% endif %}
</div>
- {% elif show_proj_icon and icon_url %}
+ {% elif icon_url %}
<div class="box">
<img src="{{icon_url}}" alt="{{value.name}} Logo"/>
</div>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4e6149d5/run_tests
----------------------------------------------------------------------
diff --git a/run_tests b/run_tests
index 7ae6547..9944997 100755
--- a/run_tests
+++ b/run_tests
@@ -30,7 +30,7 @@ import textwrap
CPUS = multiprocessing.cpu_count()
CONCURRENT_SUITES = (CPUS // 4) or CPUS
CONCURRENT_TESTS = (CPUS // CONCURRENT_SUITES) or 1
-PROC_TIMEOUT = 120
+PROC_TIMEOUT = 180
ALT_PKG_PATHS = {
'Allura': 'allura/tests/',
@@ -117,7 +117,7 @@ def run_tests_in_parallel(options, nosetests_args):
return ALT_PKG_PATHS.get(pkg, '')
def get_multiproc_args(pkg):
- if not use_multiproc:
+ if not use_multiproc or options.concurrent_tests == 1:
return ''
return ('--processes={procs_per_suite} --process-timeout={proc_timeout}'.format(
procs_per_suite=options.concurrent_tests,
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4e6149d5/scripts/asf-release.sh
----------------------------------------------------------------------
diff --git a/scripts/asf-release.sh b/scripts/asf-release.sh
index 8e6bfe3..19ac9e5 100755
--- a/scripts/asf-release.sh
+++ b/scripts/asf-release.sh
@@ -83,9 +83,8 @@ Hello,
This is a call for a vote on Apache Allura $VERSION incubating.
-Source tarball and signature are available at:
- https://dist.apache.org/repos/dist/dev/incubator/allura/$RELEASE_BASE.tar.gz
- https://dist.apache.org/repos/dist/dev/incubator/allura/$RELEASE_BASE.tar.gz.asc
+Source tarball, signature and checksums are available at:
+ https://dist.apache.org/repos/dist/dev/incubator/allura/
Checksums:
MD5: $MD5_CHECKSUM