Commit Graph

203 Commits

Author SHA1 Message Date
Leo Hemsted
501187a9f4 bump utils to 13.0.1
brings in a fix to InvalidEmail/Phone/AddressExceptions not being
instantiated correctly. `exception.message` is not a python standard,
so we shouldn't be relying on it to transmit exception reasons -
rather we should be using `str(exception)` instead. This involved a
handful of small changes to the schema validation
2017-01-09 16:37:58 +00:00
Leo Hemsted
bf0abce4a3 update python-client version
also unpin the patch version, since it shouldn't matter what patch
we're on provided that the function signatures are the same
2016-12-22 13:53:33 +00:00
Leo Hemsted
5cbe4eb5b2 use cloudfront instead of flask to serve static images
branding in emails was previously hosted from admin app - this changes
the url to be static.{domain}/images instead of {domain}/static/images,
which redirects to cloudfront.

some manipulation of the URL was required to make sure it still serves
locally rather than returning "static.localhost:6012" for example.

(if ADMIN_BASE_URL is localhost it just returns the old /static/
path)

also was able to remove DB interaction from a test. woo!
2016-12-21 16:35:16 +00:00
Chris Hill-Scott
0cc94bc87b Include content count fix
Includes:
- [x] https://github.com/alphagov/notifications-utils/pull/102
2016-12-14 15:51:59 +00:00
Chris Hill-Scott
59af44d7ab Update utils to 12.0.0
Includes:

- [x] https://github.com/alphagov/notifications-utils/pull/94 (breaking
      changes which are responsible for all the changes to the API in
      this PR)

The test for `get_sms_fragment_count` has been removed because this
method is already tested in utils here:

ac20f7e99e/tests/test_base_template.py (L140-L159)
2016-12-13 10:57:01 +00:00
Martyn Inglis
869cf48eff Latest version 2016-12-06 16:51:46 +00:00
Chris Hill-Scott
1e4274655a Bump utils version to really bring in latest changes 2016-12-06 09:45:39 +00:00
Martyn Inglis
3342ca2993 Bumped version 2016-12-02 16:56:23 +00:00
Martyn Inglis
9fb378021c Bumped version to use latest utils
- note this is not yet published so will break.....
- sorts out an issue with service id logging
2016-12-01 17:24:23 +00:00
Martyn Inglis
9667d42008 Minor bump of utils 2016-12-01 12:47:33 +00:00
Martyn Inglis
5ae21bf1d5 Bumped requirements version 2016-12-01 11:34:38 +00:00
minglis
2e1578656b Merge pull request #735 from alphagov/caching-with-redis
Caching with redis
2016-11-25 09:06:12 +00:00
Rebecca Law
8cf324de85 Update python client from version 2.0.0 to 3.0.0 2016-11-22 14:59:14 +00:00
Martyn Inglis
7cfc58c994 Merge branch 'master' into caching-with-redis
Conflicts:
	app/celery/tasks.py
	tests/app/celery/test_tasks.py
2016-11-21 13:10:22 +00:00
Chris Hill-Scott
d51c63cb6b Merge pull request #722 from alphagov/whitepace-in-personalisation
Ignore case and whitespace in personalisation keys
2016-11-11 11:33:37 +01:00
Chris Hill-Scott
8474344c9a Ignore case and whitespace in personalisation keys
From a support ticket:

> it's possible to add a personalisation token with trailing whitespace
> (eg. "key " rather than "key"). Can this be trimmed in the UI to guard
> against this? (one of our devs copied and pasted it from a document
> and inadvertently included the space)

> Nothing major but caused a few hours of investigations!

Rather than trim the placeholder in the template, we should treat
placeholders in API calls the same way we do with CSV files, ie we
ignore case and spacing in the name of the placeholder. So
`(( First Name))` is equivalent to `((first_name))`, and both would be
populated with a dictionary like `{'firstName': 'Chris'}`.

Depends on:
- [x] https://github.com/alphagov/notifications-utils/pull/77
2016-11-10 11:40:00 +00:00
Martyn Inglis
eb94fe6c0a Adding Flask-Redis to the project.
[https://pypi.python.org/pypi/Flask-Redis/0.1.0](https://pypi.python.org/pypi/Flask-Redis/0.1.0)

Initial addition as we think about redis as cache.
2016-11-10 11:27:57 +00:00
Martyn Inglis
aea2356ae1 Initial SPIKE into redis for cache 2016-11-07 11:55:59 +00:00
Leo Hemsted
f089b75129 update python client to 2.0.0
this is to prevent 500 errors because <2.0.0 raised AssertionError
if supplied JWT tokens were incorrectly formatted

tests added
2016-11-03 17:05:25 +00:00
bandesz
edf22860e1 Bump boto version to 2.43.0-patch3 2016-11-02 17:59:09 +00:00
Rebecca Law
83f3c92c24 Move jsonschema to requirements.txt to missing dependency 2016-11-02 14:02:06 +00:00
Chris Hill-Scott
9192ff137f Bump utils
Includes:
- [ ] https://github.com/alphagov/notifications-utils/pull/75
2016-10-31 09:21:18 +00:00
bandesz
a675509b5e Bump up boto version to 2.42.0-patch2 2016-10-17 18:10:16 +01:00
bandesz
cffedb1a05 Use custom patched boto: 2.42.0-patch1 2016-10-17 16:42:41 +01:00
Leo Hemsted
8aaa444489 bump notification-utils to 9.0.5
includes improved email validation regex
2016-10-11 17:04:42 +01:00
Chris Hill-Scott
210ed6b912 Fix HTML lists in Microsoft Outlook
Depends on:
- [x] https://github.com/alphagov/notifications-utils/pull/69
2016-09-15 11:10:50 +01:00
Chris Hill-Scott
e3af4b48da Bump utils version
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/68
2016-09-14 10:29:45 +01:00
Chris Hill-Scott
1e235fc0cf Update Python client
Just so that nobody else has to do it.

Implements:
- [x] https://github.com/alphagov/notifications-python-client/pull/29

Which is a breaking change requiring the renaming of method arguments.
2016-09-08 16:08:30 +01:00
Rebecca Law
727c00af21 Merge pull request #659 from alphagov/update-requirements
Update requirements
2016-09-06 14:16:31 +01:00
Chris Hill-Scott
3b6905b98d Update requirements
Brings in:
- [x] https://github.com/alphagov/notifications-utils/pull/67
2016-09-06 10:53:34 +01:00
Rebecca Law
96a1d1a135 Update celery requirement 2016-09-05 17:00:16 +01:00
Rebecca Law
4d1c34fcce A little bit of clean up.
- Remove the deploy to staging | live links in the README
- Update most of the outdated requirements. Left Flask update out for now.
2016-09-05 16:45:54 +01:00
Leo Hemsted
95e3f39c6f Merge pull request #632 from alphagov/readme-cleanup
cleaned up readme + environment file
2016-08-31 17:08:49 +01:00
Chris Hill-Scott
f7391da350 Don’t prefix text messages is sender name is set
Implements:
- [x] https://github.com/alphagov/notifications-utils/pull/66
2016-08-26 14:45:01 +01:00
Leo Hemsted
62e5361b0c cleaned up environment file
* sorted list in README and environment_test.sh
* removed some unused vars
* cleaned up some names to be more accurate in the readme
* removed twilio as a dependency
2016-08-24 16:23:11 +01:00
Leo Hemsted
0a052d45a8 actually bump version
missed a number last time 😧
2016-08-22 14:40:02 +01:00
Leo Hemsted
d5ec73bc8a update utils version 2016-08-22 13:38:45 +01:00
Martyn Inglis
99a8a4f7ce Bumped utils version 2016-08-08 12:29:01 +01:00
Martyn Inglis
365019461b Updated utils version 2016-08-05 13:53:46 +01:00
Chris Hill-Scott
482a435e66 Fix newlines in HTML emails
Implements:
- [ ] https://github.com/alphagov/notifications-utils/pull/60
2016-08-01 14:23:10 +01:00
Chris Hill-Scott
d8ab82b139 Fix Markdown/HTML email oddities
Depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/59
2016-08-01 11:16:18 +01:00
Chris Hill-Scott
68fd4947cb Update utils for Markdown parsing + subbranding
Markdown parsing (will be active but isn’t documented):
- [x] https://github.com/alphagov/notifications-utils/pull/54

Email sub branding (not used yet):
- [x] https://github.com/alphagov/notifications-utils/pull/55

Required modification to the email preview endpoint to make sure that
it only included the message and not any HTML.
2016-07-22 11:09:23 +01:00
Chris Hill-Scott
ba1c1fd07a Upgrade bleach to fix dodgy html5lib version
Bleach 1.4.2 installs html5lib version 0.999 or greater.

This was fine, until version 0.999999999 (nine nines was released, which
doesn’t work.

Bleach 1.4.3 pins html5lib to 0.9999999 (seven nines), which stops the
bad version getting installed.
2016-07-15 13:39:23 +01:00
Chris Hill-Scott
a4a934f6ba Add formatting of emails, conditional placeholders
Implements and depends on:
- [x] https://github.com/alphagov/notifications-utils/pull/45
- [x] https://github.com/alphagov/notifications-utils/pull/47
- [x] https://github.com/alphagov/notifications-utils/pull/48
- [x] https://github.com/alphagov/notifications-utils/pull/50
- [ ] https://github.com/alphagov/notifications-utils/pull/51
- [ ] https://github.com/alphagov/notifications-utils/pull/52

Should be deployed ahead of the admin side of these features, which
is in: https://github.com/alphagov/notifications-admin/pull/781
2016-07-13 15:10:54 +01:00
Chris Hill-Scott
a8a556d02a Use PassThrough renderer
Implements and depends on:
- [ ] https://github.com/alphagov/notifications-utils/pull/49
2016-07-07 22:48:07 +01:00
Chris Hill-Scott
824085ead8 Bring in changes to template and CSV processing
Functional changes:
- adds the blue bar

Performance changes
- faster CSV processing

Depends on:

- [ ] https://github.com/alphagov/notifications-utils/pull/47
- [ ] https://github.com/alphagov/notifications-utils/pull/48

Also brings in some breaking changes, which do not affect utils (apart
from a weird import).
2016-07-07 15:44:30 +01:00
Chris Hill-Scott
5e0033e36d Merge pull request #488 from alphagov/email-breathing-room
Add breathing room around GOV.UK logo in emails
2016-07-01 13:50:08 +01:00
Chris Hill-Scott
0358bdfe05 Add breathing room around GOV.UK logo in emails
Implements and depends on:

- [ ] https://github.com/alphagov/notifications-utils/pull/44
2016-06-30 15:27:21 +01:00
Chris Hill-Scott
7c3d25a87a Publish a Swagger specification
Adds a new endpoint (`/spec`) which returns a the specification of the
API in Swagger-formatted JSON.

This means we will have something to point frontends at, so we can
evaluate which ones we like.

Right now it’s all hand-defined. If we were consistent about our use of
Marshmallow we could generated the spec from the Marshmallow schemas.
2016-06-29 12:07:32 +01:00
Chris Hill-Scott
03192b81c5 Make URLs appear as links in email clients
Implements: https://github.com/alphagov/notifications-utils/pull/42
2016-06-07 16:21:27 +01:00