getnikola/nikola — pull request #714 by mrabbitt (2013-09-16 05:22:33+00:00)
Title: Fix fetch of raw gist contents by gist directives

I'm not sure how long this has been going on, but currently both the Markdown and ReST `gist` directives fail to fetch raw gist content, and instead insert the (massive) content of a Github 404 page. It seems Github changed the URL format at some point.

In this pull request:

1. Markdown and ReST `gist` directives to use currently working URLs for raw gist content.
2. Markdown implementation only: Added code to only insert the raw content if HTTP status code of the response is 200. Otherwise, a comment with a warning message is inserted.
3. `--doctest-options=+NORMALIZE_WHITESPACE` option added to `nosetests` options in Travis config to fix some doctests in the Markdown implementation.

Note: After fixing a couple of issues with Python 3.3 and 2.6 compatibility, Travis builds were passing on my feature branch, except for the Python 3.3 build. I'm not sure what's causing the 3.3 build to fail, but based on the logs it doesn't look like my changes are to blame. See: https://travis-ci.org/mrabbitt/nikola/builds/11401008

Thanks.