Industrial strength asset packaging in Ruby

BEFORE

AFTER
In the process of getting my first major Ruby application out the door, I’ve been assessing the various asset packaging systems. Asset packaging offers a number of advantages on production websites, including obfuscation through compression of CSS and JS files, and embedding of images and fonts. The biggest advantage however is the speed gained by reducing the number of bits sent to the client from the server.
Jammit offers all of this in a nice ruby friendly gem. It can compress your JS and CSS using either Yahoo’s YUI Compressor, or Google’s Closure. I chose Closure, but installed both (YUI Compressor gem and Closure Compiler gem) in case I decided to change.
Another benefit of Jammit is it’s ability to provide GZIP’d assets if supported. Fonts and images are embedded using Base64, and IE compatibility is provided using MHTML.
All of this is packed up nicely in a small gem. All you have to provide is a small configuration file in the form of YAML, specifying the files to compress and few other options, and it’s all good to go.
I’ve seen amazing performance gains even just in development, especially where webpages have lots of small images referred to in CSS, and with a number of @fontface rules. Admittedly, the results pictured above show development (un-minified) Javascript libraries. However, I’m impressed by the simplicity of installation, and by the gains I’m seeing in development so far. Check it out, and let me know your thoughts.