Pagination & rewind feature

This patch will let you refill the queue using pagination, you can also rewind the queue to start at the beginning. This is fully backward compatible.

The queue now takes advantage of pushing multiple values at once when running with Redis >= 2.4

usage:
```
queue = RefillingQueue.new resque_client, "my_queue", :refresh_every => 30.seconds do |page|
  expensive_operation(page).map(&:id)
end
```

when reaching the end of the pages, `queue.pop` will return nil, call `queue.pop` again to restart at the first value.

You can call `queue.rewind` at any time to rewind the queue, next time you call `queue.pop`, the first value will be returned
Did you try it ? <-> afaik the redis 2.4 comment was server version, might
totally work on redis 2

since classic is on redis 3 it does not really matter anymore ...

On Thu, Nov 6, 2014 at 4:06 PM, Jean-François Ducarroz <
notifications@github.com> wrote:

> In .travis.yml:
>
> > @@ -5,6 +5,5 @@ rvm:
> >    - 2.0.0
> >    - 2.1.2
> >  gemfile:
> > - - gemfiles/redis2.gemfile
>
> with that gemfile, the spec wont work because we now use lpush with
> multiple value!
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/grosser/refilling_queue/pull/1/files#r19986268>.
>