Sha256: a62a63c04c235e0c31f8645242ec1b4470311c379ebaa9aaa8b87413a26ef6d8

Contents?: true

Size: 985 Bytes

Versions: 410

Compression:

Stored size: 985 Bytes

Contents

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

require_relative "helpers"

threads = []

threads << thread { load_github_url("https://gist.github.com/fnando/dafe542cac13f831bbf5521a55248116/raw/free_email_providers.txt") }

threads.each_slice(5) do |slice|
  slice.each(&:join)
end

threads.clear

domains = []

puts "=> Loading free_email_domains.txt"
domains += normalize_list(File.read("#{__dir__}/../data/free_email_domains.txt").lines)

puts "=> Loading manual/free_email_domains.txt"
domains += normalize_list(File.read("#{__dir__}/../data/manual/free_email_domains.txt").lines)

ignore_domains = %w[]

puts "=> Normalize domains (count: #{domains.size})"
domains = domains
          .uniq
          .map {|domain| RootDomain.call(domain.split("@").last.downcase) }
          .compact
          .uniq
          .reject {|domain| ignore_domains.include?(domain) }

puts "=> Saving domains (count: #{domains.size})"
save_file("free_email_domains.txt", normalize_list(domains))

Version data entries

410 entries across 410 versions & 1 rubygems

Version Path
email_data-1732408289.0.0 bin/sync-free-emails
email_data-1731803456.0.0 bin/sync-free-emails
email_data-1731198561.0.0 bin/sync-free-emails
email_data-1730593788.0.0 bin/sync-free-emails
email_data-1729988998.0.0 bin/sync-free-emails
email_data-1729384188.0.0 bin/sync-free-emails
email_data-1728779363.0.0 bin/sync-free-emails
email_data-1727569771.0.0 bin/sync-free-emails
email_data-1726964969.0.0 bin/sync-free-emails
email_data-1726360142.0.0 bin/sync-free-emails
email_data-1725755331.0.0 bin/sync-free-emails
email_data-1725150571.0.0 bin/sync-free-emails
email_data-1724545699.0.0 bin/sync-free-emails
email_data-1723940909.0.0 bin/sync-free-emails
email_data-1723336353.0.0 bin/sync-free-emails
email_data-1722731292.0.0 bin/sync-free-emails
email_data-1722126507.0.0 bin/sync-free-emails
email_data-1721521719.0.0 bin/sync-free-emails
email_data-1720916916.0.0 bin/sync-free-emails
email_data-1720312106.0.0 bin/sync-free-emails