tylermercier/coordinator — pull request #10 by odorcicd (2014-08-13 16:31:29+00:00)
Title: Setting capacity when initializing a Queue will error out unless RedisQueue has been initialized

@tylermercier

To fix this error when trying to pass capacity when initializing `Coordinator::Queue`:
```
NoMethodError: undefined method `set' for nil:NilClass
/home/vagrant/src/coordinator/lib/coordinator/redis_queue.rb:48:in `capacity='
/home/vagrant/src/coordinator/lib/coordinator/queue.rb:7:in `initialize'
/home/vagrant/src/coordinator/test/unit/queue_test.rb:11:in `new'
/home/vagrant/src/coordinator/test/unit/queue_test.rb:11:in `block (3 levels) in '
```

Happens because setting capacity works with Redis, but needs this line to be run before doing so:
https://github.com/tylermercier/coordinator/blob/master/lib/coordinator/redis_queue.rb#L9