zerobounce 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +10 -0
- data/.github/workflows/gem-push.yml +28 -27
- data/.github/workflows/ruby.yml +15 -15
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +13 -7
- data/README.md +1 -3
- 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 +11 -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
|
|
@@ -2,7 +2,8 @@ name: Ruby Gem
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
6
7
|
|
|
7
8
|
jobs:
|
|
8
9
|
build:
|
|
@@ -13,31 +14,31 @@ jobs:
|
|
|
13
14
|
packages: write
|
|
14
15
|
|
|
15
16
|
steps:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
- uses: actions/checkout@v2
|
|
18
|
+
- name: Set up Ruby 2.6
|
|
19
|
+
uses: actions/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: 2.6.x
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
- name: Publish to GPR
|
|
24
|
+
run: |
|
|
25
|
+
mkdir -p $HOME/.gem
|
|
26
|
+
touch $HOME/.gem/credentials
|
|
27
|
+
chmod 0600 $HOME/.gem/credentials
|
|
28
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
29
|
+
gem build *.gemspec
|
|
30
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
|
31
|
+
env:
|
|
32
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
|
33
|
+
OWNER: ${{ github.repository_owner }}
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
- name: Publish to RubyGems
|
|
36
|
+
run: |
|
|
37
|
+
mkdir -p $HOME/.gem
|
|
38
|
+
touch $HOME/.gem/credentials
|
|
39
|
+
chmod 0600 $HOME/.gem/credentials
|
|
40
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
41
|
+
gem build *.gemspec
|
|
42
|
+
gem push *.gem
|
|
43
|
+
env:
|
|
44
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -8,27 +8,27 @@ name: Ruby
|
|
|
8
8
|
|
|
9
9
|
on:
|
|
10
10
|
push:
|
|
11
|
-
branches:
|
|
11
|
+
branches:
|
|
12
|
+
- master
|
|
13
|
+
- main
|
|
12
14
|
pull_request:
|
|
13
|
-
branches:
|
|
15
|
+
branches:
|
|
16
|
+
- master
|
|
17
|
+
- main
|
|
14
18
|
|
|
15
19
|
jobs:
|
|
16
20
|
test:
|
|
17
|
-
|
|
18
21
|
runs-on: ubuntu-latest
|
|
19
22
|
strategy:
|
|
20
23
|
matrix:
|
|
21
|
-
ruby-version: ['2.
|
|
24
|
+
ruby-version: ['2.6', '2.7', '3.0' ]
|
|
22
25
|
|
|
23
26
|
steps:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
33
|
-
- name: Run tests
|
|
34
|
-
run: bundle exec rake
|
|
27
|
+
- uses: actions/checkout@v2
|
|
28
|
+
- name: Set up Ruby
|
|
29
|
+
uses: ruby/setup-ruby@v1
|
|
30
|
+
with:
|
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
32
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: bundle exec rake
|
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.
|
data/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# Zerobounce
|
|
2
|
-
[](https://codeclimate.com/github/afrase/zerobounce/test_coverage)
|
|
4
|
-
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fafrase%2Fzerobounce?ref=badge_shield)
|
|
2
|
+
[](https://github.com/afrase/zerobounce/actions/workflows/ruby.yml)
|
|
5
3
|
[](https://badge.fury.io/rb/zerobounce)
|
|
6
4
|
|
|
7
5
|
A ruby client for Zerobounce.net 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
|
|
@@ -214,6 +194,7 @@ files:
|
|
|
214
194
|
- ".editorconfig"
|
|
215
195
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
216
196
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
197
|
+
- ".github/dependabot.yml"
|
|
217
198
|
- ".github/pull_request_template.md"
|
|
218
199
|
- ".github/workflows/gem-push.yml"
|
|
219
200
|
- ".github/workflows/ruby.yml"
|
|
@@ -235,7 +216,7 @@ files:
|
|
|
235
216
|
- lib/zerobounce.rb
|
|
236
217
|
- lib/zerobounce/configuration.rb
|
|
237
218
|
- lib/zerobounce/error.rb
|
|
238
|
-
- lib/zerobounce/middleware/
|
|
219
|
+
- lib/zerobounce/middleware/raise_http_exception.rb
|
|
239
220
|
- lib/zerobounce/request.rb
|
|
240
221
|
- lib/zerobounce/request/v1_request.rb
|
|
241
222
|
- lib/zerobounce/request/v2_request.rb
|
|
@@ -249,6 +230,7 @@ licenses:
|
|
|
249
230
|
- MIT
|
|
250
231
|
metadata:
|
|
251
232
|
yard.run: yri
|
|
233
|
+
rubygems_mfa_required: 'true'
|
|
252
234
|
post_install_message:
|
|
253
235
|
rdoc_options: []
|
|
254
236
|
require_paths:
|
|
@@ -257,14 +239,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
257
239
|
requirements:
|
|
258
240
|
- - ">="
|
|
259
241
|
- !ruby/object:Gem::Version
|
|
260
|
-
version: '2.
|
|
242
|
+
version: '2.6'
|
|
261
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
244
|
requirements:
|
|
263
245
|
- - ">="
|
|
264
246
|
- !ruby/object:Gem::Version
|
|
265
247
|
version: '0'
|
|
266
248
|
requirements: []
|
|
267
|
-
rubygems_version: 3.
|
|
249
|
+
rubygems_version: 3.1.6
|
|
268
250
|
signing_key:
|
|
269
251
|
specification_version: 4
|
|
270
252
|
summary: A Ruby client for Zerobounce.net.
|