blazeverify 1.0.0 → 1.0.1
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/blazeverify.gemspec +7 -1
- data/lib/blazeverify/batch.rb +9 -0
- data/lib/blazeverify/resources/api_resource.rb +9 -0
- data/lib/blazeverify/resources/batch_status.rb +2 -1
- data/lib/blazeverify/resources/verification.rb +1 -0
- data/lib/blazeverify/version.rb +1 -1
- data/test/blazeverify/batch_test.rb +30 -32
- data/test/blazeverify_test.rb +0 -10
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2126442e7c72e7fcf5c762adaf1f7d2f35b6a5dbe318f94fbc0a50a97d2b09f5
|
4
|
+
data.tar.gz: d9d3d84bed564da6bcf9bac42d6b1783984ac0d2cd5f2d317db5ee9de6af5139
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e58d1bbc592f0e70bb3f35aeb026de63ba4e5e71b3a9a7b0a7005bb90080fa774ed2dd8fa86329d5b7903b86ee81a074bab0a1d554ca7d8b52217d6d49ebabc6
|
7
|
+
data.tar.gz: b672b8659bc76b3dcfa9cf8f2b7371b40f5b87990c98ff6d0574183dcaee2a0f8cb631c86fe8a6028b2fab4bd6380e6eff4c8099b53872989d78b04d7a392eb6
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/blazeverify.gemspec
CHANGED
@@ -8,11 +8,17 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.name = 'blazeverify'
|
9
9
|
s.version = BlazeVerify::VERSION
|
10
10
|
s.summary = 'Ruby bindings for the Blaze Verify API'
|
11
|
-
s.description = 'Email Verification that’s astonishingly easy and low-cost.'
|
11
|
+
s.description = 'Email Verification that’s astonishingly easy and low-cost. '\
|
12
|
+
'See https://blazeverify.com for details.'
|
12
13
|
s.homepage = 'https://blazeverify.com'
|
13
14
|
s.author = 'Blaze Verify'
|
14
15
|
s.email = 'support@blazeverify.com'
|
15
16
|
s.license = 'MIT'
|
17
|
+
s.metadata = {
|
18
|
+
"bug_tracker_uri" => "https://github.com/blazeverify/blazeverify-ruby/issues",
|
19
|
+
"documentation_uri" => "https://docs.blazeverify.com/?ruby",
|
20
|
+
"source_code_uri" => "https://github.com/blazeverify/blazeverify-ruby"
|
21
|
+
}
|
16
22
|
|
17
23
|
s.files = `git ls-files`.split("\n")
|
18
24
|
s.test_files = `git ls-files -- test/*`.split("\n")
|
data/lib/blazeverify/batch.rb
CHANGED
@@ -38,5 +38,14 @@ module BlazeVerify
|
|
38
38
|
def complete?
|
39
39
|
!status.complete?
|
40
40
|
end
|
41
|
+
|
42
|
+
def inspect
|
43
|
+
ivars = instance_variables.map do |e|
|
44
|
+
[e.to_s.delete('@'), instance_variable_get(e)]
|
45
|
+
end.to_h
|
46
|
+
"#<#{self.class}:0x#{(object_id << 1).to_s(16)}> JSON: " +
|
47
|
+
JSON.pretty_generate(ivars)
|
48
|
+
end
|
49
|
+
|
41
50
|
end
|
42
51
|
end
|
@@ -7,5 +7,14 @@ module BlazeVerify
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
+
def inspect
|
11
|
+
ivars = instance_variables.map do |e|
|
12
|
+
[e.to_s.delete('@'), instance_variable_get(e)]
|
13
|
+
end.to_h
|
14
|
+
fmtted_email = @email ? " #{@email}" : ''
|
15
|
+
"#<#{self.class}:0x#{(object_id << 1).to_s(16)}#{fmtted_email}> JSON: " +
|
16
|
+
JSON.pretty_generate(ivars)
|
17
|
+
end
|
18
|
+
|
10
19
|
end
|
11
20
|
end
|
data/lib/blazeverify/version.rb
CHANGED
@@ -1,32 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
# end
|
32
|
-
# end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module BlazeVerfiy
|
4
|
+
class BatchTest < Minitest::Test
|
5
|
+
|
6
|
+
def setup
|
7
|
+
sleep(1)
|
8
|
+
BlazeVerify.api_key = 'test_7aff7fc0142c65f86a00'
|
9
|
+
@emails = ['jarrett@blazeverify.com', 'support@blazeverify.com']
|
10
|
+
@batch = BlazeVerify::Batch.new(@emails)
|
11
|
+
@batch_id ||= @batch.verify
|
12
|
+
sleep(1)
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_start_batch
|
16
|
+
refute_nil @batch_id
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_batch_status
|
20
|
+
status = @batch.status
|
21
|
+
refute_nil status.message
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_batch_complete
|
25
|
+
complete = @batch.complete?
|
26
|
+
assert complete == true || complete == false
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
data/test/blazeverify_test.rb
CHANGED
@@ -21,12 +21,6 @@ class BlazeVerifyTest < Minitest::Test
|
|
21
21
|
assert %w(deliverable undeliverable risky unknown).include?(@result.state)
|
22
22
|
end
|
23
23
|
|
24
|
-
def test_verification_free
|
25
|
-
result = BlazeVerify.verify('jarrett@gmail.com')
|
26
|
-
assert result.free?
|
27
|
-
refute @result.free?
|
28
|
-
end
|
29
|
-
|
30
24
|
def test_verification_role
|
31
25
|
result = BlazeVerify.verify('support@blazeverify.com')
|
32
26
|
assert result.role?
|
@@ -39,10 +33,6 @@ class BlazeVerifyTest < Minitest::Test
|
|
39
33
|
assert_nil @result.did_you_mean
|
40
34
|
end
|
41
35
|
|
42
|
-
def test_verification_score
|
43
|
-
assert @result.score.is_a?(Integer)
|
44
|
-
end
|
45
|
-
|
46
36
|
def test_verification_tag
|
47
37
|
result = BlazeVerify.verify('jarrett+marketing@blazeverify.com')
|
48
38
|
assert result.tag == 'marketing'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blazeverify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blaze Verify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -136,7 +136,8 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description: Email Verification that’s astonishingly easy and low-cost.
|
139
|
+
description: Email Verification that’s astonishingly easy and low-cost. See https://blazeverify.com
|
140
|
+
for details.
|
140
141
|
email: support@blazeverify.com
|
141
142
|
executables:
|
142
143
|
- console
|
@@ -170,7 +171,10 @@ files:
|
|
170
171
|
homepage: https://blazeverify.com
|
171
172
|
licenses:
|
172
173
|
- MIT
|
173
|
-
metadata:
|
174
|
+
metadata:
|
175
|
+
bug_tracker_uri: https://github.com/blazeverify/blazeverify-ruby/issues
|
176
|
+
documentation_uri: https://docs.blazeverify.com/?ruby
|
177
|
+
source_code_uri: https://github.com/blazeverify/blazeverify-ruby
|
174
178
|
post_install_message:
|
175
179
|
rdoc_options: []
|
176
180
|
require_paths:
|