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 20:18:50 UTC

[2/4] git commit: [#7185] move project list conditionals from the template to the data fetching logic

[#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/cj/7128
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