Sha256: 79a2241613680c9158a98861d12528d64541a2b3b5d971b68005b535049e98ab

Contents?: true

Size: 656 Bytes

Versions: 10

Compression:

Stored size: 656 Bytes

Contents

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

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

10 entries across 10 versions & 1 rubygems

Version Path
email_assessor-0.5.0 pull_mailchecker_emails.rb
email_assessor-0.4.13 pull_mailchecker_emails.rb
email_assessor-0.4.12 pull_mailchecker_emails.rb
email_assessor-0.4.11 pull_mailchecker_emails.rb
email_assessor-0.4.10 pull_mailchecker_emails.rb
email_assessor-0.4.9 pull_mailchecker_emails.rb
email_assessor-0.4.8 pull_mailchecker_emails.rb
email_assessor-0.4.7 pull_mailchecker_emails.rb
email_assessor-0.4.6 pull_mailchecker_emails.rb
email_assessor-0.4.5 pull_mailchecker_emails.rb