bobmcwhirter/awestruct — pull request #44 by trustin (2011-11-02 21:09:48+00:00)
Title: Fix a bug where Awestruct doesn't render a file intermittently

Awestruct does not render a file which was modified less than 1~2 seconds ago, probably to avoid rendering an incompletely written file. However, this prohibits a modified file from rendering when Awestruct detected the modified file very quickly (e.g. within 1 second.)

To avoid this problem, it's better run a loop to wait for the file's mtime get old enough. After the fix, I see Awestruct almost always picks the changes up correctly.

The only edge case is where a user modifies the file during generation, but a user can simply touch the file again.

I really wish this fix is included in the next release because I had to restart Awestruct or re-touch the modified files almost every time I make changes. Maybe I'm saving too often, but it was driving me crazy. :-)