Skip to content

Commit

Permalink
[fc] Repository: plone.recipe.zope2instance
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2020-06-26T16:01:51+02:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: plone/plone.recipe.zope2instance@47f2b44

Fix flake8
Fixes #139

Files changed:
A news/139.bugfix
M src/plone/recipe/zope2instance/recipe.py
Repository: plone.recipe.zope2instance

Branch: refs/heads/master
Date: 2020-06-27T09:28:27+02:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: plone/plone.recipe.zope2instance@44a4f84

Fixup

Files changed:
M src/plone/recipe/zope2instance/recipe.py
Repository: plone.recipe.zope2instance

Branch: refs/heads/master
Date: 2020-06-27T10:53:58+02:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: plone/plone.recipe.zope2instance@d573d76

Adapt tests

Files changed:
M src/plone/recipe/zope2instance/tests/zope2instance.txt
M src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt
Repository: plone.recipe.zope2instance

Branch: refs/heads/master
Date: 2020-06-27T11:46:39+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: plone/plone.recipe.zope2instance@d9b4c2e

Merge pull request #140 from plone/139.bugfix

Fix flake8

Files changed:
A news/139.bugfix
M src/plone/recipe/zope2instance/recipe.py
M src/plone/recipe/zope2instance/tests/zope2instance.txt
M src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt
  • Loading branch information
mauritsvanrees committed Jun 27, 2020
1 parent ec58cc8 commit c3669a4
Showing 1 changed file with 60 additions and 7 deletions.
67 changes: 60 additions & 7 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,68 @@
Repository: mockup
Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2020-06-24T16:35:50+02:00
Author: Vincent Fretin (vincentfretin) <vincent.fretin@gmail.com>
Commit: https://github.com/plone/mockup/commit/af672aede8cb09f1983e6949df96bf7b855227d9
Date: 2020-06-26T16:01:51+02:00
Author: ale-rt (ale-rt) <alessandro.pisa@gmail.com>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/47f2b445b613e1ddc77ff5f1b7ea111f633c7857

keep original date in data-date attribute if it comes from innerHTML, this should fix a warning with moment trying to convert a date from an already localized date that happen only in minified build
Fix flake8
Fixes #139

Files changed:
M mockup/patterns/moment/pattern.js
A news/139.bugfix
M src/plone/recipe/zope2instance/recipe.py

b"diff --git a/mockup/patterns/moment/pattern.js b/mockup/patterns/moment/pattern.js\nindex 9b1e60b6b..17674bcd4 100644\n--- a/mockup/patterns/moment/pattern.js\n+++ b/mockup/patterns/moment/pattern.js\n@@ -153,6 +153,9 @@ define([\n var date = $el.attr('data-date');\n if (!date) {\n date = $.trim($el.html());\n+ if (date && date !== 'None') {\n+ $el.attr('data-date', date);\n+ }\n }\n if (!date || date === 'None') {\n return;\n"
b'diff --git a/news/139.bugfix b/news/139.bugfix\nnew file mode 100644\nindex 0000000..6e39e64\n--- /dev/null\n+++ b/news/139.bugfix\n@@ -0,0 +1 @@\n+Fix flake8 [ale-rt]\ndiff --git a/src/plone/recipe/zope2instance/recipe.py b/src/plone/recipe/zope2instance/recipe.py\nindex 446b337..9ced5c9 100644\n--- a/src/plone/recipe/zope2instance/recipe.py\n+++ b/src/plone/recipe/zope2instance/recipe.py\n@@ -296,7 +296,7 @@ def build_zope_conf(self):\n chameleon_cache = \'CHAMELEON_CACHE {}\'.format(chameleon_cache)\n if environment_vars and \'\\n\' in environment_vars:\n # default case\n- environment_vars += \'\\n\'.format(chameleon_cache)\n+ environment_vars += \'\\n\'\n elif environment_vars:\n # handle case of all vars in one line\n environment_vars += \' {}\'.format(chameleon_cache)\n@@ -717,9 +717,9 @@ def is_rs_option(name):\n enable_products=enable_products,\n zope_conf_additional=zope_conf_additional,)\n \n- zope_conf = \'\\n\'.join([l\n- for l in zope_conf.splitlines()\n- if l.rstrip()])\n+ zope_conf = "\\n".join(\n+ [line for line in zope_conf.splitlines() if line.rstrip()]\n+ )\n zope_conf_path = os.path.join(location, \'etc\', \'zope.conf\')\n with open(zope_conf_path, \'w\') as f:\n f.write(zope_conf)\n'

Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2020-06-27T09:28:27+02:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/44a4f844638f2290cdfe935a0eb6a24e9723cc4e

Fixup

Files changed:
M src/plone/recipe/zope2instance/recipe.py

b"diff --git a/src/plone/recipe/zope2instance/recipe.py b/src/plone/recipe/zope2instance/recipe.py\nindex 9ced5c9..47774be 100644\n--- a/src/plone/recipe/zope2instance/recipe.py\n+++ b/src/plone/recipe/zope2instance/recipe.py\n@@ -296,7 +296,7 @@ def build_zope_conf(self):\n chameleon_cache = 'CHAMELEON_CACHE {}'.format(chameleon_cache)\n if environment_vars and '\\n' in environment_vars:\n # default case\n- environment_vars += '\\n'\n+ environment_vars += '\\n{}'.format(chameleon_cache)\n elif environment_vars:\n # handle case of all vars in one line\n environment_vars += ' {}'.format(chameleon_cache)\n"

Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2020-06-27T10:53:58+02:00
Author: ale-rt (ale-rt) <[email protected]>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/d573d76350ee9d7e485533f867b02400c92ec6dc

Adapt tests

Files changed:
M src/plone/recipe/zope2instance/tests/zope2instance.txt
M src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt

b'diff --git a/src/plone/recipe/zope2instance/tests/zope2instance.txt b/src/plone/recipe/zope2instance/tests/zope2instance.txt\nindex 891049c..bbcf308 100644\n--- a/src/plone/recipe/zope2instance/tests/zope2instance.txt\n+++ b/src/plone/recipe/zope2instance/tests/zope2instance.txt\n@@ -1445,8 +1445,11 @@ Our environment variables should be set now::\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n >>> import re\n >>> env_vars = re.compile(r"<environment>\\n\\s*(?P<vars>.*)\\n</environment>", re.M | re.S)\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n+ CHAMELEON_CACHE .../var/cache\n \n Several all on one line::\n \ndiff --git a/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt b/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\nindex 51921db..c12321b 100644\n--- a/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\n+++ b/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\n@@ -1737,8 +1737,10 @@ Our environment variables should be set now::\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n >>> import re\n >>> env_vars = re.compile(r"<environment>\\n\\s*(?P<vars>.*)\\n</environment>", re.M | re.S)\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n \n Several all on one line::\n \n@@ -1770,8 +1772,10 @@ Our environment variables should be set now::\n >>> instance = os.path.join(sample_buildout, \'parts\', \'instance\')\n >>> zope_conf = open(os.path.join(instance, \'etc\', \'zope.conf\')).read()\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n \n \n HTTP server\n'

Repository: plone.recipe.zope2instance


Branch: refs/heads/master
Date: 2020-06-27T11:46:39+02:00
Author: Maurits van Rees (mauritsvanrees) <[email protected]>
Commit: https://github.com/plone/plone.recipe.zope2instance/commit/d9b4c2e6aad904b46dda1779c46f3054ca6f903e

Merge pull request #140 from plone/139.bugfix

Fix flake8

Files changed:
A news/139.bugfix
M src/plone/recipe/zope2instance/recipe.py
M src/plone/recipe/zope2instance/tests/zope2instance.txt
M src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt

b'diff --git a/news/139.bugfix b/news/139.bugfix\nnew file mode 100644\nindex 0000000..6e39e64\n--- /dev/null\n+++ b/news/139.bugfix\n@@ -0,0 +1 @@\n+Fix flake8 [ale-rt]\ndiff --git a/src/plone/recipe/zope2instance/recipe.py b/src/plone/recipe/zope2instance/recipe.py\nindex 446b337..47774be 100644\n--- a/src/plone/recipe/zope2instance/recipe.py\n+++ b/src/plone/recipe/zope2instance/recipe.py\n@@ -296,7 +296,7 @@ def build_zope_conf(self):\n chameleon_cache = \'CHAMELEON_CACHE {}\'.format(chameleon_cache)\n if environment_vars and \'\\n\' in environment_vars:\n # default case\n- environment_vars += \'\\n\'.format(chameleon_cache)\n+ environment_vars += \'\\n{}\'.format(chameleon_cache)\n elif environment_vars:\n # handle case of all vars in one line\n environment_vars += \' {}\'.format(chameleon_cache)\n@@ -717,9 +717,9 @@ def is_rs_option(name):\n enable_products=enable_products,\n zope_conf_additional=zope_conf_additional,)\n \n- zope_conf = \'\\n\'.join([l\n- for l in zope_conf.splitlines()\n- if l.rstrip()])\n+ zope_conf = "\\n".join(\n+ [line for line in zope_conf.splitlines() if line.rstrip()]\n+ )\n zope_conf_path = os.path.join(location, \'etc\', \'zope.conf\')\n with open(zope_conf_path, \'w\') as f:\n f.write(zope_conf)\ndiff --git a/src/plone/recipe/zope2instance/tests/zope2instance.txt b/src/plone/recipe/zope2instance/tests/zope2instance.txt\nindex 891049c..bbcf308 100644\n--- a/src/plone/recipe/zope2instance/tests/zope2instance.txt\n+++ b/src/plone/recipe/zope2instance/tests/zope2instance.txt\n@@ -1445,8 +1445,11 @@ Our environment variables should be set now::\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n >>> import re\n >>> env_vars = re.compile(r"<environment>\\n\\s*(?P<vars>.*)\\n</environment>", re.M | re.S)\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n+ CHAMELEON_CACHE .../var/cache\n \n Several all on one line::\n \ndiff --git a/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt b/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\nindex 51921db..c12321b 100644\n--- a/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\n+++ b/src/plone/recipe/zope2instance/tests/zope2instance_zserver.txt\n@@ -1737,8 +1737,10 @@ Our environment variables should be set now::\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n >>> import re\n >>> env_vars = re.compile(r"<environment>\\n\\s*(?P<vars>.*)\\n</environment>", re.M | re.S)\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n \n Several all on one line::\n \n@@ -1770,8 +1772,10 @@ Our environment variables should be set now::\n >>> instance = os.path.join(sample_buildout, \'parts\', \'instance\')\n >>> zope_conf = open(os.path.join(instance, \'etc\', \'zope.conf\')).read()\n >>> zope_conf = zope_conf.replace(\'\\\\\', \'/\')\n- >>> re.search(env_vars, zope_conf).group(\'vars\')\n- \'TZ US/Eastern\\nTMP /var/tmp\\nDISABLE_PTS True\'\n+ >>> print(re.search(env_vars, zope_conf).group(\'vars\'))\n+ TZ US/Eastern\n+ TMP /var/tmp\n+ DISABLE_PTS True\n \n \n HTTP server\n'

0 comments on commit c3669a4

Please sign in to comment.