rstacruz/sinatra-assetpack — pull request #75 by mikesten (2013-01-30 17:52:10+00:00)
Title: Filter dyn_local_file_for for the same file extension as the original.

I've got a /packages directory in /public. In there is /select2, which has select2.js, select2.css and select2.png. I was getting the .png file returned for /packages/select2.005533.js because dyn_local_file_for looks for "#{file}.*", which was fetching all of the above.

I've added an extra line to remove files that don't have the same extension as the original to stop this from happening.