Sha256: eb999cecbf328e09cd3c2c1f96026b31457d77204e003c80b87bc22a2f71c52d
Contents?: true
Size: 626 Bytes
Versions: 4
Compression:
Stored size: 626 Bytes
Contents
#!/usr/bin/env ruby require "yaml" require "json" require "net/http" whitelisted_domains = %w(poczta.onet.pl fastmail.fm hushmail.com naver.com qq.com nus.edu.sg) existing_domains = File.readlines("vendor/disposable_domains.txt") url = "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.json" resp = Net::HTTP.get_response(URI.parse(url)) remote_domains = JSON.parse(resp.body).flatten - whitelisted_domains result_domains = (existing_domains + remote_domains).map { |domain| domain.strip.downcase }.uniq.sort File.open("vendor/disposable_domains.txt", "w") { |f| f.write result_domains.join("\n") }
Version data entries
4 entries across 4 versions & 1 rubygems