karmi/tire — pull request #816 by hexgnu (2013-07-31 00:33:34+00:00)
Title: Fixing settings failure problem where there is no index

What
=====

If you have an index that doesn't exist like Tire.index('foobaz') and call the method settings on it, it will error out due to a nil trying to be accessed like a hash.

This aims to fix that by returning a blank hash instead.

Since Tire.index('foobaz') returns an index even though one isn't made I figured this would be the approach you would like.

How to test
==========

I put a spec in there to ensure that the error doesn't happen in the future.

Let me know if there's something I can change! Thanks!