Sha256: 4418b88ffc1bf273b16488b0bfd57175c636f5deedac039caf6c769d92b421b9

Contents?: true

Size: 616 Bytes

Versions: 18

Compression:

Stored size: 616 Bytes

Contents

#!/usr/bin/env ruby

require "yaml"

require "json"
require "net/http"

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

existing_emails = YAML.load_file("vendor/disposable_emails.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("vendor/disposable_emails.yml", "w") {|f| f.write result_emails.to_yaml }

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
valid_email2-2.1.0 pull_mailchecker_emails.rb
valid_email2-2.0.2 pull_mailchecker_emails.rb
valid_email2-2.0.1 pull_mailchecker_emails.rb
valid_email2-2.0.0 pull_mailchecker_emails.rb
valid_email2-1.2.22 pull_mailchecker_emails.rb
valid_email2-1.2.21 pull_mailchecker_emails.rb
valid_email2-1.2.20 pull_mailchecker_emails.rb
valid_email2-1.2.19 pull_mailchecker_emails.rb
valid_email2-1.2.18 pull_mailchecker_emails.rb
valid_email2-1.2.17 pull_mailchecker_emails.rb
valid_email2-1.2.16 pull_mailchecker_emails.rb
valid_email2-1.2.15 pull_mailchecker_emails.rb
valid_email2-1.2.14 pull_mailchecker_emails.rb
valid_email2-1.2.13 pull_mailchecker_emails.rb
valid_email2-1.2.12 pull_mailchecker_emails.rb
valid_email2-1.2.11 pull_mailchecker_emails.rb
valid_email2-1.2.10 pull_mailchecker_emails.rb
valid_email2-1.2.9 pull_mailchecker_emails.rb