Merge lp:~stephen-stewart/ubuntu-webcatalog/update-global-header into lp:ubuntu-webcatalog

Proposed by Stephen Stewart
Status: Merged
Approved by: Stephen Stewart
Approved revision: 198
Merged at revision: 197
Proposed branch: lp:~stephen-stewart/ubuntu-webcatalog/update-global-header
Merge into: lp:ubuntu-webcatalog
Diff against target: 141 lines (+19/-12)
9 files modified
README (+7/-0)
src/webcatalog/auth.py (+2/-2)
src/webcatalog/management/commands/import_ratings_stats.py (+1/-1)
src/webcatalog/managers.py (+1/-1)
src/webcatalog/models/applications.py (+2/-2)
src/webcatalog/static/js/one-global-navigation-min.js (+1/-1)
src/webcatalog/templatetags/webcatalog.py (+1/-1)
src/webcatalog/tests/test_templatetags.py (+2/-2)
src/webcatalog/views.py (+2/-2)
To merge this branch: bzr merge lp:~stephen-stewart/ubuntu-webcatalog/update-global-header
Reviewer Review Type Date Requested Status
Fabián Ezequiel Gallina (community) Approve
Jonas G. Drange (community) Approve
Review via email: mp+221704@code.launchpad.net

Commit message

update global nav content

Description of the change

update global nav content
(add some helpful info into README)

To post a comment you must log in.
Revision history for this message
Jonas G. Drange (jonas-drange) wrote :

LGTM (looking at the running site only, since code is min)

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (55.9 KiB)

The attempt to merge lp:~stephen-stewart/ubuntu-webcatalog/update-global-header into lp:ubuntu-webcatalog failed. Below is the output from the failed tests.

[localhost] local: /usr/bin/python /usr/bin/virtualenv --no-site-packages virtualenv
The --no-site-packages flag is deprecated; it is now the default behavior.
New python executable in virtualenv/bin/python
Installing distribute.............................................................................................................................................................................................done.
Installing pip...............done.
[localhost] local: virtualenv/bin/pip install -r test_requirements.txt
Downloading/unpacking coverage (from -r test_requirements.txt (line 2))
  Running setup.py egg_info for package coverage

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
Downloading/unpacking mock (from -r test_requirements.txt (line 3))
  Running setup.py egg_info for package mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
Downloading/unpacking piston-mini-client (from -r test_requirements.txt (line 4))
  Downloading piston-mini-client-0.7.5.tar.gz
  Running setup.py egg_info for package piston-mini-client

Downloading/unpacking oauthlib (from piston-mini-client->-r test_requirements.txt (line 4))
  Running setup.py egg_info for package oauthlib

Downloading/unpacking httplib2 (from piston-mini-client->-r test_requirements.txt (line 4))
  Running setup.py egg_info for package httplib2

Installing collected packages: coverage, mock, piston-mini-client, oauthlib, httplib2
  Running setup.py install for coverage
    building 'coverage.tracer' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c coverage/tracer.c -o build/temp.linux-x86_64-2.7/coverage/tracer.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/coverage/tracer.o -o build/lib.linux-x86_64-2.7/coverage/tracer.so

    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    Installing coverage2 script to /mnt/tarmac/cache/ubuntu-webcatalog/merges/trunk/virtualenv/bin
    Installing coverage-2.7 script to /mnt/tarmac/cache/ubuntu-webcatalog/merges/trunk/virtualenv/bin
    Installing coverage script to /mnt/tarmac/cache/ubuntu-webcatalog/merges/trunk/virtualenv/bin
  Running setup.py install for mock

    warning: no files found matching '*.png' under directory 'docs'
    warning: no files found matching '*.css' under directory 'docs'
    warning: no files found matching '*.html' under directory 'docs'
    warning: no files found matching '*.js' under directory 'docs'
  Running setup.py install for piston-mini-client

  Running setup.py install for oauthlib

  Running setup.py install for httplib2

Successfully installed c...

198. By Stephen Stewart

fix pep8 errors

Revision history for this message
Fabián Ezequiel Gallina (fgallina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2012-06-14 23:40:45 +0000
+++ README 2014-06-03 15:09:10 +0000
@@ -31,3 +31,10 @@
3131
32[webcatalog]32[webcatalog]
33sca_api_url = https://software-center.ubuntu.com/api/2.0/33sca_api_url = https://software-center.ubuntu.com/api/2.0/
34
35
36Bootstrap
37---------
38
39sudo apt-get install fabric python-virtualenv python-gtk2
40fab bootstrap
3441
=== modified file 'src/webcatalog/auth.py'
--- src/webcatalog/auth.py 2013-04-16 13:50:24 +0000
+++ src/webcatalog/auth.py 2014-06-03 15:09:10 +0000
@@ -75,8 +75,8 @@
75 request.method, request.build_absolute_uri(), headers=headers,75 request.method, request.build_absolute_uri(), headers=headers,
76 query_string=request.META['QUERY_STRING'])76 query_string=request.META['QUERY_STRING'])
77 if (orequest is None or77 if (orequest is None or
78 not 'oauth_token' in orequest.parameters or78 'oauth_token' not in orequest.parameters or
79 not 'oauth_consumer_key' in orequest.parameters):79 'oauth_consumer_key' not in orequest.parameters):
80 return False80 return False
8181
82 self.prefetch_oauth_consumer(orequest)82 self.prefetch_oauth_consumer(orequest)
8383
=== modified file 'src/webcatalog/management/commands/import_ratings_stats.py'
--- src/webcatalog/management/commands/import_ratings_stats.py 2013-04-09 14:39:10 +0000
+++ src/webcatalog/management/commands/import_ratings_stats.py 2014-06-03 15:09:10 +0000
@@ -76,7 +76,7 @@
76 apps = apps.order_by('package_name')76 apps = apps.order_by('package_name')
7777
78 for app in apps:78 for app in apps:
79 if not app.package_name in stats_dict:79 if app.package_name not in stats_dict:
80 continue80 continue
81 stat = stats_dict[app.package_name]81 stat = stats_dict[app.package_name]
82 app.ratings_average = stat.ratings_average82 app.ratings_average = stat.ratings_average
8383
=== modified file 'src/webcatalog/managers.py'
--- src/webcatalog/managers.py 2012-08-30 13:57:44 +0000
+++ src/webcatalog/managers.py 2014-06-03 15:09:10 +0000
@@ -66,7 +66,7 @@
66class DistroSeriesManager(models.Manager):66class DistroSeriesManager(models.Manager):
6767
68 def get_or_create(self, **kwargs):68 def get_or_create(self, **kwargs):
69 if not 'defaults' in kwargs:69 if 'defaults' not in kwargs:
70 code_name = kwargs.get('code_name', '')70 code_name = kwargs.get('code_name', '')
71 versions = settings.UBUNTU_SERIES_FOR_VERSIONS71 versions = settings.UBUNTU_SERIES_FOR_VERSIONS
72 reverse_versions = dict((v, k) for (k, v) in versions.items())72 reverse_versions = dict((v, k) for (k, v) in versions.items())
7373
=== modified file 'src/webcatalog/models/applications.py'
--- src/webcatalog/models/applications.py 2014-01-10 09:16:37 +0000
+++ src/webcatalog/models/applications.py 2014-06-03 15:09:10 +0000
@@ -128,7 +128,7 @@
128 if getattr(self, '_media_cache', None) is None:128 if getattr(self, '_media_cache', None) is None:
129 self._media_cache = {}129 self._media_cache = {}
130130
131 if not media_type in self._media_cache:131 if media_type not in self._media_cache:
132 medias = self.applicationmedia_set.filter(media_type=media_type)132 medias = self.applicationmedia_set.filter(media_type=media_type)
133 self._media_cache[media_type] = [media.url for media in medias]133 self._media_cache[media_type] = [media.url for media in medias]
134134
@@ -343,7 +343,7 @@
343 name="Can schedule asynchronous tasks via the web",343 name="Can schedule asynchronous tasks via the web",
344 content_type=ct,344 content_type=ct,
345 )345 )
346 if not perm in group.permissions.all():346 if perm not in group.permissions.all():
347 group.permissions.add(perm)347 group.permissions.add(perm)
348 group.save()348 group.save()
349349
350350
=== modified file 'src/webcatalog/static/js/one-global-navigation-min.js'
--- src/webcatalog/static/js/one-global-navigation-min.js 2013-12-13 18:35:22 +0000
+++ src/webcatalog/static/js/one-global-navigation-min.js 2014-06-03 15:09:10 +0000
@@ -1,1 +1,1 @@
1YUI.add("one-global-navigation",function(e,t){"use strict";function n(t,n){t=t||[{url:"www.ubuntu.com",title:"Ubuntu"},{url:"community.ubuntu.com",title:"Community"},{url:"askubuntu.com",title:"Ask!"},{url:"developer.ubuntu.com",title:"Developer"},{url:"design.ubuntu.com",title:"Design"},{url:"discourse.ubuntu.com",title:"Discourse"},{url:"www.ubuntu.com/certification",title:"Hardware"},{url:"shop.ubuntu.com",title:"Shop"},{url:"apps.ubuntu.com",title:"Apps"},{url:"help.ubuntu.com",title:"Help"},{url:"ubuntuforums.org",title:"Forum"},{url:"one.ubuntu.com",title:"Ubuntu One"},{url:"www.launchpad.net",title:"Launchpad"},{url:"juju.ubuntu.com",title:"Juju"},{url:"maas.ubuntu.com",title:"MAAS"},{url:"www.canonical.com",title:"Canonical"}],n=n||7,this.location=document.URL.replace(/https?:\/\//i,"");var r,i,s;r=this.getActiveUrl(t),r&&(t[this.getActiveUrl(t)].active=!0),i=e.Template.Micro.revive(e.U1.Templates["global-nav"]),e.one("body").prepend(i({length:n,links:t})),s=e.one(".u-nav-global-more"),e.one(document).on("click",function(){s.removeClass("u-nav-global-show")}),s.one("a").on("click",function(e){e.preventDefault(),e.stopPropagation(),s.toggleClass("u-nav-global-show")})}n.prototype={getActiveUrl:function(e){var t,n,r,i;return t=new RegExp("^"+this.location,"i"),n=this._filterUrls(e,this.location),r=n&&n.length?this._reduceUrlList(n):n[0],i=r?r.index:!1,i},_filterUrls:function(t,n){return e.Array.filter(t,function(e,t){if(n.toLowerCase().indexOf(e.url)>=0)return e.index=t,!0},this)},_reduceUrlList:function(t){return e.Array.reduce(t,t[0],function(e,t){return e.url.length>t.url.length?e:t},this)}},e.namespace("U1").GlobalNav=n},"0.1.0",{requires:["node","template-micro","array-extras","one-global-navigation-templates"]});1YUI.add("one-global-navigation",function(e,t){"use strict";function n(t,n){t=t||[{url:"www.ubuntu.com",title:"Ubuntu"},{url:"community.ubuntu.com",title:"Community"},{url:"askubuntu.com",title:"Ask!"},{url:"developer.ubuntu.com",title:"Developer"},{url:"design.ubuntu.com",title:"Design"},{url:"discourse.ubuntu.com",title:"Discourse"},{url:"www.ubuntu.com/certification",title:"Hardware"},{url:"insights.ubuntu.com",title:"Insights"},{url:"juju.ubuntu.com",title:"Juju"},{url:"shop.ubuntu.com",title:"Shop"},{url:"apps.ubuntu.com",title:"Apps"},{url:"help.ubuntu.com",title:"Help"},{url:"ubuntuforums.org",title:"Forum"},{url:"www.launchpad.net",title:"Launchpad"},{url:"maas.ubuntu.com",title:"MAAS"},{url:"www.canonical.com",title:"Canonical"}],n=n||9,this.location=document.URL.replace(/https?:\/\//i,"");var r,i,s;r=this.getActiveUrl(t),r&&(t[this.getActiveUrl(t)].active=!0),i=e.Template.Micro.revive(e.U1.Templates["global-nav"]),e.one("body").prepend(i({length:n,links:t})),s=e.one(".u-nav-global-more"),e.one(document).on("click",function(){s.removeClass("u-nav-global-show")}),s.one("a").on("click",function(e){e.preventDefault(),e.stopPropagation(),s.toggleClass("u-nav-global-show")})}n.prototype={getActiveUrl:function(e){var t,n,r,i;return t=new RegExp("^"+this.location,"i"),n=this._filterUrls(e,this.location),r=n&&n.length?this._reduceUrlList(n):n[0],i=r?r.index:!1,i},_filterUrls:function(t,n){return e.Array.filter(t,function(e,t){if(n.toLowerCase().indexOf(e.url)>=0)return e.index=t,!0},this)},_reduceUrlList:function(t){return e.Array.reduce(t,t[0],function(e,t){return e.url.length>t.url.length?e:t},this)}},e.namespace("U1").GlobalNav=n},"0.1.0",{requires:["node","template-micro","array-extras","one-global-navigation-templates"]});
22
=== modified file 'src/webcatalog/templatetags/webcatalog.py'
--- src/webcatalog/templatetags/webcatalog.py 2013-08-26 09:21:40 +0000
+++ src/webcatalog/templatetags/webcatalog.py 2014-06-03 15:09:10 +0000
@@ -136,7 +136,7 @@
136 continue136 continue
137 # get indent level137 # get indent level
138 for j, c in enumerate(part):138 for j, c in enumerate(part):
139 if not c in prefix:139 if c not in prefix:
140 indent_level = j140 indent_level = j
141 break141 break
142 # check if in a enumeration142 # check if in a enumeration
143143
=== modified file 'src/webcatalog/tests/test_templatetags.py'
--- src/webcatalog/tests/test_templatetags.py 2013-02-22 21:02:05 +0000
+++ src/webcatalog/tests/test_templatetags.py 2014-06-03 15:09:10 +0000
@@ -173,7 +173,7 @@
173 context['message_text'])173 context['message_text'])
174174
175175
176#file-roller176# file-roller
177d1 = """177d1 = """
178File-roller is an archive manager for the GNOME environment. It allows you to:178File-roller is an archive manager for the GNOME environment. It allows you to:
179179
@@ -197,7 +197,7 @@
197standard tools for this.197standard tools for this.
198"""198"""
199199
200#drgeo200# drgeo
201d2 = """201d2 = """
202This is the Gtk interactive geometry software. It allows one202This is the Gtk interactive geometry software. It allows one
203to create geometric figure plus the interactive manipulation of such203to create geometric figure plus the interactive manipulation of such
204204
=== modified file 'src/webcatalog/views.py'
--- src/webcatalog/views.py 2013-04-09 14:42:06 +0000
+++ src/webcatalog/views.py 2014-06-03 15:09:10 +0000
@@ -134,7 +134,7 @@
134 seen = set()134 seen = set()
135 top_rated = []135 top_rated = []
136 for app in apps:136 for app in apps:
137 if not app.package_name in seen:137 if app.package_name not in seen:
138 top_rated.append(app)138 top_rated.append(app)
139 seen.add(app.package_name)139 seen.add(app.package_name)
140 if len(top_rated) == settings.NUMBER_TOP_RATED_APPS:140 if len(top_rated) == settings.NUMBER_TOP_RATED_APPS:
@@ -358,7 +358,7 @@
358358
359 def __call__(self, request):359 def __call__(self, request):
360 accept = request.META.get('ACCEPT', '')360 accept = request.META.get('ACCEPT', '')
361 if 'application/json' in accept and not 'text/html' in accept:361 if 'application/json' in accept and 'text/html' not in accept:
362 return self.render_json_error(request)362 return self.render_json_error(request)
363 else:363 else:
364 return self.render_html_error(request)364 return self.render_html_error(request)

Subscribers

People subscribed via source and target branches