trumail 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/trumail/lookup.rb +8 -0
- data/lib/trumail/parser/xml.rb +5 -4
- data/lib/trumail/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36a6c7daf215b674252060568cb6a7b39b764d91f2c6498c9789ba438a433d68
|
4
|
+
data.tar.gz: ab8a9185bf2b0a9700b495ca92a73691cfea621bf02704471bade9ab8e9ca5ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a79769f82d3afbcbd73c7abfd85e5a8ef9f33e5e8f98d5eca2a34bffbe8e84a0ca6e527da656fa3638679fd73294ef4ee1d8e9a15e67aa0c42db50257f468e57
|
7
|
+
data.tar.gz: f31c807a791ee56df1b6c1945fce2e5f8ff3d6e03eb60ffabf747306bf999af1a14ffcbf04e5013cd22192ceec28306312a1e9925bf180ac425d6ff3965fc2c4
|
data/README.md
CHANGED
@@ -39,13 +39,15 @@ lookup = Trumail::Lookup.verify('test@email.com', host: 'https://verifier.com',
|
|
39
39
|
```ruby
|
40
40
|
lookup.url => 'https://api.trumail.io/v2/lookup/json?email=test@email.com'
|
41
41
|
lookup.hash => { 'address' => 'test@email.com', 'catchAll' => true, ... }
|
42
|
+
lookup.success? => true
|
43
|
+
lookup.error? => false
|
42
44
|
|
43
45
|
# Data Methods
|
44
46
|
lookup.address => 'test@email.com'
|
45
47
|
lookup.username => 'test'
|
46
48
|
lookup.domain => 'email.com'
|
47
49
|
lookup.md5_hash => '0065537cb732045561c0d23e859710f4'
|
48
|
-
lookup.suggestion =>
|
50
|
+
lookup.suggestion => nil
|
49
51
|
lookup.catch_all? => true
|
50
52
|
lookup.deliverable? => false
|
51
53
|
lookup.disposable? => true
|
data/lib/trumail/lookup.rb
CHANGED
data/lib/trumail/parser/xml.rb
CHANGED
@@ -7,10 +7,11 @@ module Trumail
|
|
7
7
|
class Xml < Trumail::Parser::Base
|
8
8
|
|
9
9
|
def parse
|
10
|
-
@hash = Ox.
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
@hash = Ox.load(@data, mode: :hash_no_attrs)
|
11
|
+
.dig(:lookup)
|
12
|
+
.each_with_object({}) do |(key, val), hash|
|
13
|
+
hash[key.to_s] = eval(val) rescue val
|
14
|
+
end
|
14
15
|
end
|
15
16
|
|
16
17
|
end
|
data/lib/trumail/version.rb
CHANGED