Sha256: 9f0a47d59f20959c9602c61b4c2371974b9623ba0960548e834a3265dc075dab

Contents?: true

Size: 674 Bytes

Versions: 8

Compression:

Stored size: 674 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require "yaml"

require "json"
require "net/http"
require "set"

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.txt"
resp = Net::HTTP.get_response(URI.parse(url))

remote_domains = (resp.body.split("\n")) - whitelisted_domains

result_domains = SortedSet.new((existing_domains + remote_domains).map! { |domain| domain.strip.downcase })

File.open("vendor/disposable_domains.txt", "w") { |f| f.write result_domains.to_a.join("\n") }

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
email_assessor-0.9.1 pull_mailchecker_emails.rb
email_assessor-0.8.3 pull_mailchecker_emails.rb
email_assessor-0.8.2 pull_mailchecker_emails.rb
email_assessor-0.8.1 pull_mailchecker_emails.rb
email_assessor-0.8.0 pull_mailchecker_emails.rb
email_assessor-0.7.1 pull_mailchecker_emails.rb
email_assessor-0.7.0 pull_mailchecker_emails.rb
email_assessor-0.6.0 pull_mailchecker_emails.rb