Sha256: 53a3e18fa6af64de47bb4022eab27c3ba854d1ade9477b6745751f94e51814fb
Contents?: true
Size: 533 Bytes
Versions: 1
Compression:
Stored size: 533 Bytes
Contents
#!/usr/bin/env ruby require "yaml" require "json" require "net/http" whitelisted_emails = %w(poczta.onet.pl) 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.11 | pull_mailchecker_emails.rb |