truemail-rspec 1.0.0 → 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/version.rb +1 -1
- data/truemail-rspec.gemspec +5 -8
- metadata +11 -35
- 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 -267
- 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/.reek.yml
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
detectors:
|
2
|
-
IrresponsibleModule:
|
3
|
-
enabled: false
|
4
|
-
|
5
|
-
FeatureEnvy:
|
6
|
-
exclude:
|
7
|
-
- Truemail::RSpec::ConfigurationHelper#create_configuration
|
8
|
-
- Truemail::RSpec::ValidatorHelper#request_instance
|
9
|
-
- Truemail::RSpec::AuditorHelper#create_auditor
|
10
|
-
|
11
|
-
ControlParameter:
|
12
|
-
exclude:
|
13
|
-
- Truemail::RSpec::AuditorHelper#create_auditor
|
14
|
-
- Truemail::RSpec::ValidatorHelper#create_servers_list
|
15
|
-
|
16
|
-
NestedIterators:
|
17
|
-
exclude:
|
18
|
-
- Truemail::RSpec::ConfigurationHelper#configuration_block
|
19
|
-
|
20
|
-
BooleanParameter:
|
21
|
-
exclude:
|
22
|
-
- Truemail::RSpec::ValidatorHelper#create_validator
|
23
|
-
- Truemail::RSpec::AuditorHelper#create_auditor
|
24
|
-
|
25
|
-
DuplicateMethodCall:
|
26
|
-
exclude:
|
27
|
-
- Truemail::RSpec::ValidatorHelper#mx_layer
|
28
|
-
- Truemail::RSpec::ValidatorHelper#mx_blacklist_layer
|
29
|
-
- Truemail::RSpec::ValidatorHelper#smtp_layer
|
30
|
-
- Truemail::RSpec::ValidatorHelper#unstub_validation_layers
|
31
|
-
|
32
|
-
TooManyInstanceVariables:
|
33
|
-
exclude:
|
34
|
-
- Truemail::RSpec::ValidatorHelper::ValidatorFactory
|
35
|
-
|
36
|
-
UtilityFunction:
|
37
|
-
exclude:
|
38
|
-
- Truemail::RSpec::ValidatorHelper#create_servers_list
|
39
|
-
|
40
|
-
LongParameterList:
|
41
|
-
enabled: false
|
42
|
-
|
43
|
-
TooManyStatements:
|
44
|
-
enabled: false
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
require:
|
2
|
-
- rubocop-rspec
|
3
|
-
- rubocop-performance
|
4
|
-
|
5
|
-
AllCops:
|
6
|
-
DisplayCopNames: true
|
7
|
-
DisplayStyleGuide: true
|
8
|
-
TargetRubyVersion: 2.5
|
9
|
-
NewCops: enable
|
10
|
-
|
11
|
-
# Metrics ---------------------------------------------------------------------
|
12
|
-
|
13
|
-
Metrics/ClassLength:
|
14
|
-
Max: 150
|
15
|
-
|
16
|
-
Metrics/MethodLength:
|
17
|
-
Max: 15
|
18
|
-
|
19
|
-
# Naming ----------------------------------------------------------------------
|
20
|
-
|
21
|
-
Naming/VariableNumber:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# Style -----------------------------------------------------------------------
|
25
|
-
|
26
|
-
Style/Documentation:
|
27
|
-
Enabled: false
|
28
|
-
|
29
|
-
# Layout ----------------------------------------------------------------------
|
30
|
-
|
31
|
-
Layout/LineLength:
|
32
|
-
Max: 140
|
33
|
-
|
34
|
-
Layout/ClassStructure:
|
35
|
-
Enabled: true
|
36
|
-
Categories:
|
37
|
-
module_inclusion:
|
38
|
-
- include
|
39
|
-
- prepend
|
40
|
-
- extend
|
41
|
-
ExpectedOrder:
|
42
|
-
- module_inclusion
|
43
|
-
- constants
|
44
|
-
- public_class_methods
|
45
|
-
- initializer
|
46
|
-
- public_methods
|
47
|
-
- protected_methods
|
48
|
-
- private_methods
|
49
|
-
|
50
|
-
Layout/EmptyLineAfterGuardClause:
|
51
|
-
Enabled: false
|
52
|
-
|
53
|
-
# Gemspec ---------------------------------------------------------------------
|
54
|
-
|
55
|
-
Gemspec/RequireMFA:
|
56
|
-
Enabled: false
|
57
|
-
|
58
|
-
# RSpec -----------------------------------------------------------------------
|
59
|
-
|
60
|
-
RSpec/ExampleLength:
|
61
|
-
Enabled: false
|
62
|
-
|
63
|
-
RSpec/NestedGroups:
|
64
|
-
Enabled: false
|
65
|
-
|
66
|
-
RSpec/MultipleExpectations:
|
67
|
-
Enabled: false
|
68
|
-
|
69
|
-
RSpec/MultipleMemoizedHelpers:
|
70
|
-
Enabled: false
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
truemail-rspec
|
data/CHANGELOG.md
DELETED
@@ -1,267 +0,0 @@
|
|
1
|
-
# Changelog
|
2
|
-
|
3
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
|
-
|
5
|
-
## [1.0.0] - 2022-10-25
|
6
|
-
|
7
|
-
### Added
|
8
|
-
|
9
|
-
- Ability to create `Truemail::Validator` instance for `Whitelist/Blacklist` validation layer
|
10
|
-
|
11
|
-
### Updated
|
12
|
-
|
13
|
-
- Updated `Truemail::RSpec::ValidatorHelper::ValidatorFactory#process_validator_params`, tests
|
14
|
-
- Updated gem runtime dependencies
|
15
|
-
- Updated gem development dependencies
|
16
|
-
- Updated gem readme, gem version
|
17
|
-
|
18
|
-
## [0.9.2] - 2022-10-09
|
19
|
-
|
20
|
-
### Updated
|
21
|
-
|
22
|
-
- Updated gem runtime dependencies
|
23
|
-
- Updated gem development dependencies
|
24
|
-
- Updated gem readme, gem version
|
25
|
-
|
26
|
-
## [0.9.1] - 2022-03-02
|
27
|
-
|
28
|
-
### Updated
|
29
|
-
|
30
|
-
- Updated gem runtime dependencies
|
31
|
-
- Updated gem development dependencies
|
32
|
-
- Updated gem readme, gem version
|
33
|
-
|
34
|
-
## [0.9.0] - 2022-02-23
|
35
|
-
|
36
|
-
### Added
|
37
|
-
|
38
|
-
- Added development environment guide docs
|
39
|
-
|
40
|
-
### Updated
|
41
|
-
|
42
|
-
- Updated gem runtime dependencies
|
43
|
-
- Updated gem development dependencies
|
44
|
-
- Updated minimal Ruby version for RubyGems environment
|
45
|
-
- Updated CircleCI configs
|
46
|
-
- Updated contributing guide
|
47
|
-
|
48
|
-
## [0.8.0] - 2022-01-25
|
49
|
-
|
50
|
-
### Updated
|
51
|
-
|
52
|
-
- Updated gem runtime dependencies
|
53
|
-
- Updated gem development dependencies
|
54
|
-
- Updated default Ruby version for test environment
|
55
|
-
- Updated rubocop/codeclimate configs
|
56
|
-
|
57
|
-
## [0.7.0] - 2021-08-11
|
58
|
-
|
59
|
-
### Updated
|
60
|
-
|
61
|
-
- gem runtime dependencies
|
62
|
-
- gem development dependencies
|
63
|
-
|
64
|
-
### Changed
|
65
|
-
|
66
|
-
- `faker` to `ffaker` dependency
|
67
|
-
|
68
|
-
## [0.6.0] - 2021-05-13
|
69
|
-
|
70
|
-
### Added
|
71
|
-
|
72
|
-
```ruby
|
73
|
-
# Truemail::Validator instance, successful case
|
74
|
-
create_validator(:mx_blacklist)
|
75
|
-
=> #<Truemail::Validator:0x00007fea91a1d528
|
76
|
-
@result=
|
77
|
-
#<struct Truemail::Validator::Result
|
78
|
-
success=true,
|
79
|
-
email="danyell@brakus-dooley.co",
|
80
|
-
domain="brakus-dooley.co",
|
81
|
-
mail_servers=["175.244.212.125", "69.106.253.221", "7.125.70.85", "152.249.195.7"],
|
82
|
-
errors={},
|
83
|
-
smtp_debug=nil,
|
84
|
-
configuration=
|
85
|
-
#<Truemail::Configuration:0x00007fea98977248
|
86
|
-
@blacklisted_domains=[],
|
87
|
-
@blacklisted_mx_ip_addresses=[],
|
88
|
-
@connection_attempts=2,
|
89
|
-
@connection_timeout=2,
|
90
|
-
@default_validation_type=:smtp,
|
91
|
-
@dns=[],
|
92
|
-
@email_pattern=/(?=\A.{6,255}\z)(\A([\p{L}0-9]+[\w|\-.+]*)@((?i-mx:[\p{L}0-9]+([\-.]{1}[\p{L}0-9]+)*\.\p{L}{2,63}))\z)/,
|
93
|
-
@not_rfc_mx_lookup_flow=false,
|
94
|
-
@response_timeout=2,
|
95
|
-
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
96
|
-
@smtp_fail_fast=false,
|
97
|
-
@smtp_safe_check=false,
|
98
|
-
@validation_type_by_domain={},
|
99
|
-
@verifier_domain="lubowitz.com",
|
100
|
-
@verifier_email="shante.keeling@lubowitz.com",
|
101
|
-
@whitelist_validation=false,
|
102
|
-
@whitelisted_domains=[]>>,
|
103
|
-
@validation_type=:mx_blacklist>
|
104
|
-
|
105
|
-
# Truemail::Validator instance, failure case
|
106
|
-
create_validator(:mx_blacklist, success: false)
|
107
|
-
=> #<Truemail::Validator:0x00007fea988cfd18
|
108
|
-
@result=
|
109
|
-
#<struct Truemail::Validator::Result
|
110
|
-
success=false,
|
111
|
-
email="mike.treutel@heathcote.biz",
|
112
|
-
domain="heathcote.biz",
|
113
|
-
mail_servers=["212.76.177.170", "253.244.87.72", "144.225.110.224"],
|
114
|
-
errors={:mx_blacklist=>"blacklisted mx server ip address"},
|
115
|
-
smtp_debug=nil,
|
116
|
-
configuration=
|
117
|
-
#<Truemail::Configuration:0x00007fea988ee150
|
118
|
-
@blacklisted_domains=[],
|
119
|
-
@blacklisted_mx_ip_addresses=["212.76.177.170", "253.244.87.72", "144.225.110.224"],
|
120
|
-
@connection_attempts=2,
|
121
|
-
@connection_timeout=2,
|
122
|
-
@default_validation_type=:smtp,
|
123
|
-
@dns=[],
|
124
|
-
@email_pattern=/(?=\A.{6,255}\z)(\A([\p{L}0-9]+[\w|\-.+]*)@((?i-mx:[\p{L}0-9]+([\-.]{1}[\p{L}0-9]+)*\.\p{L}{2,63}))\z)/,
|
125
|
-
@not_rfc_mx_lookup_flow=false,
|
126
|
-
@response_timeout=2,
|
127
|
-
@smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
|
128
|
-
@smtp_fail_fast=false,
|
129
|
-
@smtp_safe_check=false,
|
130
|
-
@validation_type_by_domain={},
|
131
|
-
@verifier_domain="grant-flatley.org",
|
132
|
-
@verifier_email="mariano@grant-flatley.org",
|
133
|
-
@whitelist_validation=false,
|
134
|
-
@whitelisted_domains=[]>>,
|
135
|
-
@validation_type=:mx_blacklist>
|
136
|
-
```
|
137
|
-
|
138
|
-
- Ability to create `Truemail::Validator` instance for `MxBlacklist` validation layer
|
139
|
-
- Stub for `MxBlacklist` validation layer
|
140
|
-
- CircleCI config for using multiple Ruby versions
|
141
|
-
|
142
|
-
### Updated
|
143
|
-
|
144
|
-
- Updated gem development dependencies
|
145
|
-
|
146
|
-
### Fixed
|
147
|
-
|
148
|
-
- Simplecov coverage issues
|
149
|
-
|
150
|
-
## [0.5.0] - 2021-05-05
|
151
|
-
|
152
|
-
### Added
|
153
|
-
|
154
|
-
- Ability to set size for servers list
|
155
|
-
|
156
|
-
```ruby
|
157
|
-
create_servers_list(42) # => returns array with 42 random ip addresses
|
158
|
-
```
|
159
|
-
|
160
|
-
### Updated
|
161
|
-
|
162
|
-
- gem runtime dependencies
|
163
|
-
- gem development dependencies
|
164
|
-
|
165
|
-
## [0.4.0] - 2021-02-24
|
166
|
-
|
167
|
-
### Updated
|
168
|
-
|
169
|
-
- gem runtime dependencies
|
170
|
-
- gem development dependencies
|
171
|
-
|
172
|
-
## [0.3.3] - 2020-12-06
|
173
|
-
|
174
|
-
### Added
|
175
|
-
|
176
|
-
- `faker` import
|
177
|
-
|
178
|
-
### Updated
|
179
|
-
|
180
|
-
- gem development dependencies
|
181
|
-
|
182
|
-
## [0.3.2] - 2020-12-06
|
183
|
-
|
184
|
-
### Fixed
|
185
|
-
|
186
|
-
- Namespace collisions for `faker`
|
187
|
-
|
188
|
-
## [0.3.1] - 2020-12-06
|
189
|
-
|
190
|
-
### Added
|
191
|
-
|
192
|
-
- Required `faker` runtime dependency
|
193
|
-
|
194
|
-
## [0.3.0] - 2020-12-06
|
195
|
-
|
196
|
-
### Added
|
197
|
-
|
198
|
-
Ability to pass custom context into rcptto error:
|
199
|
-
|
200
|
-
```ruby
|
201
|
-
create_validator(
|
202
|
-
validation_type, # optional, type:Symbol, can be :regex, :mx or :smtp, by default creates :smtp validation
|
203
|
-
email, # optional, type:String, by default random email
|
204
|
-
mail_servers, # optional, type:Array(String), by default array with random ip addresses
|
205
|
-
success: true, # optional, type:Bool, by default true
|
206
|
-
rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
|
207
|
-
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
|
208
|
-
)
|
209
|
-
```
|
210
|
-
|
211
|
-
### Changed
|
212
|
-
|
213
|
-
- Updated `Truemail::RSpec::ValidatorHelper`
|
214
|
-
- gem development, runtime dependencies
|
215
|
-
- gem documentation
|
216
|
-
|
217
|
-
## [0.2.1] - 2020-09-21
|
218
|
-
|
219
|
-
### Changed
|
220
|
-
|
221
|
-
Migrated to updated Ruby 2.7.x syntax.
|
222
|
-
|
223
|
-
- Updated `Truemail::RSpec::ConfigurationHelper`
|
224
|
-
|
225
|
-
## [0.2.0] - 2020-08-31
|
226
|
-
|
227
|
-
### Added
|
228
|
-
|
229
|
-
- auditor RSpec helper
|
230
|
-
|
231
|
-
### Removed
|
232
|
-
|
233
|
-
- gem public documentation
|
234
|
-
|
235
|
-
## [0.1.3] - 2020-08-24
|
236
|
-
|
237
|
-
### Added
|
238
|
-
|
239
|
-
- gem public documentation
|
240
|
-
|
241
|
-
### Changed
|
242
|
-
|
243
|
-
- gem development dependencies
|
244
|
-
- linters configs
|
245
|
-
|
246
|
-
## [0.1.2] - 2020-05-08
|
247
|
-
|
248
|
-
### Changed
|
249
|
-
|
250
|
-
- gem development dependencies
|
251
|
-
- gem documentation
|
252
|
-
|
253
|
-
## [0.1.1] - 2019-11-22
|
254
|
-
|
255
|
-
### Changed
|
256
|
-
|
257
|
-
- gem development dependencies
|
258
|
-
- linters configs
|
259
|
-
- gem documentation
|
260
|
-
|
261
|
-
## [0.1.0] - 2019-11-19
|
262
|
-
|
263
|
-
### Added
|
264
|
-
|
265
|
-
- configuration RSpec helper
|
266
|
-
- validator RSpec helper
|
267
|
-
- gem documentation
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
-
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
-
orientation.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
17
|
-
* Using welcoming and inclusive language
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
19
|
-
* Gracefully accepting constructive criticism
|
20
|
-
* Focusing on what is best for the community
|
21
|
-
* Showing empathy towards other community members
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
-
advances
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
38
|
-
response to any instances of unacceptable behavior.
|
39
|
-
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
-
threatening, offensive, or harmful.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
-
when an individual is representing the project or its community. Examples of
|
50
|
-
representing a project or community include using an official project e-mail
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
53
|
-
further defined and clarified by project maintainers.
|
54
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at admin@bestweb.com.ua. All
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
63
|
-
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
66
|
-
members of the project's leadership.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
-
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/CONTRIBUTING.md
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
# Contributing to Truemail
|
2
|
-
|
3
|
-
Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
|
4
|
-
|
5
|
-
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
|
6
|
-
|
7
|
-
## Using the issue tracker
|
8
|
-
|
9
|
-
The issue tracker is the preferred channel for [issue/bug reports](#issuebug-reports), [feature requests](#feature-requests), [questions](#questions) and submitting [pull requests](#pull-requests).
|
10
|
-
|
11
|
-
## Issue/bug reports
|
12
|
-
|
13
|
-
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!
|
14
|
-
|
15
|
-
Guidelines for issue/bug reports:
|
16
|
-
|
17
|
-
1. **Use the GitHub issue search** — check if the issue has already been reported
|
18
|
-
2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or `develop` branch in the repository
|
19
|
-
3. Truemail [issue template](.github/ISSUE_TEMPLATE/issue_report.md)/[bug template](.github/ISSUE_TEMPLATE/bug_report.md)
|
20
|
-
|
21
|
-
A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
|
22
|
-
|
23
|
-
## Feature requests
|
24
|
-
|
25
|
-
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the project's developers of the merits of this feature. Please provide as much detail and context as possible.
|
26
|
-
|
27
|
-
## Questions
|
28
|
-
|
29
|
-
We're always open to a new conversations. So if you have any questions just ask us.
|
30
|
-
|
31
|
-
## Pull requests
|
32
|
-
|
33
|
-
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
|
34
|
-
|
35
|
-
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code, porting to a different language), otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
|
36
|
-
|
37
|
-
Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Not all features proposed will be added but we are open to having a conversation about a feature you are championing.
|
38
|
-
|
39
|
-
Guidelines for pull requests:
|
40
|
-
|
41
|
-
1. Truemail [pull request template](.github/PULL_REQUEST_TEMPLATE.md)
|
42
|
-
2. Fork the repo, checkout to `develop` branch
|
43
|
-
3. Run the tests. This is to make sure your starting point works
|
44
|
-
4. Read our [branch naming convention](.github/BRANCH_NAMING_CONVENTION.md)
|
45
|
-
5. Create a new branch
|
46
|
-
6. Read our [setup development environment guide](.github/DEVELOPMENT_ENVIRONMENT_GUIDE.md)
|
47
|
-
7. Make your changes. Please note that your PR should include tests for the new codebase!
|
48
|
-
9. Push to your fork and submit a pull request to `develop` branch
|
data/Gemfile
DELETED
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 :emails_list, :domains_list, :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)
|