zerobounce 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +1 -1
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +13 -7
- data/lib/zerobounce/configuration.rb +3 -4
- data/lib/zerobounce/middleware/{raise_error.rb → raise_http_exception.rb} +1 -1
- data/lib/zerobounce/version.rb +1 -1
- data/zerobounce.gemspec +5 -5
- metadata +10 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e19fc9a3e9db7160fa79d71664a45d3c731cd3aabfe9a92249be8e65db1d004e
|
4
|
+
data.tar.gz: e327cfb318f27615a2f54f036b6a4aebdfabf60071b72748a11c8edd945cd4dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6dcb6966babc9d36a427de4382d32edca78e8c8ae241d440737f53e3b57371f495bc2147e0692df008ed8916d8edff5606ace2ce97dbcef4446ab1291233d296
|
7
|
+
data.tar.gz: f8b2c440313cb58d0a003b0cce0e2820f2387d0d5be53e787df891d4ab11eb78a0ea8065c860466c25fe1d718b6d67a0cc4c26f0bfac253db8b2bcbeb07a05a4
|
data/.github/workflows/ruby.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-2.7.
|
1
|
+
ruby-2.7.8
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,24 @@
|
|
1
|
+
# 0.3.0
|
2
|
+
|
3
|
+
- Updated faraday to version 2.0.1
|
4
|
+
- Removed depricated faraday_middleware gem
|
5
|
+
- Updated minimum ruby version to 2.6
|
6
|
+
|
1
7
|
# 0.2.0
|
2
8
|
|
3
|
-
|
4
|
-
|
5
|
-
|
9
|
+
- Update faraday and faraday_middleware dependency requirements.
|
10
|
+
- Update rubocop dev dependencies and fixed failures.
|
11
|
+
- Updated minimum ruby version to 2.5.
|
6
12
|
|
7
13
|
# 0.1.2
|
8
14
|
|
9
|
-
|
10
|
-
|
15
|
+
- Removed the double quote from the body check since it appears a space is added after the colon.
|
16
|
+
- Added changelog file.
|
11
17
|
|
12
18
|
# 0.1.1
|
13
19
|
|
14
|
-
|
20
|
+
- Removed safe accessor usage to work with older versions of Ruby.
|
15
21
|
|
16
22
|
# 0.1.0
|
17
23
|
|
18
|
-
|
24
|
+
- Added support for V2 of Zerobounce API.
|
@@ -1,8 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'faraday'
|
4
|
-
require '
|
5
|
-
require 'zerobounce/middleware/raise_error'
|
4
|
+
require 'zerobounce/middleware/raise_http_exception'
|
6
5
|
|
7
6
|
module Zerobounce
|
8
7
|
# Configuration object for Zerobounce.
|
@@ -39,7 +38,7 @@ module Zerobounce
|
|
39
38
|
|
40
39
|
def initialize
|
41
40
|
self.host = 'https://api.zerobounce.net'
|
42
|
-
self.apikey = ENV
|
41
|
+
self.apikey = ENV.fetch('ZEROBOUNCE_API_KEY', nil)
|
43
42
|
self.api_version = 'v2'
|
44
43
|
self.valid_statuses = %i[valid catch_all]
|
45
44
|
self.headers = { user_agent: "ZerobounceRubyGem/#{Zerobounce::VERSION}" }
|
@@ -47,7 +46,7 @@ module Zerobounce
|
|
47
46
|
self.middleware = proc do |builder|
|
48
47
|
builder.response(:json, content_type: /\bjson$/, parser_options: { symbolize_names: true })
|
49
48
|
builder.response(:logger) { |l| l.filter(/(api_?key=)(\w+)/, '\1[REMOVED]') } if ENV['ZEROBOUNCE_API_DEBUG']
|
50
|
-
builder.use(Zerobounce::Middleware::
|
49
|
+
builder.use(Zerobounce::Middleware::RaiseHttpException)
|
51
50
|
builder.adapter(Faraday.default_adapter)
|
52
51
|
end
|
53
52
|
end
|
@@ -8,7 +8,7 @@ module Zerobounce
|
|
8
8
|
# Raises an error if the response wasn't successful.
|
9
9
|
#
|
10
10
|
# @author Aaron Frase
|
11
|
-
class
|
11
|
+
class RaiseHttpException < Faraday::Middleware
|
12
12
|
# Check for errors after the response has finished.
|
13
13
|
#
|
14
14
|
# @param [Hash] env
|
data/lib/zerobounce/version.rb
CHANGED
data/zerobounce.gemspec
CHANGED
@@ -4,7 +4,7 @@ lib = File.expand_path('lib', __dir__)
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'zerobounce/version'
|
6
6
|
|
7
|
-
Gem::Specification.new do |spec|
|
7
|
+
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'zerobounce'
|
9
9
|
spec.version = Zerobounce::VERSION
|
10
10
|
spec.authors = ['Aaron Frase']
|
@@ -24,12 +24,11 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
24
24
|
|
25
25
|
spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
|
26
26
|
|
27
|
-
spec.required_ruby_version = '>= 2.
|
27
|
+
spec.required_ruby_version = '>= 2.6'
|
28
28
|
|
29
|
-
spec.add_dependency 'faraday', '>=
|
30
|
-
spec.add_dependency 'faraday_middleware', '~> 1.0'
|
29
|
+
spec.add_dependency 'faraday', '>= 2.0.1'
|
31
30
|
|
32
|
-
spec.add_development_dependency 'bundler', '
|
31
|
+
spec.add_development_dependency 'bundler', '>= 2.2.17'
|
33
32
|
spec.add_development_dependency 'pry', '~> 0.14.1'
|
34
33
|
spec.add_development_dependency 'rake', '~> 13.0'
|
35
34
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
@@ -40,4 +39,5 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
|
40
39
|
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
|
41
40
|
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
42
41
|
spec.add_development_dependency 'yard', '~> 0.9.26'
|
42
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zerobounce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Frase
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,46 +16,26 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '2.0'
|
19
|
+
version: 2.0.1
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '2.0'
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: faraday_middleware
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.0'
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '1.0'
|
26
|
+
version: 2.0.1
|
47
27
|
- !ruby/object:Gem::Dependency
|
48
28
|
name: bundler
|
49
29
|
requirement: !ruby/object:Gem::Requirement
|
50
30
|
requirements:
|
51
|
-
- - "
|
31
|
+
- - ">="
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: 2.2.17
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
37
|
requirements:
|
58
|
-
- - "
|
38
|
+
- - ">="
|
59
39
|
- !ruby/object:Gem::Version
|
60
40
|
version: 2.2.17
|
61
41
|
- !ruby/object:Gem::Dependency
|
@@ -236,7 +216,7 @@ files:
|
|
236
216
|
- lib/zerobounce.rb
|
237
217
|
- lib/zerobounce/configuration.rb
|
238
218
|
- lib/zerobounce/error.rb
|
239
|
-
- lib/zerobounce/middleware/
|
219
|
+
- lib/zerobounce/middleware/raise_http_exception.rb
|
240
220
|
- lib/zerobounce/request.rb
|
241
221
|
- lib/zerobounce/request/v1_request.rb
|
242
222
|
- lib/zerobounce/request/v2_request.rb
|
@@ -250,6 +230,7 @@ licenses:
|
|
250
230
|
- MIT
|
251
231
|
metadata:
|
252
232
|
yard.run: yri
|
233
|
+
rubygems_mfa_required: 'true'
|
253
234
|
post_install_message:
|
254
235
|
rdoc_options: []
|
255
236
|
require_paths:
|
@@ -258,14 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
239
|
requirements:
|
259
240
|
- - ">="
|
260
241
|
- !ruby/object:Gem::Version
|
261
|
-
version: '2.
|
242
|
+
version: '2.6'
|
262
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
263
244
|
requirements:
|
264
245
|
- - ">="
|
265
246
|
- !ruby/object:Gem::Version
|
266
247
|
version: '0'
|
267
248
|
requirements: []
|
268
|
-
rubygems_version: 3.
|
249
|
+
rubygems_version: 3.1.6
|
269
250
|
signing_key:
|
270
251
|
specification_version: 4
|
271
252
|
summary: A Ruby client for Zerobounce.net.
|