Skip to content

Commit

Permalink
Update list
Browse files Browse the repository at this point in the history
  • Loading branch information
tachyons committed Sep 5, 2024
1 parent 9da4d53 commit 6f67ee4
Show file tree
Hide file tree
Showing 5 changed files with 3,640 additions and 2,977 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.6', '2.7', '3.0', '3.1']
ruby-version: ['3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
Expand All @@ -33,3 +33,6 @@ jobs:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake

- name: Generate new list
run: 'bundle exec rake disposable_mail:puts_domains'
10 changes: 6 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ require 'bundler/gem_tasks'

task :test do
$LOAD_PATH.unshift('lib', 'test')
require './test/disposable_mail_tests.rb'
require './test/disposable_mail_test'
end

task default: :test

namespace :disposable_mail do
desc "outputs the current disposable domains"
desc 'outputs the current disposable domains'
task :puts_domains do
blacklist_path = 'data/disposable-email-domains/disposable_email_blacklist.conf'
new_list = File.open(File.expand_path(File.join(File.dirname(__FILE__), blacklist_path))).readlines.map(&:strip).sort.to_s.gsub(/,/, ",\n")
blacklist_path = 'data/disposable-email-domains/disposable_email_blocklist.conf'
new_list = File.open(File.expand_path(File.join(File.dirname(__FILE__), blacklist_path))).readlines.map(&:strip).sort.to_s.gsub(
/,/, ",\n"
)
new_list = new_list.sub(/\]/, "\n]")
new_list = new_list.sub(/\[/, "[\n")

Expand Down
17 changes: 8 additions & 9 deletions disposable_mail.gemspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# coding: utf-8
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'disposable_mail/version'

Expand All @@ -8,12 +7,12 @@ Gem::Specification.new do |spec|
spec.version = DisposableMail::VERSION
spec.authors = ['Oscar Esgalha']
spec.email = ['[email protected]']
spec.summary = %q{A ruby gem with a list of disposable mail domains.}
spec.description = <<DESC
DisposableMail serves you a blacklist with domains from disposable mail services, like mailinator.com or guerrillamail.com.
The list can be used to prevent sending mails to these domains (which probably won't be open),
or to prevent dummy users registration in your website.
DESC
spec.summary = 'A ruby gem with a list of disposable mail domains.'
spec.description = <<~DESC
DisposableMail serves you a blacklist with domains from disposable mail services, like mailinator.com or guerrillamail.com.
The list can be used to prevent sending mails to these domains (which probably won't be open),
or to prevent dummy users registration in your website.
DESC
spec.homepage = 'https://github.com/oesgalha/disposable_mail'
spec.license = 'MIT'

Expand All @@ -23,6 +22,6 @@ DESC
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler', '~> 2'
spec.add_development_dependency 'rake', '~> 10.1'
spec.add_development_dependency 'minitest', '~> 5.6'
spec.add_development_dependency 'rake'
end
Loading

0 comments on commit 6f67ee4

Please sign in to comment.