Sha256: 0e2ea4f27c6c3d103323b354e579e21dc3917d2cb5a242880940d09a2afdf552
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
#!/usr/bin/env ruby require "yaml" require "json" require "net/http" whitelisted_emails = %w(poczta.onet.pl fastmail.fm) 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
valid_email2-1.1.12 | pull_mailchecker_emails.rb |