Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish devise_lastseenable #4807

Open
7 tasks
jhass opened this issue Feb 23, 2014 · 6 comments · May be fixed by #8286
Open
7 tasks

Polish devise_lastseenable #4807

jhass opened this issue Feb 23, 2014 · 6 comments · May be fixed by #8286

Comments

@jhass
Copy link
Member

jhass commented Feb 23, 2014

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.

@brunoocasali
Copy link

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 ?

@jhass
Copy link
Member Author

jhass commented Aug 28, 2021

Be my guest, I have no plans for it :)

@brunoocasali
Copy link

@jhass #8286 🎉 🌮

@ThorstenClaus
Copy link

What makes 'last_seenable' better than device's 'trackable' ?

https://www.rubydoc.info/github/heartcombo/devise/master/Devise/Models/Trackable

@brunoocasali
Copy link

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

@tclaus
Copy link
Member

tclaus commented Sep 3, 2021

The makes sense - thanks for clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants