zerobounce-sdk 2.1.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +172 -19
  3. data/README.md +477 -410
  4. data/lib/zerobounce/api_key.rb +21 -0
  5. data/lib/zerobounce/api_urls.rb +9 -0
  6. data/lib/zerobounce/base_request.rb +260 -8
  7. data/lib/zerobounce/client.rb +30 -0
  8. data/lib/zerobounce/configuration.rb +24 -3
  9. data/lib/zerobounce/error.rb +20 -0
  10. data/lib/zerobounce/get_file_helper.rb +6 -8
  11. data/lib/zerobounce/priority3.rb +351 -0
  12. data/lib/zerobounce/request.rb +84 -42
  13. data/lib/zerobounce/response_error.rb +117 -0
  14. data/lib/zerobounce/validate_sub_status.rb +1 -0
  15. data/lib/zerobounce/version.rb +1 -1
  16. data/lib/zerobounce/warmup.rb +471 -0
  17. data/lib/zerobounce.rb +112 -26
  18. metadata +46 -41
  19. data/.dockerignore +0 -17
  20. data/.env.example +0 -3
  21. data/.github/auto_assign.yml +0 -5
  22. data/.github/dependabot.yml +0 -35
  23. data/.github/workflows/auto_assign_ci.yaml +0 -21
  24. data/.github/workflows/codeql.yml +0 -105
  25. data/.github/workflows/publish.yml +0 -131
  26. data/.github/workflows/sdk_ci.yml +0 -29
  27. data/.gitignore +0 -70
  28. data/.rspec +0 -2
  29. data/.ruby-version +0 -1
  30. data/CODE_OF_CONDUCT.md +0 -69
  31. data/CONTRIBUTING.md +0 -112
  32. data/Dockerfile +0 -17
  33. data/Gemfile +0 -13
  34. data/Gemfile.lock +0 -135
  35. data/LICENSE.txt +0 -21
  36. data/Rakefile +0 -26
  37. data/SECURITY.md +0 -21
  38. data/bin/bundle +0 -105
  39. data/bin/console +0 -7
  40. data/bin/setup +0 -6
  41. data/data/zerobounce-ai-scoring.csv +0 -31
  42. data/data/zerobounce-batch-validation.csv +0 -31
  43. data/documentation.md +0 -530
  44. data/files/scoring.csv +0 -1
  45. data/files/validation.csv +0 -1
  46. data/files/zerobounce-ai-scoring.csv +0 -31
  47. data/files/zerobounce-batch-validation.csv +0 -31
  48. data/lib/zerobounce/mock_request.rb +0 -86
  49. data/zerobounce.gemspec +0 -49
data/bin/bundle DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bundle' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1 || ">= 0.a"
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("../../Gemfile", __FILE__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_version
64
- @bundler_version ||= begin
65
- env_var_version || cli_arg_version ||
66
- lockfile_version || "#{Gem::Requirement.default}.a"
67
- end
68
- end
69
-
70
- def load_bundler!
71
- ENV["BUNDLE_GEMFILE"] ||= gemfile
72
-
73
- # must dup string for RG < 1.8 compatibility
74
- activate_bundler(bundler_version.dup)
75
- end
76
-
77
- def activate_bundler(bundler_version)
78
- if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
- bundler_version = "< 2"
80
- end
81
- gem_error = activation_error_handling do
82
- gem "bundler", bundler_version
83
- end
84
- return if gem_error.nil?
85
- require_error = activation_error_handling do
86
- require "bundler/version"
87
- end
88
- return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
- warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
90
- exit 42
91
- end
92
-
93
- def activation_error_handling
94
- yield
95
- nil
96
- rescue StandardError, LoadError => e
97
- e
98
- end
99
- end
100
-
101
- m.load_bundler!
102
-
103
- if m.invoked_as_script?
104
- load Gem.bin_path("bundler", "bundle")
105
- end
data/bin/console DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'zerobounce'
5
- require 'pry'
6
-
7
- Pry.start
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
@@ -1,31 +0,0 @@
1
- email
2
- disposable@example.com
3
- invalid@example.com
4
- valid@example.com
5
- toxic@example.com
6
- donotmail@example.com
7
- spamtrap@example.com
8
- abuse@example.com
9
- unknown@example.com
10
- catch_all@example.com
11
- antispam_system@example.com
12
- does_not_accept_mail@example.com
13
- exception_occurred@example.com
14
- failed_smtp_connection@example.com
15
- failed_syntax_check@example.com
16
- forcible_disconnect@example.com
17
- global_suppression@example.com
18
- greylisted@example.com
19
- leading_period_removed@example.com
20
- mail_server_did_not_respond@example.com
21
- mail_server_temporary_error@example.com
22
- mailbox_quota_exceeded@example.com
23
- mailbox_not_found@example.com
24
- no_dns_entries@example.com
25
- possible_trap@example.com
26
- possible_typo@example.com
27
- role_based@example.com
28
- timeout_exceeded@example.com
29
- unroutable_ip_address@example.com
30
- free_email@example.com
31
- role_based_catch_all@example.com
@@ -1,31 +0,0 @@
1
- email,first,last,gender,ip
2
- disposable@example.com,First,Last,male,127.0.0.1
3
- invalid@example.com,First,Last,male,127.0.0.1
4
- valid@example.com,First,Last,male,127.0.0.1
5
- toxic@example.com,First,Last,male,127.0.0.1
6
- donotmail@example.com,First,Last,male,127.0.0.1
7
- spamtrap@example.com,First,Last,male,127.0.0.1
8
- abuse@example.com,First,Last,male,127.0.0.1
9
- unknown@example.com,First,Last,male,127.0.0.1
10
- catch_all@example.com,First,Last,male,127.0.0.1
11
- antispam_system@example.com,First,Last,male,127.0.0.1
12
- does_not_accept_mail@example.com,First,Last,male,127.0.0.1
13
- exception_occurred@example.com,First,Last,male,127.0.0.1
14
- failed_smtp_connection@example.com,First,Last,male,127.0.0.1
15
- failed_syntax_check@example.com,First,Last,male,127.0.0.1
16
- forcible_disconnect@example.com,First,Last,male,127.0.0.1
17
- global_suppression@example.com,First,Last,male,127.0.0.1
18
- greylisted@example.com,First,Last,male,127.0.0.1
19
- leading_period_removed@example.com,First,Last,male,127.0.0.1
20
- mail_server_did_not_respond@example.com,First,Last,male,127.0.0.1
21
- mail_server_temporary_error@example.com,First,Last,male,127.0.0.1
22
- mailbox_quota_exceeded@example.com,First,Last,male,127.0.0.1
23
- mailbox_not_found@example.com,First,Last,male,127.0.0.1
24
- no_dns_entries@example.com,First,Last,male,127.0.0.1
25
- possible_trap@example.com,First,Last,male,127.0.0.1
26
- possible_typo@example.com,First,Last,male,127.0.0.1
27
- role_based@example.com,First,Last,male,127.0.0.1
28
- timeout_exceeded@example.com,First,Last,male,127.0.0.1
29
- unroutable_ip_address@example.com,First,Last,male,127.0.0.1
30
- free_email@example.com,First,Last,male,127.0.0.1
31
- role_based_catch_all@example.com,First,Last,male,127.0.0.1