Sha256: 9562eb3d363bbe84b16eb5da49e434d421f8a71dab9e2927ae7d3f598f6455bf

Contents?: true

Size: 568 Bytes

Versions: 3

Compression:

Stored size: 568 Bytes

Contents

#!/usr/bin/env ruby

require "yaml"

require "json"
require "net/http"

whitelisted_emails = %w(poczta.onet.pl fastmail.fm hushmail.com naver.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

3 entries across 3 versions & 1 rubygems

Version Path
valid_email2-1.2.1 pull_mailchecker_emails.rb
valid_email2-1.2.0 pull_mailchecker_emails.rb
valid_email2-1.1.13 pull_mailchecker_emails.rb