plataformatec/devise — pull request #2954 by lucasmazza (2014-03-29 01:59:18+00:00)
Title: Serialize the `last_request_at` entry as an Integer

Possible solution for #2930.

My first though was of adding support for `timedout?` to receive Strings, but this logic really belongs to the callback. Thinking out loud on Campfire I realized that storing the object as an integer would make more sense than bending Strings around, but I don't know if this change might break existing session data on apps out there.

Regarding to the testing bits, the existing integration tests felt a bit pointless due the semantics of numbers vs dates - between requests not just the values are the same, but the objects in memory too.

I wanted to cover this better with a unit test for the callback code, but the current state of just passing the blocks to `Warden` makes it impossible. What do you guys think of extracting these blocks to classes like `Devise::Hooks::Timeoutable` instead? I can do this on another Pull Request.