roidrage / redis-session-store

A simple session store for Rails based on Redis.
http://github.com/roidrage/redis-session-store
MIT License
366 stars 147 forks source link

Update key existence check to use newer #exists? if available #119

Closed zachmargolis closed 4 years ago

zachmargolis commented 4 years ago

In upgrading the redis gem in our project, we get this deprecation warning:

`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer =  true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0. (/.../ruby/gems/2.6.0/gems/redis-session-store-0.11.1/lib/redis-session-store.rb:70:in `session_exists?')
renchap commented 4 years ago

This is preventing us to upgrade our redis gem. Is anything needed to get this merged?

Jesterovskiy commented 4 years ago

Nothing) Thank you @zachmargolis for code and @renchap for reminding me to merge)

zachmargolis commented 4 years ago

@Jesterovskiy thanks for merging!

I noticed in the v11.2 bump commit that actionpack was pinned to ~> 3, was that intentional? We use Rails 5 in our app so we can't use that version.

It looks like v11.1 specifically unpinned that actionpack dependency?

Jesterovskiy commented 4 years ago

@zachmargolis thanks, fixed)