validators 3.3.0 → 3.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.rubocop.yml +3 -18
  4. data/README.md +29 -24
  5. data/Rakefile +0 -1
  6. data/bin/sync-reserved-subdomains +96 -0
  7. data/data/reserved_subdomains.txt +4 -22
  8. data/lib/validators/disposable_domains.rb +18 -0
  9. data/lib/validators/disposable_emails.rb +7 -4
  10. data/lib/validators/ip.rb +6 -6
  11. data/lib/validators/locale/en.yml +5 -4
  12. data/lib/validators/locale/pt-BR.yml +7 -3
  13. data/lib/validators/tld.rb +7 -5
  14. data/lib/validators/validates_cnpj_format_of.rb +1 -2
  15. data/lib/validators/validates_cpf_format_of.rb +1 -2
  16. data/lib/validators/validates_datetime.rb +3 -2
  17. data/lib/validators/validates_email_format_of.rb +5 -5
  18. data/lib/validators/validates_ssh_private_key.rb +1 -3
  19. data/lib/validators/validates_ssh_public_key.rb +1 -3
  20. data/lib/validators/version.rb +2 -2
  21. data/lib/validators.rb +8 -1
  22. data/test/test_helper.rb +1 -2
  23. data/test/validators/disposable_email_test.rb +0 -2
  24. data/test/validators/validates_cnpj_format_of_test.rb +3 -3
  25. data/test/validators/validates_cpf_format_of_test.rb +3 -3
  26. data/test/validators/validates_email_format_of_test.rb +23 -0
  27. data/test/validators/validates_ssh_private_key/common_test.rb +3 -3
  28. data/test/validators/validates_ssh_public_key_test.rb +3 -3
  29. data/test/validators/validates_url_format_of/with_tld_validation_test.rb +18 -0
  30. data/test/validators/validates_url_format_of/without_tld_validation_test.rb +18 -0
  31. data/validators.gemspec +3 -1
  32. metadata +25 -46
  33. data/bin/sync-disposable-hostnames +0 -230
  34. data/bin/sync-tld +0 -20
  35. data/data/country_tlds.txt +0 -235
  36. data/data/disposable_domains.txt +0 -110996
  37. data/data/disposable_emails.txt +0 -38
  38. data/data/tld.txt +0 -1508
  39. data/lib/validators/disposable_hostnames.rb +0 -11
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Validators
4
- class DisposableHostnames
5
- FILE_PATH = File.expand_path("../../data/disposable_domains.txt", __dir__)
6
-
7
- def self.all
8
- @all ||= File.read(FILE_PATH).lines.map(&:chomp)
9
- end
10
- end
11
- end