-
Notifications
You must be signed in to change notification settings - Fork 17
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
Update blocklist + improve performance greatly (200 times faster 🚀 ) #7
base: master
Are you sure you want to change the base?
Conversation
Great job ;) |
For the record I just added the ruby 3 fix from #8 and #9 (thanks @mkrajewski90 and @Annedj). |
@jarthod Thanks for your work! This branch sadly seems to cause problems with Rails 6.1.X that were not present with Rails 6.0.X. |
@tbsvttr what problem? I am currently using it on Rails 7.0 and have been using it on Rails 6.1 for a while before that. |
@jarthod |
@tbsvttr ah ok, I'm using Mongoid instead of AR so maybe they probably kept the compatibility there. Can you share your monkeypatch for others maybe? If it doesn't break compatibilité with older version I'll update the branch. |
@jarthod Where do you usually add the new domains to the existing list? Is it on initalization of the rails app or does it have to be added manually anytime we perform a check? |
@IncSow With this branch it can be done at initialization yes, in my case I put it in my DisposableMail.list.merge %w(cnxingye.com threepp.com mailper.com acrossgracealley.com thichanthit.com tempmailin.com digital10network.com musiccode.me ryteto.me livinginsurance.co.uk onekisspresave.com norwegischlernen.info emailnax.com afia.pro aramask.com camplvad.com clout.wiki consultant.com devsquad.asia duscore.com finews.biz gufum.com hexi.pics introace.com lyft.live merepost.com realremedyblog.com socam.me tutuapp.bid vanturtransfer.com)
class User
# ... |
Hello 👋
Thanks for this nice gem!
I just started using it and saw a couple things to improve/update so here is a little PR with the following improvements:
disposable-email-domains
#include?
is now 200 times faster 🚀) by using a Set instead of Array +split
instead of regexp.#include?
method now really returns a Boolean as explained in the readme (instead of String ornil
currently)For people who wants to use this branch before it is merged, use this in your
Gemfile
:Benchmark results: