Skip to content

Commit

Permalink
Merge pull request #77 from liminspace/develop
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
liminspace authored Dec 6, 2018
2 parents 9dd6bf1 + acde796 commit 797502c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 31 deletions.
5 changes: 1 addition & 4 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
dist: xenial

language: python

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:
- { 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
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
0.6.0 (2018-12-06)
==================
* 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)
==================
* Fixed Popen PIPE subprocess deadlock by using TemporaryFile for stdout
Expand Down
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``.

Expand All @@ -59,7 +59,7 @@ Usage
Load ``mjml`` in your django template and use ``mjml`` tag that will compile mjml to html::

{% load mjml %}

{% mjml %}
<mjml>
<mj-body>
Expand Down Expand Up @@ -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. ::
Expand Down Expand Up @@ -143,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
Expand Down
2 changes: 1 addition & 1 deletion docker/mjml-tcpserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 1 addition & 1 deletion mjml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.5.4'
__version__ = '0.6.0'

default_app_config = 'mjml.apps.MJMLConfig'
2 changes: 1 addition & 1 deletion mjml/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
1 change: 1 addition & 0 deletions mjml/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)])
Expand Down
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
pip==18.1
setuptools==40.4.3
wheel==0.32.1
setuptools==40.6.2
wheel==0.32.3
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"
9 changes: 0 additions & 9 deletions requirements_2.7.txt

This file was deleted.

0 comments on commit 797502c

Please sign in to comment.