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.
@@ -1,49 +0,0 @@
1
- # PR Details
2
-
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 -->
7
-
8
- ## Description
9
-
10
- <!--- Describe your changes in detail -->
11
-
12
- ## Related Issue
13
-
14
- <!--- This project only accepts pull requests related to open issues -->
15
- <!--- If suggesting a new feature or change, please discuss it in an issue first -->
16
- <!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
17
- <!--- Please link to the issue here: -->
18
-
19
- ## Motivation and Context
20
-
21
- <!--- Why is this change required? What problem does it solve? -->
22
-
23
- ## How Has This Been Tested
24
-
25
- <!--- Please describe in detail how you tested your changes. -->
26
- <!--- Include details of your testing environment, and the tests you ran to -->
27
- <!--- see how your change affects other areas of the code, etc. -->
28
-
29
- ## Types of changes
30
-
31
- <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
32
-
33
- - [ ] Docs change / refactoring / dependency upgrade
34
- - [ ] Bug fix (non-breaking change which fixes an issue)
35
- - [ ] New feature (non-breaking change which adds functionality)
36
- - [ ] Breaking change (fix or feature that would cause existing functionality to change)
37
-
38
- ## Checklist
39
-
40
- <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
41
- <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
42
-
43
- - [ ] My code follows the code style of this project
44
- - [ ] My change requires a change to the documentation
45
- - [ ] I have updated the documentation accordingly
46
- - [ ] I have read the [**CONTRIBUTING** document](https://github.com/truemail-rb/truemail-rspec/blob/master/CONTRIBUTING.md)
47
- - [ ] I have added tests to cover my changes
48
- - [ ] I have run `bundle exec rspec` from the root directory to see all new and existing tests pass
49
- - [ ] I have run `rubocop` and `reek` to ensure the code style is valid
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- /.rspec_status
2
- /pkg
3
- /coverage/
4
- Gemfile.lock
data/.overcommit.yml DELETED
@@ -1,32 +0,0 @@
1
- PreCommit:
2
- AuthorEmail:
3
- enabled: true
4
- required: false
5
-
6
- AuthorName:
7
- enabled: false
8
-
9
- BundleAudit:
10
- enabled: true
11
-
12
- Fasterer:
13
- enabled: true
14
- include: '**/*.rb'
15
-
16
- TrailingWhitespace:
17
- enabled: true
18
-
19
- RuboCop:
20
- enabled: true
21
- flags: ['--format=emacs', '--force-exclusion', '--display-cop-names']
22
-
23
- Reek:
24
- enabled: true
25
- flags: ['--force-exclusion']
26
-
27
- PostCheckout:
28
- ALL:
29
- quiet: true
30
-
31
- IndexTags:
32
- enabled: true
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
@@ -1,2 +0,0 @@
1
- --require spec_helper
2
- --format documentation
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,254 +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
- ## [0.9.2] - 2022-10-09
6
-
7
- ### Updated
8
-
9
- - Updated gem runtime dependencies
10
- - Updated gem development dependencies
11
- - Updated gem readme, gem version
12
-
13
- ## [0.9.1] - 2022-03-02
14
-
15
- ### Updated
16
-
17
- - Updated gem runtime dependencies
18
- - Updated gem development dependencies
19
- - Updated gem readme, gem version
20
-
21
- ## [0.9.0] - 2022-02-23
22
-
23
- ### Added
24
-
25
- - Added development environment guide docs
26
-
27
- ### Updated
28
-
29
- - Updated gem runtime dependencies
30
- - Updated gem development dependencies
31
- - Updated minimal Ruby version for RubyGems environment
32
- - Updated CircleCI configs
33
- - Updated contributing guide
34
-
35
- ## [0.8.0] - 2022-01-25
36
-
37
- ### Updated
38
-
39
- - Updated gem runtime dependencies
40
- - Updated gem development dependencies
41
- - Updated default Ruby version for test environment
42
- - Updated rubocop/codeclimate configs
43
-
44
- ## [0.7.0] - 2021-08-11
45
-
46
- ### Updated
47
-
48
- - gem runtime dependencies
49
- - gem development dependencies
50
-
51
- ### Changed
52
-
53
- - `faker` to `ffaker` dependency
54
-
55
- ## [0.6.0] - 2021-05-13
56
-
57
- ### Added
58
-
59
- ```ruby
60
- # Truemail::Validator instance, successful case
61
- create_validator(:mx_blacklist)
62
- => #<Truemail::Validator:0x00007fea91a1d528
63
- @result=
64
- #<struct Truemail::Validator::Result
65
- success=true,
66
- email="danyell@brakus-dooley.co",
67
- domain="brakus-dooley.co",
68
- mail_servers=["175.244.212.125", "69.106.253.221", "7.125.70.85", "152.249.195.7"],
69
- errors={},
70
- smtp_debug=nil,
71
- configuration=
72
- #<Truemail::Configuration:0x00007fea98977248
73
- @blacklisted_domains=[],
74
- @blacklisted_mx_ip_addresses=[],
75
- @connection_attempts=2,
76
- @connection_timeout=2,
77
- @default_validation_type=:smtp,
78
- @dns=[],
79
- @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)/,
80
- @not_rfc_mx_lookup_flow=false,
81
- @response_timeout=2,
82
- @smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
83
- @smtp_fail_fast=false,
84
- @smtp_safe_check=false,
85
- @validation_type_by_domain={},
86
- @verifier_domain="lubowitz.com",
87
- @verifier_email="shante.keeling@lubowitz.com",
88
- @whitelist_validation=false,
89
- @whitelisted_domains=[]>>,
90
- @validation_type=:mx_blacklist>
91
-
92
- # Truemail::Validator instance, failure case
93
- create_validator(:mx_blacklist, success: false)
94
- => #<Truemail::Validator:0x00007fea988cfd18
95
- @result=
96
- #<struct Truemail::Validator::Result
97
- success=false,
98
- email="mike.treutel@heathcote.biz",
99
- domain="heathcote.biz",
100
- mail_servers=["212.76.177.170", "253.244.87.72", "144.225.110.224"],
101
- errors={:mx_blacklist=>"blacklisted mx server ip address"},
102
- smtp_debug=nil,
103
- configuration=
104
- #<Truemail::Configuration:0x00007fea988ee150
105
- @blacklisted_domains=[],
106
- @blacklisted_mx_ip_addresses=["212.76.177.170", "253.244.87.72", "144.225.110.224"],
107
- @connection_attempts=2,
108
- @connection_timeout=2,
109
- @default_validation_type=:smtp,
110
- @dns=[],
111
- @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)/,
112
- @not_rfc_mx_lookup_flow=false,
113
- @response_timeout=2,
114
- @smtp_error_body_pattern=/(?=.*550)(?=.*(user|account|customer|mailbox)).*/i,
115
- @smtp_fail_fast=false,
116
- @smtp_safe_check=false,
117
- @validation_type_by_domain={},
118
- @verifier_domain="grant-flatley.org",
119
- @verifier_email="mariano@grant-flatley.org",
120
- @whitelist_validation=false,
121
- @whitelisted_domains=[]>>,
122
- @validation_type=:mx_blacklist>
123
- ```
124
-
125
- - Ability to create `Truemail::Validator` instance for `MxBlacklist` validation layer
126
- - Stub for `MxBlacklist` validation layer
127
- - CircleCI config for using multiple Ruby versions
128
-
129
- ### Updated
130
-
131
- - Updated gem development dependencies
132
-
133
- ### Fixed
134
-
135
- - Simplecov coverage issues
136
-
137
- ## [0.5.0] - 2021-05-05
138
-
139
- ### Added
140
-
141
- - Ability to set size for servers list
142
-
143
- ```ruby
144
- create_servers_list(42) # => returns array with 42 random ip addresses
145
- ```
146
-
147
- ### Updated
148
-
149
- - gem runtime dependencies
150
- - gem development dependencies
151
-
152
- ## [0.4.0] - 2021-02-24
153
-
154
- ### Updated
155
-
156
- - gem runtime dependencies
157
- - gem development dependencies
158
-
159
- ## [0.3.3] - 2020-12-06
160
-
161
- ### Added
162
-
163
- - `faker` import
164
-
165
- ### Updated
166
-
167
- - gem development dependencies
168
-
169
- ## [0.3.2] - 2020-12-06
170
-
171
- ### Fixed
172
-
173
- - Namespace collisions for `faker`
174
-
175
- ## [0.3.1] - 2020-12-06
176
-
177
- ### Added
178
-
179
- - Required `faker` runtime dependency
180
-
181
- ## [0.3.0] - 2020-12-06
182
-
183
- ### Added
184
-
185
- Ability to pass custom context into rcptto error:
186
-
187
- ```ruby
188
- create_validator(
189
- validation_type, # optional, type:Symbol, can be :regex, :mx or :smtp, by default creates :smtp validation
190
- email, # optional, type:String, by default random email
191
- mail_servers, # optional, type:Array(String), by default array with random ip addresses
192
- success: true, # optional, type:Bool, by default true
193
- rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
194
- configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
195
- )
196
- ```
197
-
198
- ### Changed
199
-
200
- - Updated `Truemail::RSpec::ValidatorHelper`
201
- - gem development, runtime dependencies
202
- - gem documentation
203
-
204
- ## [0.2.1] - 2020-09-21
205
-
206
- ### Changed
207
-
208
- Migrated to updated Ruby 2.7.x syntax.
209
-
210
- - Updated `Truemail::RSpec::ConfigurationHelper`
211
-
212
- ## [0.2.0] - 2020-08-31
213
-
214
- ### Added
215
-
216
- - auditor RSpec helper
217
-
218
- ### Removed
219
-
220
- - gem public documentation
221
-
222
- ## [0.1.3] - 2020-08-24
223
-
224
- ### Added
225
-
226
- - gem public documentation
227
-
228
- ### Changed
229
-
230
- - gem development dependencies
231
- - linters configs
232
-
233
- ## [0.1.2] - 2020-05-08
234
-
235
- ### Changed
236
-
237
- - gem development dependencies
238
- - gem documentation
239
-
240
- ## [0.1.1] - 2019-11-22
241
-
242
- ### Changed
243
-
244
- - gem development dependencies
245
- - linters configs
246
- - gem documentation
247
-
248
- ## [0.1.0] - 2019-11-19
249
-
250
- ### Added
251
-
252
- - configuration RSpec helper
253
- - validator RSpec helper
254
- - 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** &mdash; check if the issue has already been reported
18
- 2. **Check if the issue has been fixed** &mdash; 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
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
5
- gemspec