blazeverify 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc15269fe855612aa7527f3e597d55ff7a59696f1dd1664c8e2035f893b31086
4
- data.tar.gz: febc96b7c5a95b30e846b4741c96d25d1a826d454e83e27cb6ef15759167ece9
3
+ metadata.gz: 2126442e7c72e7fcf5c762adaf1f7d2f35b6a5dbe318f94fbc0a50a97d2b09f5
4
+ data.tar.gz: d9d3d84bed564da6bcf9bac42d6b1783984ac0d2cd5f2d317db5ee9de6af5139
5
5
  SHA512:
6
- metadata.gz: 16f4ee6a1eb89a09108122ea409a4dff029ec9ce0934f31443a84f8c35e63fd8f27a29c1e9cf99cdf06ba4e37f021e2c95157bb57db6185dd35ec8b6821a191b
7
- data.tar.gz: 63a9bb0fbd4a81f31b6a7ed4f949ed33c33847ae9491c37e3a01f6bc81d43df114346232e35cfb6d93ba9300f58a94818f68241d9fc0923db95222beef59b2c8
6
+ metadata.gz: e58d1bbc592f0e70bb3f35aeb026de63ba4e5e71b3a9a7b0a7005bb90080fa774ed2dd8fa86329d5b7903b86ee81a074bab0a1d554ca7d8b52217d6d49ebabc6
7
+ data.tar.gz: b672b8659bc76b3dcfa9cf8f2b7371b40f5b87990c98ff6d0574183dcaee2a0f8cb631c86fe8a6028b2fab4bd6380e6eff4c8099b53872989d78b04d7a392eb6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blazeverify (0.1.0)
4
+ blazeverify (1.0.0)
5
5
  faraday (~> 0.13)
6
6
  faraday_middleware
7
7
  net-http-persistent
data/README.md CHANGED
@@ -7,7 +7,7 @@ This is the official ruby wrapper for the Blaze Verify API.
7
7
 
8
8
  ## Documentation
9
9
 
10
- See the [Ruby API docs](https://blazeverify.com/docs/api).
10
+ See the [Ruby API docs](https://blazeverify.com/docs/api#ruby).
11
11
 
12
12
  ## Installation
13
13
 
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")
@@ -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
@@ -1,6 +1,7 @@
1
1
  module BlazeVerify
2
2
  class BatchStatus < APIResource
3
- attr_accessor :emails, :id, :message, :reason_counts, :total_counts
3
+ attr_accessor :emails, :id, :message, :reason_counts, :total_counts,
4
+ :processed, :total
4
5
 
5
6
  def complete?
6
7
  !emails.nil?
@@ -8,5 +8,6 @@ module BlazeVerify
8
8
  instance_variable_get "@#{method}"
9
9
  end
10
10
  end
11
+
11
12
  end
12
13
  end
@@ -1,3 +1,3 @@
1
1
  module BlazeVerify
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -1,32 +1,30 @@
1
- ### BATCH ENDPOINT DOES NOT SUPPORT TEST KEYS YET ###
2
- #
3
- # require 'test_helper'
4
- #
5
- # module BlazeVerfiy
6
- # class BatchTest < Minitest::Test
7
- #
8
- # def setup
9
- # sleep(1)
10
- # BlazeVerify.api_key = 'test_7aff7fc0142c65f86a00'
11
- # @emails = ['jarrett@blazeverify.com', 'support@blazeverify.com']
12
- # @batch = BlazeVerify::Batch.new(@emails)
13
- # @batch_id ||= @batch.verify
14
- # sleep(1)
15
- # end
16
- #
17
- # def test_start_batch
18
- # refute_nil @batch_id
19
- # end
20
- #
21
- # def test_batch_status
22
- # status = @batch.status
23
- # refute_nil status.message
24
- # end
25
- #
26
- # def test_batch_complete
27
- # complete = @batch.complete?
28
- # assert complete == true || complete == false
29
- # end
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
@@ -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.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 00:00:00.000000000 Z
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: