Compass/compass-rails — pull request #166 by pctj101 (2014-06-09 11:38:30+00:00)
Title: Bust @stats cache of @trail

cachebust_generated_images didn't properly bust the following:

Sprites within a subdirectory such as:
Rails.root /app/assets/images/sprites/somespritefolder/spritepictures[1234].png

Then a stylesheet such as:
@import "sprites/somespritefolder/*.png";

Would generate the new combined sprite:
Rails.root /app/assets/images/sprites/somespritefolder-s1934274242.png

But the asset_url's @trail would not be properly busted, so the new image could A) not be found, B) even when found, the @stats would say the file was not a file.

So:
```
# Delete the entries (directories) which cache the files/dirs in a directory
options[:sprockets][:environment].send(:trail).instance_variable_get(:@entries).delete(bust_cache_path)

# Delete the stats (file/dir info) which cache the what kind of file/dir each image is
options[:sprockets][:environment].send(:trail).instance_variable_get(:@stats).delete(bust_image_stat_path)
```