zerobounce 0.0.5 → 0.0.6
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/zerobounce.rb +1 -1
- data/lib/zerobounce/configuration.rb +3 -3
- data/lib/zerobounce/request.rb +1 -1
- data/lib/zerobounce/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ef1325579afd30cbb3769cfbfe204c057fa7f12
|
4
|
+
data.tar.gz: 425716b0fc5f8af222625c4b9761745363d6fac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cdf22f0b5d461eb37247ba3ab8facdbd73edea58381a54d3f9f85e5bc960dcab76f88549f9452b1d69af23c43e8847ece85e9ec405d8538a8ce7602e71367b5
|
7
|
+
data.tar.gz: 0674c6bdd1e4b52ccd492315c59faf5006c7c1a29534082c6300ee064c292c3aeffc4b12ad248f471c955cc9ea281c610de2e767a43a9cc8e9d976586cb68cd4
|
data/README.md
CHANGED
data/lib/zerobounce.rb
CHANGED
@@ -15,7 +15,7 @@ module Zerobounce
|
|
15
15
|
# @attr [Hash] headers
|
16
16
|
# Headers to use in all requests.
|
17
17
|
#
|
18
|
-
# @attr [String]
|
18
|
+
# @attr [String] apikey
|
19
19
|
# A Zerobounce API key.
|
20
20
|
#
|
21
21
|
# @attr [Proc] middleware
|
@@ -29,13 +29,13 @@ module Zerobounce
|
|
29
29
|
class Configuration
|
30
30
|
attr_accessor :host
|
31
31
|
attr_accessor :headers
|
32
|
-
attr_accessor :
|
32
|
+
attr_accessor :apikey
|
33
33
|
attr_accessor :middleware
|
34
34
|
attr_accessor :valid_statuses
|
35
35
|
|
36
36
|
def initialize
|
37
37
|
self.host = 'https://api.zerobounce.net'
|
38
|
-
self.
|
38
|
+
self.apikey = ENV['ZEROBOUNCE_API_KEY']
|
39
39
|
self.valid_statuses = %i[valid catch_all]
|
40
40
|
self.headers = { user_agent: "ZerobounceRubyGem/#{Zerobounce::VERSION}" }
|
41
41
|
|
data/lib/zerobounce/request.rb
CHANGED
@@ -88,7 +88,7 @@ module Zerobounce
|
|
88
88
|
def get_params(params)
|
89
89
|
valid_params = %i[apikey ipaddress email]
|
90
90
|
params[:ipaddress] = params.delete(:ip_address) if params.key?(:ip_address) # normalize ipaddress key
|
91
|
-
{ apikey: Zerobounce.config.
|
91
|
+
{ apikey: Zerobounce.config.apikey }.merge(params.select { |k, _| valid_params.include?(k) })
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
data/lib/zerobounce/version.rb
CHANGED