-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated readme, changed slow requests to return a BlazeVerify::Timeou…
…t error.
- Loading branch information
Showing
6 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,18 +49,14 @@ BlazeVerify.verify('[email protected]') | |
|
||
#### Slow Email Server Handling | ||
|
||
Some email servers are slow to respond. As a result the timeout may be reached | ||
Some email servers are slow to respond. As a result, the timeout may be reached | ||
before we are able to complete the verification process. If this happens, the | ||
verification will continue in the background on our servers. We recommend | ||
sleeping for at least one second and trying your request again. Re-requesting | ||
the same verification with the same options will not impact your credit | ||
allocation within a 5 minute window. | ||
|
||
```ruby | ||
{ | ||
"message" => "Your request is taking longer than normal. Please send your request again." | ||
} | ||
``` | ||
verification will continue in the background on our servers, and a | ||
`BlazeVerify::TimeoutError` will be raised. We recommend sleeping for at least | ||
one second and trying your request again. Re-requesting the same verification | ||
with the same options will not impact your credit allocation within a 5 minute | ||
window. You can test this behavior using a test key and the special | ||
email `[email protected]`. | ||
|
||
### Batch Verification | ||
|
||
|
@@ -108,7 +104,7 @@ It'll validate the attribute only when it's present and has changed. | |
#### Options | ||
|
||
* `smtp`, `timeout`: Passed directly to API as options. | ||
* `states`: An array of states you'd like to be valid. | ||
* `states`: An array of states you'd like to be considered valid. | ||
* `free`, `role`, `disposable`, `accept_all`: If you'd like any of these to be valid. | ||
|
||
```ruby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module BlazeVerify | ||
VERSION = '1.3.2' | ||
VERSION = '2.0.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,4 +61,10 @@ def test_name_and_gender | |
end | ||
end | ||
|
||
def test_slow_verification | ||
assert_raises(BlazeVerify::TimeoutError) do | ||
BlazeVerify.verify('[email protected]') | ||
end | ||
end | ||
|
||
end |