lardawge/carrierwave_backgrounder — pull request #101 by petergoldstein (2013-01-07 05:01:55+00:00)
Title: Fix determine_backend and Sidekiq integration

This pull request makes a few changes:

i) Removes :immediate from the available_backends hash - The presence of this value ensured that, in a real world situaton where a task processing library is included, the determine_backend method always throws an exception because the size of the available_backends hash was always at least 2. So backend processing simply doesn't work in real life situations.

ii) Changes the Sidekiq integration - The approach used to integrate with Sidekiq in the enqueue_sidekiq method has a number of drawbacks. Most significantly, it breaks the 'sidekiq/testing' integration - jobs enqueued by carrierwave_backgrounder don't go to the test queue. Presumably this approach was taken to set the Sidekiq options on a per-instance basis. But the same goal can be accomplished by using client_push, which is compatible with 'sidekiq/testing'.

iii) Corrects a spelling error - The name of the ::CarrierWave::Backgrounder::TooManyBackendsAvailableError class and its corresponding message were misspelled - 'To' was being used instead of 'Too'

The carrierwave_backgrounder tests are passing, as are our carrrierwave_backgrounder-related application tests (which were failing with the latest carrierwave_backgrounder gem)