middleman/middleman — pull request #640 by rolftimmermans (2012-10-15 13:09:49+00:00)
Title: Fix asset hash generation in combination with sprockets.

Hi!

I was having some problems where the asset hash generated by middleman was not updated when my assets changed.

I'm using `middleman-sprockets` and include a couple of Javascript file from `javascript/site.js`. Whenever a dependency is updated but the main Javascript file remains the same the asset hash does not change.

Apparently Middleman only looks at the entire result if the file is a template. In my case it's not a template, it's processed by Sprockets.

This PR fixes the problem by simply using a digest of the output in all cases, whether it's a template or not. A test for this scenario is included as well.