truemail-rspec 0.9.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/lib/truemail/rspec/validator_helper.rb +9 -5
- data/lib/truemail/rspec/version.rb +1 -1
- data/truemail-rspec.gemspec +6 -9
- metadata +13 -43
- data/.circleci/config.yml +0 -139
- data/.circleci/gemspec_compatible +0 -40
- data/.circleci/gemspec_latest +0 -49
- data/.codeclimate.yml +0 -13
- data/.github/BRANCH_NAMING_CONVENTION.md +0 -36
- data/.github/DEVELOPMENT_ENVIRONMENT_GUIDE.md +0 -26
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE/bug_report.md +0 -28
- data/.github/ISSUE_TEMPLATE/feature_request.md +0 -27
- data/.github/ISSUE_TEMPLATE/issue_report.md +0 -28
- data/.github/ISSUE_TEMPLATE/question.md +0 -22
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -49
- data/.gitignore +0 -4
- data/.overcommit.yml +0 -32
- data/.reek.yml +0 -44
- data/.rspec +0 -2
- data/.rubocop.yml +0 -70
- data/.ruby-gemset +0 -1
- data/CHANGELOG.md +0 -254
- data/CODE_OF_CONDUCT.md +0 -74
- data/CONTRIBUTING.md +0 -48
- data/Gemfile +0 -5
- data/README.md +0 -178
- data/Rakefile +0 -8
data/README.md
DELETED
@@ -1,178 +0,0 @@
|
|
1
|
-
# ![Truemail RSpec helpers](https://truemail-rb.org/assets/images/truemail_logo.png)
|
2
|
-
|
3
|
-
[![Maintainability](https://api.codeclimate.com/v1/badges/d23d82c1c1bdbc271b81/maintainability)](https://codeclimate.com/github/truemail-rb/truemail-rspec/maintainability)
|
4
|
-
[![Test Coverage](https://api.codeclimate.com/v1/badges/d23d82c1c1bdbc271b81/test_coverage)](https://codeclimate.com/github/truemail-rb/truemail-rspec/test_coverage)
|
5
|
-
[![CircleCI](https://circleci.com/gh/truemail-rb/truemail-rspec/tree/master.svg?style=svg)](https://circleci.com/gh/truemail-rb/truemail-rspec/tree/master)
|
6
|
-
[![Gem Version](https://badge.fury.io/rb/truemail-rspec.svg)](https://badge.fury.io/rb/truemail-rspec)
|
7
|
-
[![Downloads](https://img.shields.io/gem/dt/truemail-rspec.svg?colorA=004d99&colorB=0073e6)](https://rubygems.org/gems/truemail-rspec)
|
8
|
-
[![Gitter](https://badges.gitter.im/truemail-rb/community.svg)](https://gitter.im/truemail-rb/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
9
|
-
[![GitHub](https://img.shields.io/github/license/truemail-rb/truemail-rspec)](LICENSE.txt)
|
10
|
-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
|
11
|
-
|
12
|
-
`truemail-rspec` gem helps you to create `Truemail::Configuration`, `Truemail::Auditor` and `Truemail::Validator` instances for your RSpec environment.
|
13
|
-
|
14
|
-
> Actual and maintainable documentation :books: for developers is living [here](https://truemail-rb.org/truemail-rspec).
|
15
|
-
|
16
|
-
## Table of Contents
|
17
|
-
|
18
|
-
- [Features](#features)
|
19
|
-
- [Requirements](#requirements)
|
20
|
-
- [Installation](#installation)
|
21
|
-
- [Usage](#usage)
|
22
|
-
- [Create configuration instance](#create-configuration-instance)
|
23
|
-
- [Configuration instance with default random params](#configuration-instance-with-default-random-params)
|
24
|
-
- [Configuration instance with predefined params](#configuration-instance-with-predefined-params)
|
25
|
-
- [Create auditor instance](#create-auditor-instance)
|
26
|
-
- [create_auditor](#create_auditor)
|
27
|
-
- [Create validator instance](#create-validator-instance)
|
28
|
-
- [create_servers_list](#create_servers_list)
|
29
|
-
- [create_validator](#create_validator)
|
30
|
-
- [Truemail family](#truemail-family)
|
31
|
-
- [Contributing](#contributing)
|
32
|
-
- [License](#license)
|
33
|
-
- [Code of Conduct](#code-of-conduct)
|
34
|
-
- [Credits](#credits)
|
35
|
-
- [Versioning](#versioning)
|
36
|
-
- [Changelog](CHANGELOG.md)
|
37
|
-
|
38
|
-
## Requirements
|
39
|
-
|
40
|
-
Ruby MRI 2.5.0+
|
41
|
-
|
42
|
-
## Features
|
43
|
-
|
44
|
-
- Ability to create `Truemail::Configuration` instance with random or with predefined params
|
45
|
-
- Ability to create `Truemail::Auditor` instance with random or with predefined params
|
46
|
-
- Ability to create `Truemail::Validator` instance with random or with predefined params
|
47
|
-
|
48
|
-
## Installation
|
49
|
-
|
50
|
-
Add this line to your application's `Gemfile`:
|
51
|
-
|
52
|
-
```ruby
|
53
|
-
group :development, :test do
|
54
|
-
gem 'truemail-rspec', require: false
|
55
|
-
end
|
56
|
-
```
|
57
|
-
|
58
|
-
And add into your `spec_helper.rb` or `rails_helper.rb`:
|
59
|
-
|
60
|
-
```ruby
|
61
|
-
require 'truemail/rspec'
|
62
|
-
|
63
|
-
RSpec.configure do |config|
|
64
|
-
config.include Truemail::RSpec
|
65
|
-
end
|
66
|
-
```
|
67
|
-
|
68
|
-
And then execute:
|
69
|
-
|
70
|
-
$ bundle
|
71
|
-
|
72
|
-
Or install it yourself as:
|
73
|
-
|
74
|
-
$ gem install truemail-rspec
|
75
|
-
|
76
|
-
## Usage
|
77
|
-
|
78
|
-
### Create configuration instance
|
79
|
-
|
80
|
-
Allows to create configuration instance with random or with predefined params.
|
81
|
-
|
82
|
-
#### Configuration instance with default random params
|
83
|
-
|
84
|
-
```ruby
|
85
|
-
create_configuration
|
86
|
-
|
87
|
-
# => returns Truemail::Configuration instance with
|
88
|
-
# random verifier_email and default Truemail::Configuration params
|
89
|
-
```
|
90
|
-
|
91
|
-
#### Configuration instance with predefined params
|
92
|
-
|
93
|
-
All `Truemail::Configuration` [available params](https://github.com/truemail-rb/truemail#setting-global-configuration)
|
94
|
-
|
95
|
-
```ruby
|
96
|
-
create_configuration(verifier_email: 'email@domain.com', verifier_domain: 'other-domain.com')
|
97
|
-
# => returns Truemail::Configuration instance with custom settings
|
98
|
-
```
|
99
|
-
|
100
|
-
### Create auditor instance
|
101
|
-
|
102
|
-
Allows to create auditor instance with default random or with predefined params.
|
103
|
-
|
104
|
-
#### create_auditor
|
105
|
-
|
106
|
-
```ruby
|
107
|
-
create_auditor(
|
108
|
-
success: true, # optional, type:Bool, by default true
|
109
|
-
current_host_ip: current_host_ip, # optional, type:String, by default random IPv4 address
|
110
|
-
warnings: warnings, # optional, type:Hash, by default creates auditor result warnings
|
111
|
-
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
|
112
|
-
)
|
113
|
-
|
114
|
-
# => returns Truemail::Auditor instance follow passed params
|
115
|
-
```
|
116
|
-
|
117
|
-
### Create validator instance
|
118
|
-
|
119
|
-
Allows to create validator instance with default random or with predefined params.
|
120
|
-
|
121
|
-
#### create_servers_list
|
122
|
-
|
123
|
-
```ruby
|
124
|
-
create_servers_list # => returns array with random ip addresses
|
125
|
-
create_servers_list(42) # => returns array with 42 random ip addresses
|
126
|
-
```
|
127
|
-
|
128
|
-
#### create_validator
|
129
|
-
|
130
|
-
```ruby
|
131
|
-
create_validator(
|
132
|
-
validation_type, # optional, type:Symbol, can be :whitelist, :regex, :mx, :mx_blacklist or :smtp, by default creates :smtp validation
|
133
|
-
email, # optional, type:String, by default random email
|
134
|
-
mail_servers, # optional, type:Array(String), by default array with random ip addresses
|
135
|
-
success: true, # optional, type:Bool, by default true
|
136
|
-
rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
|
137
|
-
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
|
138
|
-
)
|
139
|
-
|
140
|
-
# => returns Truemail::Validator instance follow passed params
|
141
|
-
```
|
142
|
-
|
143
|
-
---
|
144
|
-
|
145
|
-
## Truemail family
|
146
|
-
|
147
|
-
All Truemail solutions: https://truemail-rb.org
|
148
|
-
|
149
|
-
| Name | Type | Description |
|
150
|
-
| --- | --- | --- |
|
151
|
-
| [truemail](https://github.com/truemail-rb/truemail) | ruby gem | Configurable framework agnostic plain Ruby email validator, main core |
|
152
|
-
| [truemail-go](https://github.com/truemail-rb/truemail-go) | go package | Configurable Golang email validator, main core |
|
153
|
-
| [truemail server](https://github.com/truemail-rb/truemail-rack) | ruby app | Lightweight rack based web API wrapper for Truemail gem |
|
154
|
-
| [truemail-rack-docker](https://github.com/truemail-rb/truemail-rack-docker-image) | docker image | Lightweight rack based web API [dockerized image](https://hub.docker.com/r/truemail/truemail-rack) :whale: of Truemail server |
|
155
|
-
| [truemail-ruby-client](https://github.com/truemail-rb/truemail-ruby-client) | ruby gem | Web API Ruby client for Truemail Server |
|
156
|
-
| [truemail-crystal-client](https://github.com/truemail-rb/truemail-crystal-client) | crystal shard | Web API Crystal client for Truemail Server |
|
157
|
-
| [truemail-java-client](https://github.com/truemail-rb/truemail-java-client) | java lib | Web API Java client for Truemail Server |
|
158
|
-
|
159
|
-
## Contributing
|
160
|
-
|
161
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/truemail-rb/truemail-rspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. Please check the [open tickets](https://github.com/truemail-rb/truemail-rspec/issues). Be sure to follow Contributor Code of Conduct below and our [Contributing Guidelines](CONTRIBUTING.md).
|
162
|
-
|
163
|
-
## License
|
164
|
-
|
165
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
166
|
-
|
167
|
-
## Code of Conduct
|
168
|
-
|
169
|
-
Everyone interacting in the `truemail-rspec` project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
|
170
|
-
|
171
|
-
## Credits
|
172
|
-
|
173
|
-
- [The Contributors](https://github.com/truemail-rb/truemail-rspec/graphs/contributors) for code and awesome suggestions
|
174
|
-
- [The Stargazers](https://github.com/truemail-rb/truemail-rspec/stargazers) for showing their support
|
175
|
-
|
176
|
-
## Versioning
|
177
|
-
|
178
|
-
`truemail-rspec` uses [Semantic Versioning 2.0.0](https://semver.org)
|