zerobounce 0.0.6 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE/bug_report.md +27 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/dependabot.yml +10 -0
- data/.github/pull_request_template.md +22 -0
- data/.github/workflows/gem-push.yml +44 -0
- data/.github/workflows/ruby.yml +34 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +6 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +18 -0
- data/CONTRIBUTING.md +1 -0
- data/README.md +1 -3
- data/bin/console +1 -4
- data/bin/setup +0 -2
- data/lib/zerobounce.rb +1 -5
- data/lib/zerobounce/configuration.rb +6 -0
- data/lib/zerobounce/error.rb +18 -14
- data/lib/zerobounce/middleware/raise_error.rb +1 -1
- data/lib/zerobounce/request.rb +15 -37
- data/lib/zerobounce/request/v1_request.rb +47 -0
- data/lib/zerobounce/request/v2_request.rb +32 -0
- data/lib/zerobounce/response.rb +12 -98
- data/lib/zerobounce/response/v1_response.rb +104 -0
- data/lib/zerobounce/response/v2_response.rb +97 -0
- data/lib/zerobounce/version.rb +1 -1
- data/zerobounce.gemspec +15 -11
- metadata +73 -29
- data/.circleci/config.yml +0 -136
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| # rubocop:disable BlockLength
|
7
|
+
Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
|
8
8
|
spec.name = 'zerobounce'
|
9
9
|
spec.version = Zerobounce::VERSION
|
10
10
|
spec.authors = ['Aaron Frase']
|
@@ -24,16 +24,20 @@ Gem::Specification.new do |spec| # rubocop:disable BlockLength
|
|
24
24
|
|
25
25
|
spec.metadata['yard.run'] = 'yri' # use "yard" to build full HTML docs.
|
26
26
|
|
27
|
-
spec.
|
28
|
-
spec.add_dependency 'faraday_middleware', '~> 0.12'
|
27
|
+
spec.required_ruby_version = '>= 2.5'
|
29
28
|
|
30
|
-
spec.
|
31
|
-
spec.
|
32
|
-
|
29
|
+
spec.add_dependency 'faraday', '>= 0.14', '< 2.0'
|
30
|
+
spec.add_dependency 'faraday_middleware', '~> 1.0'
|
31
|
+
|
32
|
+
spec.add_development_dependency 'bundler', '~> 2.2.17'
|
33
|
+
spec.add_development_dependency 'pry', '~> 0.14.1'
|
34
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
33
35
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
34
|
-
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.
|
35
|
-
spec.add_development_dependency 'rubocop', '~>
|
36
|
-
spec.add_development_dependency 'rubocop-
|
37
|
-
spec.add_development_dependency '
|
38
|
-
spec.add_development_dependency '
|
36
|
+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
|
37
|
+
spec.add_development_dependency 'rubocop', '~> 1.15'
|
38
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.3'
|
39
|
+
spec.add_development_dependency 'rubocop-rake', '~> 0.5.1'
|
40
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
|
41
|
+
spec.add_development_dependency 'simplecov', '~> 0.21.2'
|
42
|
+
spec.add_development_dependency 'yard', '~> 0.9.26'
|
39
43
|
end
|
metadata
CHANGED
@@ -1,85 +1,91 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zerobounce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.2
|
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: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.14'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '2.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '0.14'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: faraday_middleware
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0
|
39
|
+
version: '1.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0
|
46
|
+
version: '1.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
53
|
+
version: 2.2.17
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
58
|
- - "~>"
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
60
|
+
version: 2.2.17
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: pry
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
67
|
+
version: 0.14.1
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
74
|
+
version: 0.14.1
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rake
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
81
|
+
version: '13.0'
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
88
|
+
version: '13.0'
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: rspec
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,76 +106,104 @@ dependencies:
|
|
100
106
|
requirements:
|
101
107
|
- - "~>"
|
102
108
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
109
|
+
version: 0.4.1
|
104
110
|
type: :development
|
105
111
|
prerelease: false
|
106
112
|
version_requirements: !ruby/object:Gem::Requirement
|
107
113
|
requirements:
|
108
114
|
- - "~>"
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
116
|
+
version: 0.4.1
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
118
|
name: rubocop
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
121
|
- - "~>"
|
116
122
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
123
|
+
version: '1.15'
|
118
124
|
type: :development
|
119
125
|
prerelease: false
|
120
126
|
version_requirements: !ruby/object:Gem::Requirement
|
121
127
|
requirements:
|
122
128
|
- - "~>"
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
130
|
+
version: '1.15'
|
125
131
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-
|
132
|
+
name: rubocop-performance
|
127
133
|
requirement: !ruby/object:Gem::Requirement
|
128
134
|
requirements:
|
129
135
|
- - "~>"
|
130
136
|
- !ruby/object:Gem::Version
|
131
|
-
version: '1.
|
137
|
+
version: '1.11'
|
132
138
|
- - ">="
|
133
139
|
- !ruby/object:Gem::Version
|
134
|
-
version: 1.
|
140
|
+
version: 1.11.3
|
135
141
|
type: :development
|
136
142
|
prerelease: false
|
137
143
|
version_requirements: !ruby/object:Gem::Requirement
|
138
144
|
requirements:
|
139
145
|
- - "~>"
|
140
146
|
- !ruby/object:Gem::Version
|
141
|
-
version: '1.
|
147
|
+
version: '1.11'
|
142
148
|
- - ">="
|
143
149
|
- !ruby/object:Gem::Version
|
144
|
-
version: 1.
|
150
|
+
version: 1.11.3
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: rubocop-rake
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 0.5.1
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - "~>"
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: 0.5.1
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: rubocop-rspec
|
167
|
+
requirement: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - "~>"
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '2.3'
|
172
|
+
type: :development
|
173
|
+
prerelease: false
|
174
|
+
version_requirements: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '2.3'
|
145
179
|
- !ruby/object:Gem::Dependency
|
146
180
|
name: simplecov
|
147
181
|
requirement: !ruby/object:Gem::Requirement
|
148
182
|
requirements:
|
149
183
|
- - "~>"
|
150
184
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0.
|
185
|
+
version: 0.21.2
|
152
186
|
type: :development
|
153
187
|
prerelease: false
|
154
188
|
version_requirements: !ruby/object:Gem::Requirement
|
155
189
|
requirements:
|
156
190
|
- - "~>"
|
157
191
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.
|
192
|
+
version: 0.21.2
|
159
193
|
- !ruby/object:Gem::Dependency
|
160
194
|
name: yard
|
161
195
|
requirement: !ruby/object:Gem::Requirement
|
162
196
|
requirements:
|
163
197
|
- - "~>"
|
164
198
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0.9.
|
199
|
+
version: 0.9.26
|
166
200
|
type: :development
|
167
201
|
prerelease: false
|
168
202
|
version_requirements: !ruby/object:Gem::Requirement
|
169
203
|
requirements:
|
170
204
|
- - "~>"
|
171
205
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0.9.
|
206
|
+
version: 0.9.26
|
173
207
|
description: A Ruby client for Zerobounce.net.
|
174
208
|
email:
|
175
209
|
- afrase91@gmail.com
|
@@ -177,14 +211,21 @@ executables: []
|
|
177
211
|
extensions: []
|
178
212
|
extra_rdoc_files: []
|
179
213
|
files:
|
180
|
-
- ".circleci/config.yml"
|
181
214
|
- ".editorconfig"
|
215
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
216
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
217
|
+
- ".github/dependabot.yml"
|
218
|
+
- ".github/pull_request_template.md"
|
219
|
+
- ".github/workflows/gem-push.yml"
|
220
|
+
- ".github/workflows/ruby.yml"
|
182
221
|
- ".gitignore"
|
183
222
|
- ".rspec"
|
184
223
|
- ".rubocop.yml"
|
185
224
|
- ".ruby-gemset"
|
186
225
|
- ".ruby-version"
|
226
|
+
- CHANGELOG.md
|
187
227
|
- CODE_OF_CONDUCT.md
|
228
|
+
- CONTRIBUTING.md
|
188
229
|
- Gemfile
|
189
230
|
- LICENSE.txt
|
190
231
|
- README.md
|
@@ -197,7 +238,11 @@ files:
|
|
197
238
|
- lib/zerobounce/error.rb
|
198
239
|
- lib/zerobounce/middleware/raise_error.rb
|
199
240
|
- lib/zerobounce/request.rb
|
241
|
+
- lib/zerobounce/request/v1_request.rb
|
242
|
+
- lib/zerobounce/request/v2_request.rb
|
200
243
|
- lib/zerobounce/response.rb
|
244
|
+
- lib/zerobounce/response/v1_response.rb
|
245
|
+
- lib/zerobounce/response/v2_response.rb
|
201
246
|
- lib/zerobounce/version.rb
|
202
247
|
- zerobounce.gemspec
|
203
248
|
homepage: https://github.com/afrase/zerobounce
|
@@ -213,15 +258,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
213
258
|
requirements:
|
214
259
|
- - ">="
|
215
260
|
- !ruby/object:Gem::Version
|
216
|
-
version: '
|
261
|
+
version: '2.5'
|
217
262
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
218
263
|
requirements:
|
219
264
|
- - ">="
|
220
265
|
- !ruby/object:Gem::Version
|
221
266
|
version: '0'
|
222
267
|
requirements: []
|
223
|
-
|
224
|
-
rubygems_version: 2.6.14
|
268
|
+
rubygems_version: 3.0.3.1
|
225
269
|
signing_key:
|
226
270
|
specification_version: 4
|
227
271
|
summary: A Ruby client for Zerobounce.net.
|
data/.circleci/config.yml
DELETED
@@ -1,136 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
workspace_root: &workspace_root
|
4
|
-
~/zerobounce
|
5
|
-
|
6
|
-
defaults: &defaults
|
7
|
-
working_directory: *workspace_root
|
8
|
-
docker:
|
9
|
-
- image: circleci/ruby:2.4
|
10
|
-
|
11
|
-
attach_workspace: &attach_workspace
|
12
|
-
attach_workspace:
|
13
|
-
at: *workspace_root
|
14
|
-
|
15
|
-
restore_repo: &restore_repo
|
16
|
-
restore_cache:
|
17
|
-
name: Restore repository
|
18
|
-
keys:
|
19
|
-
- v1-repo-{{ .Branch }}-{{ .Revision }}
|
20
|
-
|
21
|
-
restore_gems: &restore_gems
|
22
|
-
restore_cache:
|
23
|
-
name: Restore gems
|
24
|
-
keys:
|
25
|
-
- v1-zerobounce-{{ checksum "Gemfile.lock" }}
|
26
|
-
|
27
|
-
jobs:
|
28
|
-
checkout-code:
|
29
|
-
<<: *defaults
|
30
|
-
steps:
|
31
|
-
- checkout
|
32
|
-
- save_cache:
|
33
|
-
key: v1-repo-{{ .Branch }}-{{ .Revision }}
|
34
|
-
paths:
|
35
|
-
- *workspace_root
|
36
|
-
|
37
|
-
bundle-dependencies:
|
38
|
-
<<: *defaults
|
39
|
-
steps:
|
40
|
-
- *restore_repo
|
41
|
-
- *restore_gems
|
42
|
-
- run:
|
43
|
-
name: Install Bundler dependencies
|
44
|
-
command: |
|
45
|
-
bin/bundle install --path=vendor/bundle \
|
46
|
-
--jobs=4 \
|
47
|
-
--retry=3
|
48
|
-
- run:
|
49
|
-
name: Setup Code Climate test-reporter
|
50
|
-
command: |
|
51
|
-
mkdir -p tmp/
|
52
|
-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
|
53
|
-
chmod +x ./tmp/cc-test-reporter
|
54
|
-
- save_cache:
|
55
|
-
key: v1-zerobounce-{{ checksum "Gemfile.lock" }}
|
56
|
-
paths:
|
57
|
-
- vendor/bundle
|
58
|
-
- persist_to_workspace:
|
59
|
-
root: *workspace_root
|
60
|
-
paths:
|
61
|
-
- vendor/bundle
|
62
|
-
- tmp/cc-test-reporter
|
63
|
-
|
64
|
-
run-specs:
|
65
|
-
<<: *defaults
|
66
|
-
parallelism: 2
|
67
|
-
steps:
|
68
|
-
- *restore_repo
|
69
|
-
- *attach_workspace
|
70
|
-
- run:
|
71
|
-
name: Set bundler path
|
72
|
-
command: bin/bundle --path vendor/bundle
|
73
|
-
- run:
|
74
|
-
name: Run tests
|
75
|
-
command: |
|
76
|
-
bin/bundle exec rspec --profile 10 \
|
77
|
-
--format RspecJunitFormatter \
|
78
|
-
--out test_results/rspec.xml \
|
79
|
-
--format progress \
|
80
|
-
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
|
81
|
-
./tmp/cc-test-reporter format-coverage \
|
82
|
-
-t simplecov \
|
83
|
-
-o tmp/codeclimate.${CIRCLE_NODE_INDEX}.json \
|
84
|
-
${CIRCLE_ARTIFACTS}/coverage/.resultset.json
|
85
|
-
- persist_to_workspace:
|
86
|
-
root: *workspace_root
|
87
|
-
paths:
|
88
|
-
- tmp
|
89
|
-
- store_test_results:
|
90
|
-
path: test_results
|
91
|
-
- store_artifacts:
|
92
|
-
path: test_results
|
93
|
-
destination: test-results
|
94
|
-
- store_artifacts:
|
95
|
-
path: coverage
|
96
|
-
destination: test-coverage
|
97
|
-
|
98
|
-
upload-coverage:
|
99
|
-
<<: *defaults
|
100
|
-
steps:
|
101
|
-
- *attach_workspace
|
102
|
-
- run:
|
103
|
-
name: Upload coverage results to Code Climate
|
104
|
-
command: |
|
105
|
-
./tmp/cc-test-reporter sum-coverage tmp/codeclimate.*.json -p 2 -o tmp/codeclimate.total.json
|
106
|
-
./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.total.json
|
107
|
-
|
108
|
-
run-rubocop:
|
109
|
-
<<: *defaults
|
110
|
-
steps:
|
111
|
-
- *restore_repo
|
112
|
-
- *attach_workspace
|
113
|
-
- run:
|
114
|
-
name: Set bundler path
|
115
|
-
command: bin/bundle --path vendor/bundle
|
116
|
-
- run:
|
117
|
-
name: Run rubocop
|
118
|
-
command: bin/bundle exec rubocop
|
119
|
-
|
120
|
-
workflows:
|
121
|
-
version: 2
|
122
|
-
build-test:
|
123
|
-
jobs:
|
124
|
-
- checkout-code
|
125
|
-
- bundle-dependencies:
|
126
|
-
requires:
|
127
|
-
- checkout-code
|
128
|
-
- run-rubocop:
|
129
|
-
requires:
|
130
|
-
- bundle-dependencies
|
131
|
-
- run-specs:
|
132
|
-
requires:
|
133
|
-
- bundle-dependencies
|
134
|
-
- upload-coverage:
|
135
|
-
requires:
|
136
|
-
- run-specs
|