From 96d04417638ac56b1b5b08263307d4acf6b82aac Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sun, 17 May 2015 18:27:46 -0400 Subject: [PATCH 1/4] Here's a global notice about site disruption I tried implementing this using our js notification system, but that doesn't support HTML that I can tell. I wanted to include links. The content area is the best place I could quickly find to put this, but that's not available on the unauthenticated homepage, so as a quick hack this PR redirects / to /about/ for anon. --- templates/base.html | 13 +++++++++++++ www/index.html.spt | 3 +++ 2 files changed, 16 insertions(+) diff --git a/templates/base.html b/templates/base.html index 585bb3a7ee..5882e0647f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -63,6 +63,19 @@

+ +
Gratipay is currently in the midst of a + major transition, which is causing some disruption on the site. Here + is a list of known +issues. Sorry for the trouble, and thanks for your patience as we work to +stabilize Gratipay as quickly as possible. As always, feel free to get in touch +privately via email or publicly via GitHub.
+ + {% block heading %}{% if title %}

{{ title }}

{% endif %}{% endblock %} {% block subnav %}{% endblock %} {% block content %}{% endblock %} diff --git a/www/index.html.spt b/www/index.html.spt index 67a458da0a..4a4b8f1def 100644 --- a/www/index.html.spt +++ b/www/index.html.spt @@ -1,5 +1,8 @@ [---] +if user.ANON: + request.redirect('/about/') + if not user.ANON: participant = user.participant title = participant.username From a40abafe003138b06ae0c91b5d85a60fb504c08d Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sun, 17 May 2015 18:41:59 -0400 Subject: [PATCH 2/4] Fix tests for temp homepage redirect --- tests/py/test_hooks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/py/test_hooks.py b/tests/py/test_hooks.py index 94fe4c5b39..1cc0a6e68d 100644 --- a/tests/py/test_hooks.py +++ b/tests/py/test_hooks.py @@ -130,7 +130,7 @@ def test_caching_of_assets_with_etag(self): assert not r.headers.cookie def test_caching_of_simplates(self): - r = self.client.GET('/') + r = self.client.GET('/about/') assert r.headers['Cache-Control'] == 'no-cache' assert 'Vary' not in r.headers @@ -147,7 +147,7 @@ def test_bad_csrf_cookie(self): assert r.headers.cookie[b'csrf_token'].value != 'bad_token' def test_csrf_cookie_set_for_most_requests(self): - r = self.client.GET('/') + r = self.client.GET('/about/') assert b'csrf_token' in r.headers.cookie def test_no_csrf_cookie_set_for_assets(self): From e002194a23861113660f5503bbe92165eb35fb74 Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sun, 17 May 2015 18:44:01 -0400 Subject: [PATCH 3/4] Specify protocol in email link --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 5882e0647f..354bf9f21b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -72,7 +72,7 @@

known issues. Sorry for the trouble, and thanks for your patience as we work to stabilize Gratipay as quickly as possible. As always, feel free to get in touch -privately via email or publicly via email or publicly via GitHub.

From d90a082ea895ad764c2fbd6fe113317e7c5673ac Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sun, 17 May 2015 18:50:36 -0400 Subject: [PATCH 4/4] Turn off a jstest, too --- tests/js/test_homepage.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/js/test_homepage.js b/tests/js/test_homepage.js index 18a7ba76fa..e1f3c29872 100644 --- a/tests/js/test_homepage.js +++ b/tests/js/test_homepage.js @@ -1,6 +1,8 @@ var assert = require('assert'); describe('homepage', function() { + /* + * https://github.com/gratipay/gratipay.com/pull/3452 it('should render copy correctly', function(done) { browser .url('http://localhost:8537') @@ -12,4 +14,5 @@ describe('homepage', function() { }) .call(done); }); + */ });