Sha256: aeb19a7bb2c9499fcb023b6de3c9f40376a9f6368d3f6d66002759f55541fb84

Contents?: true

Size: 644 Bytes

Versions: 10

Compression:

Stored size: 644 Bytes

Contents

#!/usr/bin/env ruby

require "yaml"

require "json"
require "net/http"

whitelisted_emails = %w(
  onet.pl poczta.onet.pl fastmail.fm hushmail.com
  hush.ai hush.com hushmail.me naver.com qq.com example.com
)

existing_emails = YAML.load_file("config/disposable_email_domains.yml")

url = "https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.json"
resp = Net::HTTP.get_response(URI.parse(url))

remote_emails = JSON.parse(resp.body).flatten - whitelisted_emails

result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort

File.open("config/disposable_email_domains.yml", "w") {|f| f.write result_emails.to_yaml }

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
valid_email2-3.1.3 pull_mailchecker_emails.rb
valid_email2-3.1.2 pull_mailchecker_emails.rb
valid_email2-3.1.1 pull_mailchecker_emails.rb
valid_email2-3.1.0 pull_mailchecker_emails.rb
valid_email2-3.0.5 pull_mailchecker_emails.rb
valid_email2-3.0.4 pull_mailchecker_emails.rb
valid_email2-3.0.3 pull_mailchecker_emails.rb
valid_email2-3.0.2 pull_mailchecker_emails.rb
valid_email2-3.0.1 pull_mailchecker_emails.rb
valid_email2-3.0.0 pull_mailchecker_emails.rb