jenius/roots — pull request #502 by joshrowley (2014-06-16 17:01:53+00:00)
Title: Fix Config#out extension regex replace

This fixes an issue where roots gets too greedy when replacing the extension for paths that contain a `.` in the path name.

Previously, `/Users/josh/code/carrot.is/public/css/single/base/video.styl` was getting changed to `/Users/josh/code/carrot.css`.

The new regex ensures that roots only replaces after the last `.` character in the string. so `/Users/josh/code/carrot.is/public/css/single/base/video.styl` changes to `/Users/josh/code/carrot.is/public/css/single/base/video.css` as expected.

Also, I can definitely test this, but I was unsure the best place to put this, or whether this is tested at a higher level. Maybe somebody who's more familiar with the test suite structure show me the best spot. I originally added it to the weird file names section (https://github.com/jenius/roots/blob/v3/test/compile.coffee#L113-L127), but that test fixture does not actually use any compilers, so no extensions are rewritten.