Merge branch 'master' of github.com:sahands/pelican

This commit is contained in:
Sahand 2014-02-01 10:45:11 -08:00
commit 6375ae89b7
9 changed files with 15 additions and 22 deletions

View file

@ -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

View file

@ -78,6 +78,8 @@ article_generator_preread article_generator invoked befor
article_generator_init article_generator invoked in the ArticlesGenerator.__init__
article_generator_finalized article_generator invoked at the end of ArticlesGenerator.generate_context
article_generator_write_article article_generator, content invoked before writing each article, the article is passed as content
article_writer_finalized article_generator, writer invoked after all articles and related pages have been written, but before
the article generator is closed.
get_generators generators invoked in Pelican.get_generator_classes,
can return a Generator, or several
generator in a tuple or in a list.

View file

@ -312,6 +312,9 @@ def main():
pelican.ignore_files),
'settings': file_watcher(args.settings)}
for static_path in settings.get("STATIC_PATHS", []):
watchers[static_path] = folder_watcher(static_path, [''], pelican.ignore_files)
try:
if args.autoreload:
print(' --- AutoReload Mode: Monitoring `content`, `theme` and'

View file

@ -482,6 +482,7 @@ class ArticlesGenerator(Generator):
def generate_output(self, writer):
self.generate_feeds(writer)
self.generate_pages(writer)
signals.article_writer_finalized.send(self, writer=writer)
class PagesGenerator(Generator):

View file

@ -19,6 +19,7 @@ generator_init = signal('generator_init')
article_generator_init = signal('article_generator_init')
article_generator_finalized = signal('article_generator_finalized')
article_generator_write_article = signal('article_generator_write_article')
article_writer_finalized = signal('article_writer_finalized')
page_generator_init = signal('page_generator_init')
page_generator_finalized = signal('page_generator_finalized')

View file

@ -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

View file

@ -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):

View file

@ -33,7 +33,7 @@
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="{{ SITEURL }}">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
<h1><a href="{{ SITEURL }}/">{{ SITENAME }} <strong>{{ SITESUBTITLE }}</strong></a></h1>
</header><!-- /#banner -->
<nav id="menu"><ul>
{% for title, link in MENUITEMS %}

17
tox.ini
View file

@ -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