Generating CSS sprites for Rails with retina support - from Ruby

There is a nice Ruby gem that allows for automatic CSS Sprite generation: Sprite Factory. It has lots of ways to configure it, and allows for output that works with the Rails asset pipeline, which is nice.

Unfortunately out of the box it doesn't help with generating retina ready sprite files (i.e. with 2x size files where you then scale the image back - such as described here).