SpringAll
SpringAll copied to clipboard
Polish devise_lastseenable
devise_lastseenable is probably the most crufty dependency we have and it also seems unmaintained. It's a small nice project so polishing it would be a good task to embark ones own Ruby skills. List of things todo:
- [ ] Write a sane .gemspec. The current one includes all sort of unnecessary stuff and also includes it many useless files into the gem.
- [ ] Readd Gemfile.lock. The PR removing it was plainly wrong.
- [ ] Add tests
- [ ] Make timeout interval configurable. There are already patches to do that, look through the forks.
- [ ] If submitted PRs keep unaccepted try to overtake maintainership.
- [ ] If taking over maintainership fails try to obtain push rights to the gem on rubygems.org
- [ ] If that also fails publish gem under new name and maybe fork to diaspora organization on Github.
Hey, @jhass I would love to contribute to diaspora*, and I think I could take care of this issue :D
Seems that https://github.com/ctide/devise_lastseenable would not be updated anymore last opened PR from 2017 is still open. I found another similar gem called: https://github.com/iplan/iplan-devise-lastseenable but I don't know why it wasn't published to rubygems.
If this new gem can't replace the devise_lastseenable, I could assume a new version and maintain it from now.
What do you think @jhass ?
Be my guest, I have no plans for it :)
@jhass https://github.com/diaspora/diaspora/pull/8286 🎉 🌮
What makes 'last_seenable' better than device's 'trackable' ?
https://www.rubydoc.info/github/heartcombo/devise/master/Devise/Models/Trackable
Well, they solve different problems see the wardens hook for trackable https://github.com/heartcombo/devise/blob/c82e4cf47b02002b2fd7ca31d441cf1043fc634c/lib/devise/hooks/trackable.rb#L7
Devise's trackable will only update the user model after each "sign_in"/login etc. But the last_seen gem will mark a timestamp every time a @current_user is called. A real world example could be:
trackable:
- when you login in diaspora, mark the user. (so the date persisted will be now: Fri 3 sep 10:00 AM)
- the time pass to 12:00 PM... I'm still logged in
- But the date still Fri 3 sep 10:00 AM even after hours I've been using the app.
last_seen:
- when you login in diaspora, mark the user. (so the date persisted will be now: Fri 3 sep 10:00 AM)
- the time pass to 12:00 PM... I'm still logged in
- The date now will be Fri 3 sep 12:00 PM
The makes sense - thanks for clarification