smudge / freemail Goto Github PK
View Code? Open in Web Editor NEWA ruby implementation of the npm 'freemail' database of free and disposable email domains.
License: MIT License
A ruby implementation of the npm 'freemail' database of free and disposable email domains.
License: MIT License
The currently released gem version 0.2.0 has different file permissions on the data file. Specifically, the disposable.txt
is not world-readable:
-rw-r----- 1 user group 4695 Oct 4 17:04 disposable.txt
-rw-r--r-- 1 user group 50937 Oct 4 17:04 free.txt
This results in file access errors in our deployment environment since the actual application user is not allowed to read the file anymore after the gem was installed by a different user.
It would be great if you could release a new version (maybe even with the current state of the data :) ) which ensures that all the files are world-readable. For this, you probably need to change the file permission in your local checkout where build and push the gem.
As of version 0.5.0, get_domain
method is implemented like this:
def self.get_domain(email)
email.split('@').last.downcase.strip
end
However, it can return wrong domain or raise error for invalid inputs:
Freemail.get_domain('apple.com@') #=> "apple.com"
Freemail.get_domain('@') #=> undefined method `downcase' for nil:NilClass (NoMethodError)
It should raise ArgumentError:
Freemail.get_domain('apple.com@') #=> ArgumentError
Freemail.get_domain('@') #=> ArgumentError
Or probably should return empty value (or nil):
Freemail.get_domain('apple.com@') #=> ""
Freemail.get_domain('@') #=> ""
Hello dear maintainers,
First of all thanks for your work on this gem. Kudo!
I was looking at the domains list and probably the lists have been growing for the last 3 years.
I was wondering whether we could update it from time to time. For this I was thinking to this which provides frequently updated a list in different formats.
I would be glad to hear your opinion and, if needed, would be happy to contribute.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.