jgarber/redcloth — pull request #14 by jbn (2012-02-17 19:20:08+00:00)
Title: (Corrected) Server mode for clean development

(I submitted the last pull request prematurely. I didn't notice a bug related to the consumption of optional arguments in optparse. I "fixed" it by removing the ability to set the port number, which is lazy, but it's the best I'll be able to do for a long time.)

I typically use textile for my github projects. (Very) often, it is the case that I make some minor markup typo when writing my textile files and only notice them after I have commited the file and pushed it to github, where it is rendered on their website.

This can be avoided by edit -> run the redcloth script -> view in browser -> (delete any files, if not piped) -> repeat cycle, but I'd like to avoid that. I submit this minor feature extension as a solution for people (like me) who want the easier edit cycle of run redcloth in server mode -> edit -> view in browser.

I tried to adhere to your ruby style. I also edited the README to show how to start in server mode.

It has only been tested on my development machine: a Fedora 13, x86_64 computer with ruby 1.9.2p290.

Thanks for redcloth :)

Server mode for clean development