truemail-rspec 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.github/BRANCH_NAMING_CONVENTION.md +36 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
- data/.github/{ISSUE_TEMPLATE.md → ISSUE_TEMPLATE/issue_report.md} +16 -5
- data/.github/ISSUE_TEMPLATE/question.md +22 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +3 -0
- data/.rubocop.yml +60 -0
- data/CHANGELOG.md +23 -0
- data/CONTRIBUTING.md +15 -14
- data/Gemfile.lock +51 -45
- data/README.md +18 -8
- data/lib/truemail/rspec/auditor_helper.rb +1 -1
- data/lib/truemail/rspec/configuration_helper.rb +1 -1
- data/lib/truemail/rspec/validator_helper.rb +9 -7
- data/lib/truemail/rspec/version.rb +1 -1
- data/truemail-rspec.gemspec +9 -9
- metadata +45 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7355cdad3a7658d442cc0df14bb7f72feedd786eaa1fddd2a4c69986fbcf6122
|
4
|
+
data.tar.gz: 8cbd4a1820c929c0f2f97ef8b417cd1332cbf0509069fd468049e90b5e56f986
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7354e4b6ca376b87aeee2c934dab1400dd18c0bd4661bf60ab06a82cd097f9e13fa5d92a88e81f46942f701cbf1f5361c74524c19b0a590a42abb833de548eb3
|
7
|
+
data.tar.gz: 4f23889360171f7ffaed27a042da23985fa7466516fd293dc80f9578799353d5b680bd3dec4b9753e6937022cea26ca695556b75025111e5601bde9ab2ff1f4b
|
data/.codeclimate.yml
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Branch naming convention
|
2
|
+
|
3
|
+
## Branch naming
|
4
|
+
|
5
|
+
> Please note for new pull requests create new branches from current `develop` branch only.
|
6
|
+
|
7
|
+
Branch name should include type of your contribution and context. Please follow next pattern for naming your branches:
|
8
|
+
|
9
|
+
```bash
|
10
|
+
feature/add-some-feature
|
11
|
+
technical/some-technical-improvements
|
12
|
+
bugfix/fix-some-bug-name
|
13
|
+
```
|
14
|
+
|
15
|
+
## Before PR actions
|
16
|
+
|
17
|
+
### Squash commits
|
18
|
+
|
19
|
+
Please squash all branch commits into the one before openning your PR from your fork. It's simple to do with the git:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
git rebase -i [hash your first commit of your branch]~1
|
23
|
+
git rebase -i 6467fe36232401fa740af067cfd8ac9ec932fed2~1 # example
|
24
|
+
```
|
25
|
+
|
26
|
+
### Add commit description
|
27
|
+
|
28
|
+
Please complete your commit description folowing next pattern:
|
29
|
+
|
30
|
+
```
|
31
|
+
Technical/Add info files # should be the same name as your branch name
|
32
|
+
|
33
|
+
* Added license, changelog, contributing, code of conduct docs
|
34
|
+
* Added GitHub templates
|
35
|
+
* Updated project license link
|
36
|
+
```
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: "[BUG] Your bug report title here"
|
5
|
+
labels: bug
|
6
|
+
assignees: bestwebua
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
<!-- Thanks for helping to make Truemail better! Before submit your bug, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->
|
11
|
+
|
12
|
+
### New bug checklist
|
13
|
+
|
14
|
+
- [ ] I have updated `truemail-rspec` to the latest version
|
15
|
+
- [ ] I have read the [Contribution Guidelines](https://github.com/truemail-rb/truemail-rspec/blob/master/CONTRIBUTING.md)
|
16
|
+
- [ ] I have read the [documentation](https://truemail-rb.org/truemail-rspec)
|
17
|
+
- [ ] I have searched for [existing GitHub issues](https://github.com/truemail-rb/truemail-rspec/issues)
|
18
|
+
|
19
|
+
<!-- Please use next pattern for your bug report title: [BUG] Your bug report title here -->
|
20
|
+
|
21
|
+
### Bug description
|
22
|
+
<!-- Please include what's happening, expected behavior, and any relevant code samples -->
|
23
|
+
|
24
|
+
##### Complete output when running truemail-rspec, including the stack trace and command used
|
25
|
+
|
26
|
+
<details>
|
27
|
+
<pre>[INSERT OUTPUT HERE]</pre>
|
28
|
+
</details>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for Truemail
|
4
|
+
title: "[FEATURE] Your feature request title here"
|
5
|
+
labels: enhancement
|
6
|
+
assignees: bestwebua
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
<!-- Thanks for helping to make Truemail better! Before submit your new feature request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->
|
11
|
+
|
12
|
+
### New feature request checklist
|
13
|
+
|
14
|
+
- [ ] I have updated `truemail-rspec` to the latest version
|
15
|
+
- [ ] I have read the [Contribution Guidelines](https://github.com/truemail-rb/truemail-rspec/blob/master/CONTRIBUTING.md)
|
16
|
+
- [ ] I have read the [documentation](https://truemail-rb.org/truemail-rspec)
|
17
|
+
- [ ] I have searched for [existing GitHub issues](https://github.com/truemail-rb/truemail-rspec/issues)
|
18
|
+
|
19
|
+
<!-- Please use next pattern for your feature request title: [FEATURE] Your feature request title here -->
|
20
|
+
|
21
|
+
### Feature description
|
22
|
+
|
23
|
+
<!-- Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
24
|
+
|
25
|
+
Describe the solution you'd like. A clear and concise description of what you want to happen.
|
26
|
+
|
27
|
+
Describe alternatives you've considered. A clear and concise description of any alternative solutions or features you've considered. -->
|
@@ -1,16 +1,27 @@
|
|
1
|
+
---
|
2
|
+
name: Issue report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: "[ISSUE] Your issue report title here"
|
5
|
+
labels: ''
|
6
|
+
assignees: bestwebua
|
7
|
+
|
8
|
+
---
|
9
|
+
|
1
10
|
<!-- Thanks for helping to make Truemail better! Before submit your issue, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->
|
2
11
|
|
3
|
-
### New
|
12
|
+
### New issue checklist
|
4
13
|
|
5
|
-
- [ ] I have updated truemail-rspec to the latest version
|
14
|
+
- [ ] I have updated `truemail-rspec` to the latest version
|
6
15
|
- [ ] I have read the [Contribution Guidelines](https://github.com/truemail-rb/truemail-rspec/blob/master/CONTRIBUTING.md)
|
7
|
-
- [ ] I have read the [documentation](https://
|
16
|
+
- [ ] I have read the [documentation](https://truemail-rb.org/truemail-rspec)
|
8
17
|
- [ ] I have searched for [existing GitHub issues](https://github.com/truemail-rb/truemail-rspec/issues)
|
9
18
|
|
10
|
-
|
19
|
+
<!-- Please use next pattern for your issue report title: [ISSUE] Your issue report title here -->
|
20
|
+
|
21
|
+
### Issue description
|
11
22
|
<!-- Please include what's happening, expected behavior, and any relevant code samples -->
|
12
23
|
|
13
|
-
##### Complete output when running truemail, including the stack trace and command used
|
24
|
+
##### Complete output when running truemail-rspec, including the stack trace and command used
|
14
25
|
|
15
26
|
<details>
|
16
27
|
<pre>[INSERT OUTPUT HERE]</pre>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
name: Question
|
3
|
+
about: Ask your question to Truemail team
|
4
|
+
title: "[QUESTION] Your question title here"
|
5
|
+
labels: question
|
6
|
+
assignees: bestwebua
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
<!-- Thanks for helping to make Truemail better! Before submit your question, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->
|
11
|
+
|
12
|
+
### New question checklist
|
13
|
+
|
14
|
+
- [ ] I have read the [Contribution Guidelines](https://github.com/truemail-rb/truemail-rspec/blob/master/CONTRIBUTING.md)
|
15
|
+
- [ ] I have read the [documentation](https://truemail-rb.org/truemail-rspec)
|
16
|
+
- [ ] I have searched for [existing GitHub issues](https://github.com/truemail-rb/truemail-rspec/issues)
|
17
|
+
|
18
|
+
<!-- Please use next pattern for your question title: [QUESTION] Your question title here -->
|
19
|
+
|
20
|
+
### Question
|
21
|
+
|
22
|
+
<!-- Your question context here -->
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# PR Details
|
2
2
|
|
3
3
|
<!-- Provide a general summary of your changes in the Title above -->
|
4
|
+
<!-- PR name should the same name as your branch name, example: -->
|
5
|
+
<!-- Branch name is: feature/add-some-feature -->
|
6
|
+
<!-- PR name should be: Feature/Add some feature -->
|
4
7
|
|
5
8
|
## Description
|
6
9
|
|
data/.rubocop.yml
CHANGED
@@ -103,6 +103,27 @@ Style/SlicingWithRange:
|
|
103
103
|
Style/StringConcatenation:
|
104
104
|
Enabled: true
|
105
105
|
|
106
|
+
Style/ArgumentsForwarding:
|
107
|
+
Enabled: true
|
108
|
+
|
109
|
+
Style/CollectionCompact:
|
110
|
+
Enabled: true
|
111
|
+
|
112
|
+
Style/DocumentDynamicEvalDefinition:
|
113
|
+
Enabled: true
|
114
|
+
|
115
|
+
Style/NegatedIfElseCondition:
|
116
|
+
Enabled: true
|
117
|
+
|
118
|
+
Style/NilLambda:
|
119
|
+
Enabled: true
|
120
|
+
|
121
|
+
Style/RedundantArgument:
|
122
|
+
Enabled: true
|
123
|
+
|
124
|
+
Style/SwapValues:
|
125
|
+
Enabled: true
|
126
|
+
|
106
127
|
Layout/EmptyLinesAroundAttributeAccessor:
|
107
128
|
Enabled: true
|
108
129
|
|
@@ -176,6 +197,30 @@ Lint/TopLevelReturnWithArgument:
|
|
176
197
|
Lint/UnreachableLoop:
|
177
198
|
Enabled: true
|
178
199
|
|
200
|
+
Lint/DuplicateBranch:
|
201
|
+
Enabled: true
|
202
|
+
|
203
|
+
Lint/DuplicateRegexpCharacterClassElement:
|
204
|
+
Enabled: true
|
205
|
+
|
206
|
+
Lint/EmptyBlock:
|
207
|
+
Enabled: true
|
208
|
+
|
209
|
+
Lint/EmptyClass:
|
210
|
+
Enabled: true
|
211
|
+
|
212
|
+
Lint/NoReturnInBeginEndBlocks:
|
213
|
+
Enabled: true
|
214
|
+
|
215
|
+
Lint/ToEnumArguments:
|
216
|
+
Enabled: true
|
217
|
+
|
218
|
+
Lint/UnexpectedBlockArity:
|
219
|
+
Enabled: true
|
220
|
+
|
221
|
+
Lint/UnmodifiedReduceAccumulator:
|
222
|
+
Enabled: true
|
223
|
+
|
179
224
|
Performance/AncestorsInclude:
|
180
225
|
Enabled: true
|
181
226
|
|
@@ -200,6 +245,21 @@ Performance/Squeeze:
|
|
200
245
|
Performance/StringInclude:
|
201
246
|
Enabled: true
|
202
247
|
|
248
|
+
Performance/BlockGivenWithExplicitBlock:
|
249
|
+
Enabled: true
|
250
|
+
|
251
|
+
Performance/CollectionLiteralInLoop:
|
252
|
+
Enabled: true
|
253
|
+
|
254
|
+
Performance/ConstantRegexp:
|
255
|
+
Enabled: true
|
256
|
+
|
257
|
+
Performance/MethodObjectAsBlock:
|
258
|
+
Enabled: true
|
259
|
+
|
260
|
+
Performance/Sum:
|
261
|
+
Enabled: true
|
262
|
+
|
203
263
|
RSpec/ExampleLength:
|
204
264
|
Enabled: false
|
205
265
|
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
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).
|
3
3
|
|
4
|
+
## [0.3.0] - 2020-12-06
|
5
|
+
|
6
|
+
### Added
|
7
|
+
|
8
|
+
Ability to pass custom context into rcptto error:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
create_validator(
|
12
|
+
validation_type, # optional, type:Symbol, can be :regex, :mx or :smtp, by default creates :smtp validation
|
13
|
+
email, # optional, type:String, by default random email
|
14
|
+
mail_servers, # optional, type:Array(String), by default array with random ip addresses
|
15
|
+
success: true, # optional, type:Bool, by default true
|
16
|
+
rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
|
17
|
+
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
21
|
+
### Changed
|
22
|
+
|
23
|
+
- Updated `Truemail::RSpec::ValidatorHelper`
|
24
|
+
- gem development, runtime dependencies
|
25
|
+
- gem documentation
|
26
|
+
|
4
27
|
## [0.2.1] - 2020-09-21
|
5
28
|
|
6
29
|
### Changed
|
data/CONTRIBUTING.md
CHANGED
@@ -6,28 +6,28 @@ Following these guidelines helps to communicate that you respect the time of the
|
|
6
6
|
|
7
7
|
## Using the issue tracker
|
8
8
|
|
9
|
-
The issue tracker is the preferred channel for [bug reports](#
|
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
10
|
|
11
|
-
|
12
|
-
## Bug/issue reports
|
11
|
+
## Issue/bug reports
|
13
12
|
|
14
|
-
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
15
|
-
Good bug reports are extremely helpful - thank you!
|
13
|
+
A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!
|
16
14
|
|
17
|
-
Guidelines for bug reports:
|
15
|
+
Guidelines for issue/bug reports:
|
18
16
|
|
19
17
|
1. **Use the GitHub issue search** — check if the issue has already been reported
|
20
|
-
2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or
|
21
|
-
3. Truemail [issue template](.github/ISSUE_TEMPLATE.md)
|
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)
|
22
20
|
|
23
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.
|
24
22
|
|
25
|
-
<a name="features"></a>
|
26
23
|
## Feature requests
|
27
24
|
|
28
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.
|
29
26
|
|
30
|
-
|
27
|
+
## Questions
|
28
|
+
|
29
|
+
We're always open to a new conversations. So if you have any questions just ask us.
|
30
|
+
|
31
31
|
## Pull requests
|
32
32
|
|
33
33
|
Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
|
@@ -39,7 +39,8 @@ Please adhere to the coding conventions used throughout a project (indentation,
|
|
39
39
|
Guidelines for pull requests:
|
40
40
|
|
41
41
|
1. Truemail [pull request template](.github/PULL_REQUEST_TEMPLATE.md)
|
42
|
-
2. Fork the repo
|
43
|
-
3. Run the tests. This is to make sure your starting point works
|
44
|
-
4.
|
45
|
-
5.
|
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 and make your changes. This includes tests for features!
|
46
|
+
6. Push to your fork and submit a pull request to `develop` branch
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
truemail-rspec (0.
|
5
|
-
rspec (~> 3.
|
6
|
-
truemail (~>
|
4
|
+
truemail-rspec (0.3.0)
|
5
|
+
rspec (~> 3.10)
|
6
|
+
truemail (~> 2.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -14,23 +14,27 @@ GEM
|
|
14
14
|
thor (>= 0.18, < 2)
|
15
15
|
byebug (11.1.3)
|
16
16
|
childprocess (4.0.0)
|
17
|
-
coderay (1.1.
|
17
|
+
coderay (1.1.3)
|
18
18
|
colorize (0.8.1)
|
19
|
-
|
19
|
+
concurrent-ruby (1.1.7)
|
20
|
+
diff-lcs (1.4.4)
|
20
21
|
docile (1.3.2)
|
22
|
+
faker (2.15.1)
|
23
|
+
i18n (>= 1.6, < 2)
|
21
24
|
fasterer (0.8.3)
|
22
25
|
colorize (~> 0.7)
|
23
26
|
ruby_parser (>= 3.14.1)
|
24
|
-
|
27
|
+
i18n (1.8.5)
|
28
|
+
concurrent-ruby (~> 1.0)
|
25
29
|
iniparse (1.5.0)
|
26
|
-
json (2.3.
|
30
|
+
json (2.3.1)
|
27
31
|
kwalify (0.7.2)
|
28
32
|
method_source (1.0.0)
|
29
|
-
overcommit (0.
|
33
|
+
overcommit (0.57.0)
|
30
34
|
childprocess (>= 0.6.3, < 5)
|
31
35
|
iniparse (~> 1.4)
|
32
|
-
parallel (1.
|
33
|
-
parser (2.7.
|
36
|
+
parallel (1.20.1)
|
37
|
+
parser (2.7.2.0)
|
34
38
|
ast (~> 2.4.1)
|
35
39
|
pry (0.13.1)
|
36
40
|
coderay (~> 1.1)
|
@@ -38,48 +42,50 @@ GEM
|
|
38
42
|
pry-byebug (3.9.0)
|
39
43
|
byebug (~> 11.0)
|
40
44
|
pry (~> 0.13.0)
|
41
|
-
psych (3.
|
45
|
+
psych (3.2.0)
|
42
46
|
rainbow (3.0.0)
|
43
47
|
rake (13.0.1)
|
44
|
-
reek (6.0.
|
48
|
+
reek (6.0.2)
|
45
49
|
kwalify (~> 0.7.0)
|
46
50
|
parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
|
47
|
-
psych (~> 3.1
|
51
|
+
psych (~> 3.1)
|
48
52
|
rainbow (>= 2.0, < 4.0)
|
49
|
-
regexp_parser (
|
53
|
+
regexp_parser (2.0.0)
|
50
54
|
rexml (3.2.4)
|
51
|
-
rspec (3.
|
52
|
-
rspec-core (~> 3.
|
53
|
-
rspec-expectations (~> 3.
|
54
|
-
rspec-mocks (~> 3.
|
55
|
-
rspec-core (3.
|
56
|
-
rspec-support (~> 3.
|
57
|
-
rspec-expectations (3.
|
55
|
+
rspec (3.10.0)
|
56
|
+
rspec-core (~> 3.10.0)
|
57
|
+
rspec-expectations (~> 3.10.0)
|
58
|
+
rspec-mocks (~> 3.10.0)
|
59
|
+
rspec-core (3.10.0)
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-expectations (3.10.0)
|
58
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
59
|
-
rspec-support (~> 3.
|
60
|
-
rspec-mocks (3.
|
63
|
+
rspec-support (~> 3.10.0)
|
64
|
+
rspec-mocks (3.10.0)
|
61
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
|
-
rspec-support (~> 3.
|
63
|
-
rspec-support (3.
|
64
|
-
rubocop (
|
66
|
+
rspec-support (~> 3.10.0)
|
67
|
+
rspec-support (3.10.0)
|
68
|
+
rubocop (1.5.2)
|
65
69
|
parallel (~> 1.10)
|
66
|
-
parser (>= 2.7.1.
|
70
|
+
parser (>= 2.7.1.5)
|
67
71
|
rainbow (>= 2.2.2, < 4.0)
|
68
|
-
regexp_parser (>= 1.
|
72
|
+
regexp_parser (>= 1.8, < 3.0)
|
69
73
|
rexml
|
70
|
-
rubocop-ast (>=
|
74
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
71
75
|
ruby-progressbar (~> 1.7)
|
72
76
|
unicode-display_width (>= 1.4.0, < 2.0)
|
73
|
-
rubocop-ast (
|
74
|
-
parser (>= 2.7.1.
|
75
|
-
rubocop-performance (1.
|
76
|
-
rubocop (>= 0.
|
77
|
-
|
78
|
-
|
77
|
+
rubocop-ast (1.3.0)
|
78
|
+
parser (>= 2.7.1.5)
|
79
|
+
rubocop-performance (1.9.1)
|
80
|
+
rubocop (>= 0.90.0, < 2.0)
|
81
|
+
rubocop-ast (>= 0.4.0)
|
82
|
+
rubocop-rspec (2.0.1)
|
83
|
+
rubocop (~> 1.0)
|
84
|
+
rubocop-ast (>= 1.1.0)
|
79
85
|
ruby-progressbar (1.10.1)
|
80
|
-
ruby_parser (3.
|
86
|
+
ruby_parser (3.15.0)
|
81
87
|
sexp_processor (~> 4.9)
|
82
|
-
sexp_processor (4.
|
88
|
+
sexp_processor (4.15.1)
|
83
89
|
simplecov (0.17.1)
|
84
90
|
docile (~> 1.1)
|
85
91
|
json (>= 1.8, < 3)
|
@@ -88,7 +94,7 @@ GEM
|
|
88
94
|
simpleidn (0.1.1)
|
89
95
|
unf (~> 0.1.4)
|
90
96
|
thor (1.0.1)
|
91
|
-
truemail (
|
97
|
+
truemail (2.2.0)
|
92
98
|
simpleidn (~> 0.1.1)
|
93
99
|
unf (0.1.4)
|
94
100
|
unf_ext
|
@@ -101,16 +107,16 @@ PLATFORMS
|
|
101
107
|
DEPENDENCIES
|
102
108
|
bundler (~> 1.16)
|
103
109
|
bundler-audit (~> 0.7.0.1)
|
110
|
+
faker (~> 2.15, >= 2.15.1)
|
104
111
|
fasterer (~> 0.8.3)
|
105
|
-
|
106
|
-
overcommit (~> 0.55.0)
|
112
|
+
overcommit (~> 0.57.0)
|
107
113
|
pry-byebug (~> 3.9)
|
108
114
|
rake (~> 13.0, >= 13.0.1)
|
109
|
-
reek (~> 6.0, >= 6.0.
|
110
|
-
rspec (~> 3.
|
111
|
-
rubocop (~>
|
112
|
-
rubocop-performance (~> 1.
|
113
|
-
rubocop-rspec (~>
|
115
|
+
reek (~> 6.0, >= 6.0.2)
|
116
|
+
rspec (~> 3.10)
|
117
|
+
rubocop (~> 1.5, >= 1.5.2)
|
118
|
+
rubocop-performance (~> 1.9, >= 1.9.1)
|
119
|
+
rubocop-rspec (~> 2.0, >= 2.0.1)
|
114
120
|
simplecov (~> 0.17.1)
|
115
121
|
truemail-rspec!
|
116
122
|
|
data/README.md
CHANGED
@@ -1,8 +1,15 @@
|
|
1
|
-
![Truemail RSpec helpers](https://
|
1
|
+
# ![Truemail RSpec helpers](https://truemail-rb.org/assets/images/truemail_logo.png)
|
2
2
|
|
3
|
-
[![Maintainability](https://api.codeclimate.com/v1/badges/d23d82c1c1bdbc271b81/maintainability)](https://codeclimate.com/github/truemail-rb/truemail-rspec/maintainability)
|
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)
|
4
11
|
|
5
|
-
`truemail-rspec` gem helps you create `Truemail::Configuration` and `Truemail::Validator` instances for your RSpec environment.
|
12
|
+
`truemail-rspec` gem helps you to create `Truemail::Configuration`, `Truemail::Auditor` and `Truemail::Validator` instances for your RSpec environment.
|
6
13
|
|
7
14
|
> Actual and maintainable documentation :books: for developers is living [here](https://truemail-rb.org/truemail-rspec).
|
8
15
|
|
@@ -35,6 +42,7 @@ Ruby MRI 2.5.0+
|
|
35
42
|
## Features
|
36
43
|
|
37
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
|
38
46
|
- Ability to create `Truemail::Validator` instance with random or with predefined params
|
39
47
|
|
40
48
|
## Installation
|
@@ -124,6 +132,7 @@ create_validator(
|
|
124
132
|
email, # optional, type:String, by default random email
|
125
133
|
mail_servers, # optional, type:Array(String), by default array with random ip addresses
|
126
134
|
success: true, # optional, type:Bool, by default true
|
135
|
+
rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
|
127
136
|
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
|
128
137
|
)
|
129
138
|
|
@@ -134,15 +143,16 @@ create_validator(
|
|
134
143
|
|
135
144
|
## Truemail family
|
136
145
|
|
137
|
-
All Truemail
|
146
|
+
All Truemail solutions: https://truemail-rb.org
|
138
147
|
|
139
148
|
| Name | Type | Description |
|
140
149
|
| --- | --- | --- |
|
141
|
-
| [truemail](https://github.com/
|
142
|
-
| [truemail server](https://github.com/truemail-rb/truemail-rack) | ruby app | Lightweight rack based web API wrapper for Truemail |
|
150
|
+
| [truemail](https://github.com/truemail-rb/truemail) | ruby gem | Configurable framework agnostic plain Ruby email validator, main core |
|
151
|
+
| [truemail server](https://github.com/truemail-rb/truemail-rack) | ruby app | Lightweight rack based web API wrapper for Truemail gem |
|
143
152
|
| [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 |
|
144
|
-
| [truemail-ruby-client](https://github.com/truemail-rb/truemail-ruby-client) | ruby gem |
|
145
|
-
| [truemail-crystal-client](https://github.com/truemail-rb/truemail-crystal-client) | crystal shard |
|
153
|
+
| [truemail-ruby-client](https://github.com/truemail-rb/truemail-ruby-client) | ruby gem | Web API Ruby client for Truemail Server |
|
154
|
+
| [truemail-crystal-client](https://github.com/truemail-rb/truemail-crystal-client) | crystal shard | Web API Crystal client for Truemail Server |
|
155
|
+
| [truemail-java-client](https://github.com/truemail-rb/truemail-java-client) | java lib | Web API Java client for Truemail Server |
|
146
156
|
|
147
157
|
## Contributing
|
148
158
|
|
@@ -5,7 +5,7 @@ module Truemail
|
|
5
5
|
module AuditorHelper
|
6
6
|
def create_auditor(
|
7
7
|
success: true,
|
8
|
-
current_host_ip:
|
8
|
+
current_host_ip: Faker::Internet.ip_v4_address,
|
9
9
|
warnings: { ip: Truemail::Audit::Ip::IPIFY_ERROR },
|
10
10
|
configuration: create_configuration
|
11
11
|
)
|
@@ -12,7 +12,7 @@ module Truemail
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def create_configuration(**configuration_settings)
|
15
|
-
configuration_settings[:verifier_email] =
|
15
|
+
configuration_settings[:verifier_email] = Faker::Internet.email unless configuration_settings[:verifier_email]
|
16
16
|
Truemail::Configuration.new(&configuration_block(**configuration_settings))
|
17
17
|
end
|
18
18
|
end
|
@@ -4,17 +4,18 @@ module Truemail
|
|
4
4
|
module RSpec
|
5
5
|
module ValidatorHelper
|
6
6
|
def create_servers_list
|
7
|
-
Array.new(rand(1..4)) {
|
7
|
+
Array.new(rand(1..4)) { Faker::Internet.ip_v4_address }
|
8
8
|
end
|
9
9
|
|
10
|
-
def create_validator(
|
10
|
+
def create_validator( # rubocop:disable Metrics/ParameterLists
|
11
11
|
validation_type = nil,
|
12
|
-
email =
|
12
|
+
email = Faker::Internet.email,
|
13
13
|
mail_servers = create_servers_list,
|
14
|
+
rcptto_error: 'user not found',
|
14
15
|
success: true,
|
15
16
|
configuration: create_configuration
|
16
17
|
)
|
17
|
-
set_expected_result(validation_type, email, mail_servers, success, configuration)
|
18
|
+
set_expected_result(validation_type, email, mail_servers, success, configuration, rcptto_error)
|
18
19
|
stub_validation_layers
|
19
20
|
validator_instance = ValidatorFactory.call(validation_type, success, email, configuration)
|
20
21
|
unstub_validation_layers
|
@@ -23,14 +24,15 @@ module Truemail
|
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
|
-
attr_reader :validation_type, :email, :success, :configuration, :mail_servers
|
27
|
+
attr_reader :validation_type, :email, :success, :configuration, :mail_servers, :rcptto_error
|
27
28
|
|
28
|
-
def set_expected_result(validation_type, email, mail_servers, success, configuration)
|
29
|
+
def set_expected_result(validation_type, email, mail_servers, success, configuration, rcptto_error) # rubocop:disable Metrics/ParameterLists
|
29
30
|
@validation_type = validation_type
|
30
31
|
@email = email
|
31
32
|
@mail_servers = mail_servers
|
32
33
|
@success = success
|
33
34
|
@configuration = configuration
|
35
|
+
@rcptto_error = rcptto_error
|
34
36
|
end
|
35
37
|
|
36
38
|
def stub_validation_layers
|
@@ -74,7 +76,7 @@ module Truemail
|
|
74
76
|
response.helo = true
|
75
77
|
response.mailfrom = true
|
76
78
|
response.rcptto = false
|
77
|
-
response.errors[:rcptto] =
|
79
|
+
response.errors[:rcptto] = rcptto_error
|
78
80
|
end
|
79
81
|
|
80
82
|
request
|
data/truemail-rspec.gemspec
CHANGED
@@ -33,17 +33,17 @@ Gem::Specification.new do |spec|
|
|
33
33
|
|
34
34
|
spec.add_development_dependency 'bundler', '~> 1.16'
|
35
35
|
spec.add_development_dependency 'bundler-audit', '~> 0.7.0.1'
|
36
|
+
spec.add_development_dependency 'faker', '~> 2.15', '>= 2.15.1'
|
36
37
|
spec.add_development_dependency 'fasterer', '~> 0.8.3'
|
37
|
-
spec.add_development_dependency '
|
38
|
-
spec.add_development_dependency 'overcommit', '~> 0.55.0'
|
38
|
+
spec.add_development_dependency 'overcommit', '~> 0.57.0'
|
39
39
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
40
40
|
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.1'
|
41
|
-
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.
|
42
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
43
|
-
spec.add_development_dependency 'rubocop', '~>
|
44
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.
|
45
|
-
spec.add_development_dependency 'rubocop-rspec', '~>
|
41
|
+
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.2'
|
42
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
43
|
+
spec.add_development_dependency 'rubocop', '~> 1.5', '>= 1.5.2'
|
44
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.9', '>= 1.9.1'
|
45
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.0', '>= 2.0.1'
|
46
46
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
47
|
-
spec.add_runtime_dependency 'rspec', '~> 3.
|
48
|
-
spec.add_runtime_dependency 'truemail', '~>
|
47
|
+
spec.add_runtime_dependency 'rspec', '~> 3.10'
|
48
|
+
spec.add_runtime_dependency 'truemail', '~> 2.2'
|
49
49
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: truemail-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -39,47 +39,53 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.7.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: faker
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '2.15'
|
48
|
+
- - ">="
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: 2.15.1
|
48
51
|
type: :development
|
49
52
|
prerelease: false
|
50
53
|
version_requirements: !ruby/object:Gem::Requirement
|
51
54
|
requirements:
|
52
55
|
- - "~>"
|
53
56
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
57
|
+
version: '2.15'
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 2.15.1
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
62
|
+
name: fasterer
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
67
|
+
version: 0.8.3
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
74
|
+
version: 0.8.3
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: overcommit
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
81
|
+
version: 0.57.0
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
88
|
+
version: 0.57.0
|
83
89
|
- !ruby/object:Gem::Dependency
|
84
90
|
name: pry-byebug
|
85
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,7 +129,7 @@ dependencies:
|
|
123
129
|
version: '6.0'
|
124
130
|
- - ">="
|
125
131
|
- !ruby/object:Gem::Version
|
126
|
-
version: 6.0.
|
132
|
+
version: 6.0.2
|
127
133
|
type: :development
|
128
134
|
prerelease: false
|
129
135
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -133,75 +139,81 @@ dependencies:
|
|
133
139
|
version: '6.0'
|
134
140
|
- - ">="
|
135
141
|
- !ruby/object:Gem::Version
|
136
|
-
version: 6.0.
|
142
|
+
version: 6.0.2
|
137
143
|
- !ruby/object:Gem::Dependency
|
138
144
|
name: rspec
|
139
145
|
requirement: !ruby/object:Gem::Requirement
|
140
146
|
requirements:
|
141
147
|
- - "~>"
|
142
148
|
- !ruby/object:Gem::Version
|
143
|
-
version: '3.
|
149
|
+
version: '3.10'
|
144
150
|
type: :development
|
145
151
|
prerelease: false
|
146
152
|
version_requirements: !ruby/object:Gem::Requirement
|
147
153
|
requirements:
|
148
154
|
- - "~>"
|
149
155
|
- !ruby/object:Gem::Version
|
150
|
-
version: '3.
|
156
|
+
version: '3.10'
|
151
157
|
- !ruby/object:Gem::Dependency
|
152
158
|
name: rubocop
|
153
159
|
requirement: !ruby/object:Gem::Requirement
|
154
160
|
requirements:
|
155
161
|
- - "~>"
|
156
162
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
163
|
+
version: '1.5'
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.5.2
|
158
167
|
type: :development
|
159
168
|
prerelease: false
|
160
169
|
version_requirements: !ruby/object:Gem::Requirement
|
161
170
|
requirements:
|
162
171
|
- - "~>"
|
163
172
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
173
|
+
version: '1.5'
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: 1.5.2
|
165
177
|
- !ruby/object:Gem::Dependency
|
166
178
|
name: rubocop-performance
|
167
179
|
requirement: !ruby/object:Gem::Requirement
|
168
180
|
requirements:
|
169
181
|
- - "~>"
|
170
182
|
- !ruby/object:Gem::Version
|
171
|
-
version: '1.
|
183
|
+
version: '1.9'
|
172
184
|
- - ">="
|
173
185
|
- !ruby/object:Gem::Version
|
174
|
-
version: 1.
|
186
|
+
version: 1.9.1
|
175
187
|
type: :development
|
176
188
|
prerelease: false
|
177
189
|
version_requirements: !ruby/object:Gem::Requirement
|
178
190
|
requirements:
|
179
191
|
- - "~>"
|
180
192
|
- !ruby/object:Gem::Version
|
181
|
-
version: '1.
|
193
|
+
version: '1.9'
|
182
194
|
- - ">="
|
183
195
|
- !ruby/object:Gem::Version
|
184
|
-
version: 1.
|
196
|
+
version: 1.9.1
|
185
197
|
- !ruby/object:Gem::Dependency
|
186
198
|
name: rubocop-rspec
|
187
199
|
requirement: !ruby/object:Gem::Requirement
|
188
200
|
requirements:
|
189
201
|
- - "~>"
|
190
202
|
- !ruby/object:Gem::Version
|
191
|
-
version: '
|
203
|
+
version: '2.0'
|
192
204
|
- - ">="
|
193
205
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
206
|
+
version: 2.0.1
|
195
207
|
type: :development
|
196
208
|
prerelease: false
|
197
209
|
version_requirements: !ruby/object:Gem::Requirement
|
198
210
|
requirements:
|
199
211
|
- - "~>"
|
200
212
|
- !ruby/object:Gem::Version
|
201
|
-
version: '
|
213
|
+
version: '2.0'
|
202
214
|
- - ">="
|
203
215
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
216
|
+
version: 2.0.1
|
205
217
|
- !ruby/object:Gem::Dependency
|
206
218
|
name: simplecov
|
207
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -222,34 +234,28 @@ dependencies:
|
|
222
234
|
requirements:
|
223
235
|
- - "~>"
|
224
236
|
- !ruby/object:Gem::Version
|
225
|
-
version: '3.
|
237
|
+
version: '3.10'
|
226
238
|
type: :runtime
|
227
239
|
prerelease: false
|
228
240
|
version_requirements: !ruby/object:Gem::Requirement
|
229
241
|
requirements:
|
230
242
|
- - "~>"
|
231
243
|
- !ruby/object:Gem::Version
|
232
|
-
version: '3.
|
244
|
+
version: '3.10'
|
233
245
|
- !ruby/object:Gem::Dependency
|
234
246
|
name: truemail
|
235
247
|
requirement: !ruby/object:Gem::Requirement
|
236
248
|
requirements:
|
237
249
|
- - "~>"
|
238
250
|
- !ruby/object:Gem::Version
|
239
|
-
version: '
|
240
|
-
- - ">="
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: 1.4.1
|
251
|
+
version: '2.2'
|
243
252
|
type: :runtime
|
244
253
|
prerelease: false
|
245
254
|
version_requirements: !ruby/object:Gem::Requirement
|
246
255
|
requirements:
|
247
256
|
- - "~>"
|
248
257
|
- !ruby/object:Gem::Version
|
249
|
-
version: '
|
250
|
-
- - ">="
|
251
|
-
- !ruby/object:Gem::Version
|
252
|
-
version: 1.4.1
|
258
|
+
version: '2.2'
|
253
259
|
description: Truemail RSpec helpers
|
254
260
|
email:
|
255
261
|
- admin@bestweb.com.ua
|
@@ -259,7 +265,11 @@ extra_rdoc_files: []
|
|
259
265
|
files:
|
260
266
|
- ".circleci/config.yml"
|
261
267
|
- ".codeclimate.yml"
|
262
|
-
- ".github/
|
268
|
+
- ".github/BRANCH_NAMING_CONVENTION.md"
|
269
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
270
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
271
|
+
- ".github/ISSUE_TEMPLATE/issue_report.md"
|
272
|
+
- ".github/ISSUE_TEMPLATE/question.md"
|
263
273
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
264
274
|
- ".gitignore"
|
265
275
|
- ".overcommit.yml"
|