From 80743692e228991e4b6525fc5bb4c41a02180192 Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Wed, 14 Nov 2018 01:08:51 +0200 Subject: [PATCH 1/7] Updated requirements and pyup config --- .pyup.yml | 5 +---- requirements.txt | 10 ++++++---- requirements_2.7.txt | 9 --------- 3 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 requirements_2.7.txt diff --git a/.pyup.yml b/.pyup.yml index cb0fc38..ba03f36 100644 --- a/.pyup.yml +++ b/.pyup.yml @@ -1,11 +1,8 @@ branch: develop -schedule: "every week on wednesday" +schedule: "every month" search: False requirements: - requirements.txt: update: all pin: True - - requirements_2.7.txt: - update: insecure - pin: True diff --git a/requirements.txt b/requirements.txt index 17fbcfc..551b51b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,10 @@ pip==18.1 -setuptools==40.4.3 -wheel==0.32.1 +setuptools==40.6.2 +wheel==0.32.2 twine==1.12.1 -django>=1.8,<2.2 -coverage==4.5.1 +django<1.12; python_version < "3" +django>=1.8,<2.2; python_version >= "3" +coverage==4.5.2 six==1.11.0 +ndg-httpsclient==0.5.1; python_version < "3" diff --git a/requirements_2.7.txt b/requirements_2.7.txt deleted file mode 100644 index 47a9f89..0000000 --- a/requirements_2.7.txt +++ /dev/null @@ -1,9 +0,0 @@ -pip==18.1 -setuptools==40.4.3 -wheel==0.32.1 -twine==1.12.1 - -django<1.12 -coverage==4.5.1 -six==1.11.0 -ndg-httpsclient==0.5.1 From 4810dd8e356b586704fc554fd078a89fadd726e1 Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 02:26:33 +0200 Subject: [PATCH 2/7] * Added Python 3.7 in tests * Added MJML v.4.2.1 in tests --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 866b7da..4ad3c37 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,37 +4,44 @@ python: - "2.7" - "3.5" - "3.6" + - "3.7" env: - DJANGO_VERSION="<1.9" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.9" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.9" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.9" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<1.9" MJML_VERSION=4.2.1 - DJANGO_VERSION="<1.10" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.10" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.10" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.10" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<1.10" MJML_VERSION=4.2.1 - DJANGO_VERSION="<1.11" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.11" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.11" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.11" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<1.11" MJML_VERSION=4.2.1 - DJANGO_VERSION="<1.12" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.12" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.12" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.12" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<1.12" MJML_VERSION=4.2.1 - DJANGO_VERSION="<2.1" MJML_VERSION=2.3.3 - DJANGO_VERSION="<2.1" MJML_VERSION=3.3.5 - DJANGO_VERSION="<2.1" MJML_VERSION=4.0.5 - DJANGO_VERSION="<2.1" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<2.1" MJML_VERSION=4.2.1 - DJANGO_VERSION="<2.2" MJML_VERSION=2.3.3 - DJANGO_VERSION="<2.2" MJML_VERSION=3.3.5 - DJANGO_VERSION="<2.2" MJML_VERSION=4.0.5 - DJANGO_VERSION="<2.2" MJML_VERSION=4.1.2 + - DJANGO_VERSION="<2.2" MJML_VERSION=4.2.1 matrix: exclude: From f174d17cd91bd244693d83bc2dc3d56e3a4baf78 Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 02:27:04 +0200 Subject: [PATCH 3/7] Added `MJML_CHECK_CMD_ON_STARTUP` setting --- CHANGELOG.md | 6 ++++++ README.rst | 8 ++++++-- mjml/apps.py | 2 +- mjml/settings.py | 1 + requirements.txt | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09b4d13..5bc84ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +0.5.5 (2018-12-) +================== + * Added `MJML_CHECK_CMD_ON_STARTUP` setting (thanks to Marcel Chastain) + * Added Python 3.7 in tests + * Added MJML v.4.2.1 in tests + 0.5.4 (2018-10-19) ================== * Fixed Popen PIPE subprocess deadlock by using TemporaryFile for stdout diff --git a/README.rst b/README.rst index 07b67a8..63a2b05 100644 --- a/README.rst +++ b/README.rst @@ -40,7 +40,7 @@ See https://github.com/mjmlio/mjml#installation and https://mjml.io/documentatio * Via setuptools:: $ easy_install django-mjml - + For install development version use ``git+https://github.com/liminspace/django-mjml.git@develop`` instead ``django-mjml``. @@ -59,7 +59,7 @@ Usage Load ``mjml`` in your django template and use ``mjml`` tag that will compile mjml to html:: {% load mjml %} - + {% mjml %} @@ -96,6 +96,10 @@ Also you can pass addition cmd arguments, for example:: MJML_EXEC_CMD = ['node_modules/.bin/mjml', '--config.minify', 'true', '--config.validationLevel', 'strict'] +Once you have a working installation, you can skip the sanity check on startup to speed things up:: + + MJML_CHECK_CMD_ON_STARTUP = False + **tcpserver mode** This mode is faster than ``cmd`` but it needs run a server process in background. :: diff --git a/mjml/apps.py b/mjml/apps.py index 2e9f89a..560888a 100644 --- a/mjml/apps.py +++ b/mjml/apps.py @@ -26,5 +26,5 @@ class MJMLConfig(AppConfig): verbose_name = 'Use MJML in Django templates' def ready(self): - if mjml_settings.MJML_BACKEND_MODE == 'cmd': + if mjml_settings.MJML_BACKEND_MODE == 'cmd' and mjml_settings.MJML_CHECK_CMD_ON_STARTUP: check_mjml_command() diff --git a/mjml/settings.py b/mjml/settings.py index 1461300..bff9648 100644 --- a/mjml/settings.py +++ b/mjml/settings.py @@ -5,6 +5,7 @@ # cmd backend mode configs MJML_EXEC_CMD = getattr(settings, 'MJML_EXEC_CMD', 'mjml') +MJML_CHECK_CMD_ON_STARTUP = getattr(settings, 'MJML_CHECK_CMD_ON_STARTUP', True) # tcpserver backend mode configs MJML_TCPSERVERS = getattr(settings, 'MJML_TCPSERVERS', [('127.0.0.1', 28101)]) diff --git a/requirements.txt b/requirements.txt index 551b51b..2697aea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ pip==18.1 setuptools==40.6.2 -wheel==0.32.2 +wheel==0.32.3 twine==1.12.1 django<1.12; python_version < "3" From c570b4d3f0395ff335707b113fbc1a49d16ef24d Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 02:48:14 +0200 Subject: [PATCH 4/7] Updated MJML to 4.2.1 in docker --- docker/mjml-tcpserver/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/mjml-tcpserver/Dockerfile b/docker/mjml-tcpserver/Dockerfile index b840b51..bb9fe4a 100644 --- a/docker/mjml-tcpserver/Dockerfile +++ b/docker/mjml-tcpserver/Dockerfile @@ -1,6 +1,6 @@ FROM node:8-stretch -ARG MJML_VERSION=4.1.2 +ARG MJML_VERSION=4.2.1 ARG APP_DIR=/app RUN npm install mjml@${MJML_VERSION} From 1fb57fb571d473572fe5a0e255d106bec577b30e Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 02:54:03 +0200 Subject: [PATCH 5/7] * Removed MJML v.2.3.3 from tests * Updated MJML to 4.2.1 in docker --- .travis.yml | 10 ++-------- CHANGELOG.md | 4 +++- mjml/__init__.py | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4ad3c37..8c3047b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,37 +7,31 @@ python: - "3.7" env: - - DJANGO_VERSION="<1.9" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.9" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.9" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.9" MJML_VERSION=4.1.2 - DJANGO_VERSION="<1.9" MJML_VERSION=4.2.1 - - DJANGO_VERSION="<1.10" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.10" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.10" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.10" MJML_VERSION=4.1.2 - DJANGO_VERSION="<1.10" MJML_VERSION=4.2.1 - - DJANGO_VERSION="<1.11" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.11" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.11" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.11" MJML_VERSION=4.1.2 - DJANGO_VERSION="<1.11" MJML_VERSION=4.2.1 - - DJANGO_VERSION="<1.12" MJML_VERSION=2.3.3 - DJANGO_VERSION="<1.12" MJML_VERSION=3.3.5 - DJANGO_VERSION="<1.12" MJML_VERSION=4.0.5 - DJANGO_VERSION="<1.12" MJML_VERSION=4.1.2 - DJANGO_VERSION="<1.12" MJML_VERSION=4.2.1 - - DJANGO_VERSION="<2.1" MJML_VERSION=2.3.3 - DJANGO_VERSION="<2.1" MJML_VERSION=3.3.5 - DJANGO_VERSION="<2.1" MJML_VERSION=4.0.5 - DJANGO_VERSION="<2.1" MJML_VERSION=4.1.2 - DJANGO_VERSION="<2.1" MJML_VERSION=4.2.1 - - DJANGO_VERSION="<2.2" MJML_VERSION=2.3.3 - DJANGO_VERSION="<2.2" MJML_VERSION=3.3.5 - DJANGO_VERSION="<2.2" MJML_VERSION=4.0.5 - DJANGO_VERSION="<2.2" MJML_VERSION=4.1.2 @@ -45,15 +39,15 @@ env: matrix: exclude: - - { python: "2.7", env: DJANGO_VERSION="<2.1" MJML_VERSION=2.3.3 } - { python: "2.7", env: DJANGO_VERSION="<2.1" MJML_VERSION=3.3.5 } - { python: "2.7", env: DJANGO_VERSION="<2.1" MJML_VERSION=4.0.5 } - { python: "2.7", env: DJANGO_VERSION="<2.1" MJML_VERSION=4.1.2 } + - { python: "2.7", env: DJANGO_VERSION="<2.1" MJML_VERSION=4.2.1 } - - { python: "2.7", env: DJANGO_VERSION="<2.2" MJML_VERSION=2.3.3 } - { python: "2.7", env: DJANGO_VERSION="<2.2" MJML_VERSION=3.3.5 } - { python: "2.7", env: DJANGO_VERSION="<2.2" MJML_VERSION=4.0.5 } - { python: "2.7", env: DJANGO_VERSION="<2.2" MJML_VERSION=4.1.2 } + - { python: "2.7", env: DJANGO_VERSION="<2.2" MJML_VERSION=4.2.1 } before_install: - . $HOME/.nvm/nvm.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bc84ea..dfbcf7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ -0.5.5 (2018-12-) +0.6.0 (2018-12-) ================== * Added `MJML_CHECK_CMD_ON_STARTUP` setting (thanks to Marcel Chastain) * Added Python 3.7 in tests * Added MJML v.4.2.1 in tests + * Removed MJML v.2.3.3 from tests + * Updated MJML to 4.2.1 in docker 0.5.4 (2018-10-19) ================== diff --git a/mjml/__init__.py b/mjml/__init__.py index 4ba289f..bc78757 100644 --- a/mjml/__init__.py +++ b/mjml/__init__.py @@ -1,3 +1,3 @@ -__version__ = '0.5.4' +__version__ = '0.6.0' default_app_config = 'mjml.apps.MJMLConfig' From 7f97b7eb2fe3c924bfe47d6b3a87259193ce8fa8 Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 02:58:13 +0200 Subject: [PATCH 6/7] Updated travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 8c3047b..e2b9988 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ +dist: xenial + language: python python: From acde796fb411c3844ef550273f993dccaf0b02d9 Mon Sep 17 00:00:00 2001 From: Igor Melnyk Date: Thu, 6 Dec 2018 22:57:30 +0200 Subject: [PATCH 7/7] Updated docs --- CHANGELOG.md | 2 +- README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfbcf7e..3523d1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -0.6.0 (2018-12-) +0.6.0 (2018-12-06) ================== * Added `MJML_CHECK_CMD_ON_STARTUP` setting (thanks to Marcel Chastain) * Added Python 3.7 in tests diff --git a/README.rst b/README.rst index 63a2b05..84c08f8 100644 --- a/README.rst +++ b/README.rst @@ -147,7 +147,7 @@ Or you can use docker-compose:: image: liminspace/mjml-tcpserver:latest restart: always ports: - - "28101:28101" + - "28101:28101" mjml-2: image: liminspace/mjml-tcpserver:latest