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
1=== modified file 'README'
2--- README 2012-06-14 23:40:45 +0000
3+++ README 2014-06-03 15:09:10 +0000
4@@ -31,3 +31,10 @@
5
6 [webcatalog]
7 sca_api_url = https://software-center.ubuntu.com/api/2.0/
8+
9+
10+Bootstrap
11+---------
12+
13+sudo apt-get install fabric python-virtualenv python-gtk2
14+fab bootstrap
15
16=== modified file 'src/webcatalog/auth.py'
17--- src/webcatalog/auth.py 2013-04-16 13:50:24 +0000
18+++ src/webcatalog/auth.py 2014-06-03 15:09:10 +0000
19@@ -75,8 +75,8 @@
20 request.method, request.build_absolute_uri(), headers=headers,
21 query_string=request.META['QUERY_STRING'])
22 if (orequest is None or
23- not 'oauth_token' in orequest.parameters or
24- not 'oauth_consumer_key' in orequest.parameters):
25+ 'oauth_token' not in orequest.parameters or
26+ 'oauth_consumer_key' not in orequest.parameters):
27 return False
28
29 self.prefetch_oauth_consumer(orequest)
30
31=== modified file 'src/webcatalog/management/commands/import_ratings_stats.py'
32--- src/webcatalog/management/commands/import_ratings_stats.py 2013-04-09 14:39:10 +0000
33+++ src/webcatalog/management/commands/import_ratings_stats.py 2014-06-03 15:09:10 +0000
34@@ -76,7 +76,7 @@
35 apps = apps.order_by('package_name')
36
37 for app in apps:
38- if not app.package_name in stats_dict:
39+ if app.package_name not in stats_dict:
40 continue
41 stat = stats_dict[app.package_name]
42 app.ratings_average = stat.ratings_average
43
44=== modified file 'src/webcatalog/managers.py'
45--- src/webcatalog/managers.py 2012-08-30 13:57:44 +0000
46+++ src/webcatalog/managers.py 2014-06-03 15:09:10 +0000
47@@ -66,7 +66,7 @@
48 class DistroSeriesManager(models.Manager):
49
50 def get_or_create(self, **kwargs):
51- if not 'defaults' in kwargs:
52+ if 'defaults' not in kwargs:
53 code_name = kwargs.get('code_name', '')
54 versions = settings.UBUNTU_SERIES_FOR_VERSIONS
55 reverse_versions = dict((v, k) for (k, v) in versions.items())
56
57=== modified file 'src/webcatalog/models/applications.py'
58--- src/webcatalog/models/applications.py 2014-01-10 09:16:37 +0000
59+++ src/webcatalog/models/applications.py 2014-06-03 15:09:10 +0000
60@@ -128,7 +128,7 @@
61 if getattr(self, '_media_cache', None) is None:
62 self._media_cache = {}
63
64- if not media_type in self._media_cache:
65+ if media_type not in self._media_cache:
66 medias = self.applicationmedia_set.filter(media_type=media_type)
67 self._media_cache[media_type] = [media.url for media in medias]
68
69@@ -343,7 +343,7 @@
70 name="Can schedule asynchronous tasks via the web",
71 content_type=ct,
72 )
73- if not perm in group.permissions.all():
74+ if perm not in group.permissions.all():
75 group.permissions.add(perm)
76 group.save()
77
78
79=== modified file 'src/webcatalog/static/js/one-global-navigation-min.js'
80--- src/webcatalog/static/js/one-global-navigation-min.js 2013-12-13 18:35:22 +0000
81+++ src/webcatalog/static/js/one-global-navigation-min.js 2014-06-03 15:09:10 +0000
82@@ -1,1 +1,1 @@
83-YUI.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"]});
84+YUI.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"]});
85
86=== modified file 'src/webcatalog/templatetags/webcatalog.py'
87--- src/webcatalog/templatetags/webcatalog.py 2013-08-26 09:21:40 +0000
88+++ src/webcatalog/templatetags/webcatalog.py 2014-06-03 15:09:10 +0000
89@@ -136,7 +136,7 @@
90 continue
91 # get indent level
92 for j, c in enumerate(part):
93- if not c in prefix:
94+ if c not in prefix:
95 indent_level = j
96 break
97 # check if in a enumeration
98
99=== modified file 'src/webcatalog/tests/test_templatetags.py'
100--- src/webcatalog/tests/test_templatetags.py 2013-02-22 21:02:05 +0000
101+++ src/webcatalog/tests/test_templatetags.py 2014-06-03 15:09:10 +0000
102@@ -173,7 +173,7 @@
103 context['message_text'])
104
105
106-#file-roller
107+# file-roller
108 d1 = """
109 File-roller is an archive manager for the GNOME environment. It allows you to:
110
111@@ -197,7 +197,7 @@
112 standard tools for this.
113 """
114
115-#drgeo
116+# drgeo
117 d2 = """
118 This is the Gtk interactive geometry software. It allows one
119 to create geometric figure plus the interactive manipulation of such
120
121=== modified file 'src/webcatalog/views.py'
122--- src/webcatalog/views.py 2013-04-09 14:42:06 +0000
123+++ src/webcatalog/views.py 2014-06-03 15:09:10 +0000
124@@ -134,7 +134,7 @@
125 seen = set()
126 top_rated = []
127 for app in apps:
128- if not app.package_name in seen:
129+ if app.package_name not in seen:
130 top_rated.append(app)
131 seen.add(app.package_name)
132 if len(top_rated) == settings.NUMBER_TOP_RATED_APPS:
133@@ -358,7 +358,7 @@
134
135 def __call__(self, request):
136 accept = request.META.get('ACCEPT', '')
137- if 'application/json' in accept and not 'text/html' in accept:
138+ if 'application/json' in accept and 'text/html' not in accept:
139 return self.render_json_error(request)
140 else:
141 return self.render_html_error(request)

Subscribers

People subscribed via source and target branches