Sha256: 87254e2cf56341b37922b45c6fabdcf7029eccb64a7a3f8120071202a742681c

Contents?: true

Size: 615 Bytes

Versions: 11

Compression:

Stored size: 615 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)

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

11 entries across 11 versions & 1 rubygems

Version Path
email_assessor-0.4.0 pull_mailchecker_emails.rb
email_assessor-0.3.9 pull_mailchecker_emails.rb
email_assessor-0.3.8 pull_mailchecker_emails.rb
email_assessor-0.3.7 pull_mailchecker_emails.rb
email_assessor-0.3.6 pull_mailchecker_emails.rb
email_assessor-0.3.5 pull_mailchecker_emails.rb
email_assessor-0.3.4 pull_mailchecker_emails.rb
email_assessor-0.3.3 pull_mailchecker_emails.rb
email_assessor-0.3.2 pull_mailchecker_emails.rb
email_assessor-0.3.1 pull_mailchecker_emails.rb
email_assessor-0.3 pull_mailchecker_emails.rb