Sha256: c437439a1bdba1e2c307d18a94b1c4708ea72d7866248adc562cfec070244c56

Contents?: true

Size: 509 Bytes

Versions: 1

Compression:

Stored size: 509 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require 'pry'

require 'yaml'

require 'json'
require 'net/http'

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

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

File.open('vendor/new_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.10 pull_mailchecker_emails.rb