Please note: this blog has been migrated to a new location at https://jakesgordon.com. All new writing will be published over there, existing content has been left here for reference, but will no longer be updated (as of Nov 2023)

Sprite Factory 1.3.0 Released

Sat, Jul 9, 2011

I just pushed a minor update (v1.3.0) to the sprite-factory gem.

It fixes a couple of bugs, most importantly now detects source files using case insensitive extensions so will now correctly pick up both .png and .PNG image files.

This version also adds a new option :nocss that can be used to suppress the generated CSS output for advanced cases where the caller needs to take responsibilty for storage itself, e.g. to store it in a DB, or memcache, or a generated view directly.

When using this option, instead of creating an output css file, the generated css content will be returned as a string from the run! method.

  css = SpriteFactory.run!('images/icons', :nocss => true)

  # caller does something with css here

Let me know if you have any problems/feedback.

Enjoy!