From a987b65bd2abe6faa37425c4f061362435125382 Mon Sep 17 00:00:00 2001 From: "M. Utku Altinkaya" Date: Wed, 25 Sep 2013 04:43:06 +0300 Subject: [PATCH 1/8] Watch static folders in Autoreload mode --- pelican/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pelican/__init__.py b/pelican/__init__.py index b3ffe21a..5cf89927 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -320,6 +320,9 @@ def main(): pelican.ignore_files), 'settings': file_watcher(args.settings)} + for static_path in settings.get("STATIC_PATHS", []): + watchers[static_path] = file_watcher(static_path) + try: if args.autoreload: print(' --- AutoReload Mode: Monitoring `content`, `theme` and' From d8e50d56dae2281341fbcd99337e6c0f1424808f Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 10 Jan 2014 07:33:41 +0000 Subject: [PATCH 2/8] travis: Use dev_requirements.txt for dependencies --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2f310328..93a7ab54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,9 @@ before_install: - sudo locale-gen fr_FR.UTF-8 tr_TR.UTF-8 install: - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then ln -s /usr/share/asciidoc/asciidocapi.py ~/virtualenv/python2.7/lib/python2.7/site-packages/; fi - - pip install mock nose nose-cov Markdown typogrify-web - pip install . + - pip install -r dev_requirements.txt + - pip install nose-cov script: nosetests -sv --with-coverage --cover-package=pelican pelican after_success: # Report coverage results to coveralls.io From 8dfa7c23f3076633a51821bd6c2428bfba571f3a Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 10 Jan 2014 07:34:13 +0000 Subject: [PATCH 3/8] Use dev_requirements.txt for tox dependencies --- tox.ini | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/tox.ini b/tox.ini index 70f9fe92..a72aea21 100644 --- a/tox.ini +++ b/tox.ini @@ -8,19 +8,4 @@ envlist = py27,py33 commands = python -m unittest discover deps = - -[testenv:py27] -deps = - mock - Markdown - BeautifulSoup4 - typogrify-web - lxml - -[testenv:py33] -deps = - mock - Markdown - BeautifulSoup4 - typogrify-web - lxml + -rdev_requirements.txt From dc552bb869fdf24d4044caeebc985d66c9d58c11 Mon Sep 17 00:00:00 2001 From: Alistair Magee Date: Fri, 10 Jan 2014 16:33:02 +0000 Subject: [PATCH 4/8] fix test-suite import error --- pelican/tests/test_contents.py | 4 ++-- pelican/tests/test_utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pelican/tests/test_contents.py b/pelican/tests/test_contents.py index 5a9ff581..448f73eb 100644 --- a/pelican/tests/test_contents.py +++ b/pelican/tests/test_contents.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals +from __future__ import unicode_literals, absolute_import import six from datetime import datetime from sys import platform -from .support import unittest, get_settings +from pelican.tests.support import unittest, get_settings from pelican.contents import Page, Article, URLWrapper from pelican.settings import DEFAULT_CONFIG diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py index 0642926e..a8de7216 100644 --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from __future__ import unicode_literals, print_function +from __future__ import unicode_literals, print_function, absolute_import import logging import shutil import os @@ -15,7 +15,7 @@ from pelican.generators import TemplatePagesGenerator from pelican.writers import Writer from pelican.settings import read_settings from pelican import utils -from .support import get_article, LoggedTestCase, locale_available, unittest +from pelican.tests.support import get_article, LoggedTestCase, locale_available, unittest class TestUtils(LoggedTestCase): From 5eb9fa6d1656a872bc2bceb5aa800aae0af74bbb Mon Sep 17 00:00:00 2001 From: Hilmar Lapp Date: Mon, 13 Jan 2014 12:37:15 -0500 Subject: [PATCH 5/8] Append slash to href of link to site home This is necessary to make the link to the site home work locally, because then SITEURL may be set to an empty string (in fact the Pelican default configuration sets it to an empty string in pelicanconf.py). --- pelican/themes/simple/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/themes/simple/templates/base.html b/pelican/themes/simple/templates/base.html index 7973d774..bde7983b 100644 --- a/pelican/themes/simple/templates/base.html +++ b/pelican/themes/simple/templates/base.html @@ -33,7 +33,7 @@