gonzalo-bulnes/simple_token_authentication — pull request #99 by subvertallchris (2014-09-17 20:38:11+00:00)
Title: refactored authentication_handler

This makes each method shorter and more readable. It relies on fewer parameters and variables, more methods, and can lead to easier tests and modification. In particular, `class_finder_method` will ensure that if someone wants to use an adapter with neither `find_by` nor `find_by_email`, they'll have an easy way to provide support with one small monkey patch.

Unfortunately, I have no tests because the full suite won't run on my laptop, even with the mods in #72 and the other issue where some are described. FWIW, I wrote 26 specs for an app using this gem and they all pass with these changes, so I hope this will pass the existing suite easily. If it doesn't pass specs, maybe it'll be a good start and offer some help.