emailvalidation 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +175 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/email_address_validation.gemspec +38 -0
- data/email_address_validation.iml +35 -0
- data/example/example-response.json +14 -0
- data/example/example.rb +22 -0
- data/lib/email_address_validation.rb +109 -0
- data/lib/email_address_validation/missing_argument_exception.rb +13 -0
- data/lib/email_address_validation/version.rb +3 -0
- metadata +161 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6b17f6bcce7b0ccadd27c85ac5bba427d1ad0208
|
4
|
+
data.tar.gz: e18cf49674aa8cdea914894d83a7892dc5ab8e8f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e22b2f54b0e4501357f75cdd481485a7ebf6f2e0d568e4994268ed877e3e35fd113de4e772671c7fb01a67079e00e467a09aa47246ce6ce5a8bbdf9eaf571d5f
|
7
|
+
data.tar.gz: 836e5ca877eb048ad4988cd326c01ed515b7da4135d8f5c69366781b8d397e34c9d532ead1b6ecbefe96b22089083703d1e4b7e4222dd462cc4bc0177c29fbae
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at github@petermolgaard.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Peter Andreas Moelgaard
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
[![Travis](https://travis-ci.org/pmoelgaard/email_address_validation.svg)](Travis)
|
2
|
+
|
3
|
+
# email_address_validation
|
4
|
+
|
5
|
+
Ruby Library for the mailboxlayer API, a web service that email validation & verification, [https://mailboxlayer.com/](https://mailboxlayer.com/)
|
6
|
+
|
7
|
+
Simple and powerful email verification JSON API using SMTP, typo checks, syntax validation, and free and disposable provider filtering. Free for personal use.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
11
|
+
## Installation
|
12
|
+
|
13
|
+
Add this line to your application's Gemfile:
|
14
|
+
|
15
|
+
```
|
16
|
+
gem 'email_address_validation'
|
17
|
+
|
18
|
+
```
|
19
|
+
|
20
|
+
And then execute:
|
21
|
+
|
22
|
+
```
|
23
|
+
$ bundle
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
```
|
30
|
+
$ gem install email_address_validation
|
31
|
+
|
32
|
+
```
|
33
|
+
|
34
|
+
---
|
35
|
+
|
36
|
+
## Configuration
|
37
|
+
|
38
|
+
Before using the mailboxlayer API client you have to setup your account and obtain your API Access Key.
|
39
|
+
You can get it by signing up at [https://mailboxlayer.com/product](https://mailboxlayer.com/product).
|
40
|
+
|
41
|
+
---
|
42
|
+
|
43
|
+
## API Overview
|
44
|
+
All endpoints in the public API is available through this library.
|
45
|
+
|
46
|
+
- check
|
47
|
+
|
48
|
+
---
|
49
|
+
|
50
|
+
## Usage
|
51
|
+
|
52
|
+
The general API is documented here: [https://mailboxlayer.com/documentation](https://mailboxlayer.com/documentation).
|
53
|
+
You can find parameters, result set definitions and status codes documented here as well.
|
54
|
+
|
55
|
+
In the examples directory you can find demos and samples of general usage of all the API functions.
|
56
|
+
|
57
|
+
### Setup
|
58
|
+
|
59
|
+
```
|
60
|
+
@client = MailboxLayer::Client.new( [access_key] )
|
61
|
+
|
62
|
+
```
|
63
|
+
|
64
|
+
#### Required Parameters
|
65
|
+
|
66
|
+
###### access_key
|
67
|
+
Your unique key that you can find on the dashboard of your account under the mailboxlayer account.
|
68
|
+
|
69
|
+
#### Optional Parameters
|
70
|
+
|
71
|
+
###### Secure (only available for Basic, Pro and Enterprise accounts)
|
72
|
+
Boolean value to indicate if the calls to the API should use a secure protocol or insecure (HTTP/HTTPS). Defaults to false (HTTP, insecure).
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
## Check (simple case)
|
77
|
+
|
78
|
+
Takes a URL and returns the captured image.
|
79
|
+
|
80
|
+
###### Define Query
|
81
|
+
Second we define an options object.
|
82
|
+
All the options are documented here: [https://mailboxlayer.com/documentation](https://mailboxlayer.com/documentation)
|
83
|
+
|
84
|
+
```
|
85
|
+
options = MailboxLayer::CheckOptions.new()
|
86
|
+
|
87
|
+
```
|
88
|
+
|
89
|
+
###### Call Client
|
90
|
+
We then place the actual call to the API, passing in the email we wish to check and the options we defined above.
|
91
|
+
|
92
|
+
```
|
93
|
+
response = @client.check( [email] [, options] )
|
94
|
+
|
95
|
+
```
|
96
|
+
|
97
|
+
###### Response
|
98
|
+
|
99
|
+
If we pass the email ```test@test.com``` as the email argument above, we get the following result:
|
100
|
+
|
101
|
+
```
|
102
|
+
{
|
103
|
+
"email": "test@test.com",
|
104
|
+
"did_you_mean": "test@me.com",
|
105
|
+
"user": "test",
|
106
|
+
"domain": "test.com",
|
107
|
+
"format_valid": true,
|
108
|
+
"mx_found": nil,
|
109
|
+
"smtp_check": false,
|
110
|
+
"catch_all": nil,
|
111
|
+
"role": false,
|
112
|
+
"disposable": false,
|
113
|
+
"free": false,
|
114
|
+
"score": 0.32
|
115
|
+
}
|
116
|
+
|
117
|
+
```
|
118
|
+
|
119
|
+
---
|
120
|
+
|
121
|
+
## Example Application
|
122
|
+
|
123
|
+
In the [rootdir]/example directory there is a fully functional application which runs all requests against all the endpoints in the API, the examples above can be seen there as source code.
|
124
|
+
|
125
|
+
The example application uses a process.env variable to hold the access key.
|
126
|
+
|
127
|
+
---
|
128
|
+
|
129
|
+
## Tests
|
130
|
+
|
131
|
+
The tests are written using the rspec testing library.
|
132
|
+
**RSpec** [http://rspec.info/](http://rspec.info/)
|
133
|
+
|
134
|
+
In order to run the tests, the following environment variables needs to be set:
|
135
|
+
|
136
|
+
```
|
137
|
+
ACCESS_KEY = [access_key]
|
138
|
+
```
|
139
|
+
|
140
|
+
|
141
|
+
---
|
142
|
+
|
143
|
+
## Customer Support
|
144
|
+
|
145
|
+
Need any assistance? [Get in touch with Customer Support](mailto:support@apilayer.net?subject=%mailboxlayer%5D).
|
146
|
+
|
147
|
+
---
|
148
|
+
|
149
|
+
## Updates
|
150
|
+
Stay up to date by following [@apilayernet](https://twitter.com/apilayernet) on Twitter.
|
151
|
+
|
152
|
+
---
|
153
|
+
|
154
|
+
## Legal
|
155
|
+
|
156
|
+
All usage of the languagelayer website, API, and services is subject to the [pdflayer Terms & Conditions](https://pdflayer.com/terms) and all annexed legal documents and agreements.
|
157
|
+
|
158
|
+
---
|
159
|
+
|
160
|
+
## Author
|
161
|
+
Peter Andreas Moelgaard ([GitHub](https://github.com/pmoelgaard), [Twitter](https://twitter.com/petermoelgaard))
|
162
|
+
|
163
|
+
---
|
164
|
+
|
165
|
+
## License
|
166
|
+
Licensed under the The MIT License (MIT)
|
167
|
+
|
168
|
+
Copyright (©) 2016 Peter Andreas Moelgaard & apilayer
|
169
|
+
|
170
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
171
|
+
|
172
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
173
|
+
|
174
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
175
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "email_address_validation"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'email_address_validation/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
|
10
|
+
spec.name = "emailvalidation"
|
11
|
+
spec.version = MailboxLayer::VERSION
|
12
|
+
spec.platform = Gem::Platform::RUBY
|
13
|
+
spec.authors = ["Peter Andreas Moelgaard"]
|
14
|
+
spec.email = ["github@petermolgaard.com"]
|
15
|
+
spec.homepage = "https://github.com/pmoelgaard/email_address_validation"
|
16
|
+
|
17
|
+
spec.description = "Ruby Library for the mailboxlayer API, a web service that email validation & verification, https://mailboxlayer.com/"
|
18
|
+
spec.summary = "Simple and powerful email verification JSON API using SMTP, typo checks, syntax validation, and free and disposable provider filtering. Free for personal use."
|
19
|
+
|
20
|
+
spec.license = "MIT"
|
21
|
+
|
22
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.required_ruby_version = '>= 1.9.3'
|
28
|
+
|
29
|
+
spec.add_runtime_dependency "httparty"
|
30
|
+
spec.add_runtime_dependency "hashable"
|
31
|
+
|
32
|
+
spec.add_development_dependency "bundler", "~> 1.11"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
+
spec.add_development_dependency "dotenv"
|
36
|
+
spec.add_development_dependency "bump"
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="FacetManager">
|
4
|
+
<facet type="gem" name="Ruby Gem">
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="" />
|
9
|
+
</configuration>
|
10
|
+
</facet>
|
11
|
+
</component>
|
12
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
13
|
+
<exclude-output />
|
14
|
+
<content url="file://$MODULE_DIR$">
|
15
|
+
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
16
|
+
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
|
17
|
+
</content>
|
18
|
+
<orderEntry type="inheritedJdk" />
|
19
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="bump (v0.5.3, ruby-2.0.0-p645) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.11.2, ruby-2.0.0-p645) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, ruby-2.0.0-p645) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="dotenv (v2.1.0, ruby-2.0.0-p645) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="hashable (v0.1.2, ruby-2.0.0-p645) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="httparty (v0.13.7, ruby-2.0.0-p645) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.3, ruby-2.0.0-p645) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="multi_xml (v0.5.5, ruby-2.0.0-p645) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, ruby-2.0.0-p645) [gem]" level="application" />
|
29
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.4.0, ruby-2.0.0-p645) [gem]" level="application" />
|
30
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.4.2, ruby-2.0.0-p645) [gem]" level="application" />
|
31
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.4.0, ruby-2.0.0-p645) [gem]" level="application" />
|
32
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.4.1, ruby-2.0.0-p645) [gem]" level="application" />
|
33
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.4.1, ruby-2.0.0-p645) [gem]" level="application" />
|
34
|
+
</component>
|
35
|
+
</module>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"email": "test@test.com",
|
3
|
+
"did_you_mean": "test@me.com",
|
4
|
+
"user": "test",
|
5
|
+
"domain": "test.com",
|
6
|
+
"format_valid": true,
|
7
|
+
"mx_found": nil,
|
8
|
+
"smtp_check": false,
|
9
|
+
"catch_all": nil,
|
10
|
+
"role": false,
|
11
|
+
"disposable": false,
|
12
|
+
"free": false,
|
13
|
+
"score": 0.32
|
14
|
+
}
|
data/example/example.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'dotenv'
|
2
|
+
require 'email_address_validation'
|
3
|
+
|
4
|
+
# Load Environment Variables
|
5
|
+
Dotenv.load
|
6
|
+
|
7
|
+
# Declare the Client instance passing in the authentication parameters
|
8
|
+
@client = MailboxLayer::Client.new(ENV['ACCESS_KEY'])
|
9
|
+
|
10
|
+
# Set the email to check, we take a random email
|
11
|
+
email = 'test@test.com'
|
12
|
+
|
13
|
+
# We declare the options
|
14
|
+
options = MailboxLayer::CheckOptions.new()
|
15
|
+
|
16
|
+
# We make the call to check
|
17
|
+
response = @client.check(email, options)
|
18
|
+
|
19
|
+
# If its a success, we print a message to the user
|
20
|
+
if ! response.nil?
|
21
|
+
puts 'SUCCESS : Email checked...' << response.to_s
|
22
|
+
end
|
@@ -0,0 +1,109 @@
|
|
1
|
+
require "httparty"
|
2
|
+
require "hashable"
|
3
|
+
require "email_address_validation/version"
|
4
|
+
|
5
|
+
module MailboxLayer
|
6
|
+
|
7
|
+
class Client
|
8
|
+
|
9
|
+
include HTTParty
|
10
|
+
|
11
|
+
base_uri 'apilayer.net/api'
|
12
|
+
|
13
|
+
def initialize(access_key)
|
14
|
+
|
15
|
+
if access_key.nil?
|
16
|
+
raise MailboxLayer::MissingArgumentException.new 'access_key'
|
17
|
+
end
|
18
|
+
|
19
|
+
@access_key = access_key
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
def check(email, options = {})
|
25
|
+
|
26
|
+
if email.nil?
|
27
|
+
raise MailboxLayer::MissingArgumentException.new 'email'
|
28
|
+
return
|
29
|
+
end
|
30
|
+
|
31
|
+
# Create a shallow copy so we don't manipulate the original reference
|
32
|
+
query = options.dup
|
33
|
+
|
34
|
+
# Populate the Query
|
35
|
+
query.access_key = @access_key
|
36
|
+
query.email = email
|
37
|
+
|
38
|
+
# We then create the Request
|
39
|
+
req = CheckRequest.new(query)
|
40
|
+
|
41
|
+
# We create a Hash of the request so we can send it via HTTP
|
42
|
+
req_dto = req.to_dh
|
43
|
+
|
44
|
+
begin
|
45
|
+
|
46
|
+
# We make the actual request
|
47
|
+
res = self.class.get('/check', req_dto)
|
48
|
+
|
49
|
+
# We ensure that we tap the response so we can use the results
|
50
|
+
res.inspect
|
51
|
+
|
52
|
+
# We just return the parsed binary response
|
53
|
+
return res.parsed_response
|
54
|
+
|
55
|
+
rescue => e
|
56
|
+
puts e.inspect
|
57
|
+
return
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
class CheckRequest
|
65
|
+
|
66
|
+
include Hashable
|
67
|
+
|
68
|
+
attr_accessor :query
|
69
|
+
|
70
|
+
def initialize(query = {})
|
71
|
+
self.query = query;
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
class CheckOptions
|
78
|
+
|
79
|
+
include Hashable
|
80
|
+
|
81
|
+
attr_accessor :access_key
|
82
|
+
|
83
|
+
attr_accessor :email
|
84
|
+
|
85
|
+
attr_accessor :smtp
|
86
|
+
attr_accessor :format
|
87
|
+
attr_accessor :smtp_check
|
88
|
+
attr_accessor :catch_all
|
89
|
+
|
90
|
+
def initialize()
|
91
|
+
@query = nil
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
95
|
+
|
96
|
+
|
97
|
+
class CheckResponse
|
98
|
+
|
99
|
+
SUCCESS_EXPR = 'success'
|
100
|
+
INFO_EXPR = 'info'
|
101
|
+
|
102
|
+
def bar
|
103
|
+
SUCCESS_EXPR
|
104
|
+
INFO_EXPR
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: emailvalidation
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Peter Andreas Moelgaard
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashable
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.11'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.11'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: dotenv
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bump
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Ruby Library for the mailboxlayer API, a web service that email validation
|
112
|
+
& verification, https://mailboxlayer.com/
|
113
|
+
email:
|
114
|
+
- github@petermolgaard.com
|
115
|
+
executables: []
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- .rspec
|
120
|
+
- .travis.yml
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/console
|
127
|
+
- bin/setup
|
128
|
+
- email_address_validation.gemspec
|
129
|
+
- email_address_validation.iml
|
130
|
+
- example/example-response.json
|
131
|
+
- example/example.rb
|
132
|
+
- lib/email_address_validation.rb
|
133
|
+
- lib/email_address_validation/missing_argument_exception.rb
|
134
|
+
- lib/email_address_validation/version.rb
|
135
|
+
homepage: https://github.com/pmoelgaard/email_address_validation
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
metadata: {}
|
139
|
+
post_install_message:
|
140
|
+
rdoc_options: []
|
141
|
+
require_paths:
|
142
|
+
- lib
|
143
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - '>='
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 1.9.3
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
requirements: []
|
154
|
+
rubyforge_project:
|
155
|
+
rubygems_version: 2.0.14
|
156
|
+
signing_key:
|
157
|
+
specification_version: 4
|
158
|
+
summary: Simple and powerful email verification JSON API using SMTP, typo checks,
|
159
|
+
syntax validation, and free and disposable provider filtering. Free for personal
|
160
|
+
use.
|
161
|
+
test_files: []
|