truemail-rspec 0.1.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,77 @@
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
+
27
+ ## [0.2.1] - 2020-09-21
28
+
29
+ ### Changed
30
+
31
+ Migrated to updated Ruby 2.7.x syntax.
32
+
33
+ - Updated `Truemail::RSpec::ConfigurationHelper`
34
+
35
+ ## [0.2.0] - 2020-08-31
36
+
37
+ ### Added
38
+
39
+ - auditor RSpec helper
40
+
41
+ ### Removed
42
+
43
+ - gem public documentation
44
+
45
+ ## [0.1.3] - 2020-08-24
46
+
47
+ ### Added
48
+
49
+ - gem public documentation
50
+
51
+ ### Changed
52
+
53
+ - gem development dependencies
54
+ - linters configs
55
+
56
+ ## [0.1.2] - 2020-05-08
57
+
58
+ ### Changed
59
+
60
+ - gem development dependencies
61
+ - gem documentation
62
+
4
63
  ## [0.1.1] - 2019-11-22
64
+
5
65
  ### Changed
66
+
6
67
  - gem development dependencies
7
68
  - linters configs
8
69
  - gem documentation
9
70
 
10
71
  ## [0.1.0] - 2019-11-19
72
+
11
73
  ### Added
74
+
12
75
  - configuration RSpec helper
13
76
  - validator RSpec helper
14
77
  - gem documentation
@@ -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](#bugs), [features requests](#features) and [submitting pull requests](#pull-requests).
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
- <a name="bugs"></a>
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** &mdash; check if the issue has already been reported
20
- 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` or development branch in the repository
21
- 3. Truemail [issue template](.github/ISSUE_TEMPLATE.md)
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)
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
- <a name="pull-requests"></a>
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. Tests can be run via ```rspec```
44
- 4. Create a new branch and make your changes. This includes tests for features!
45
- 5. Push to your fork and submit a pull request
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
@@ -1,121 +1,122 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- truemail-rspec (0.1.1)
5
- rspec (~> 3.0)
6
- truemail (~> 1.4, >= 1.4.1)
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/
10
10
  specs:
11
- ast (2.4.0)
12
- axiom-types (0.1.1)
13
- descendants_tracker (~> 0.0.4)
14
- ice_nine (~> 0.11.0)
15
- thread_safe (~> 0.3, >= 0.3.1)
16
- bundler-audit (0.6.1)
11
+ ast (2.4.1)
12
+ bundler-audit (0.7.0.1)
17
13
  bundler (>= 1.2.0, < 3)
18
- thor (~> 0.18)
19
- byebug (11.0.1)
20
- childprocess (3.0.0)
21
- codeclimate-engine-rb (0.4.1)
22
- virtus (~> 1.0)
23
- coderay (1.1.2)
24
- coercible (1.0.0)
25
- descendants_tracker (~> 0.0.1)
14
+ thor (>= 0.18, < 2)
15
+ byebug (11.1.3)
16
+ childprocess (4.0.0)
17
+ coderay (1.1.3)
26
18
  colorize (0.8.1)
27
- descendants_tracker (0.0.4)
28
- thread_safe (~> 0.3, >= 0.3.1)
29
- diff-lcs (1.3)
19
+ concurrent-ruby (1.1.7)
20
+ diff-lcs (1.4.4)
30
21
  docile (1.3.2)
31
- equalizer (0.0.11)
32
- fasterer (0.8.0)
22
+ faker (2.15.1)
23
+ i18n (>= 1.6, < 2)
24
+ fasterer (0.8.3)
33
25
  colorize (~> 0.7)
34
26
  ruby_parser (>= 3.14.1)
35
- ffaker (2.13.0)
36
- ice_nine (0.11.2)
37
- iniparse (1.4.4)
38
- jaro_winkler (1.5.4)
39
- json (2.2.0)
27
+ i18n (1.8.5)
28
+ concurrent-ruby (~> 1.0)
29
+ iniparse (1.5.0)
30
+ json (2.3.1)
40
31
  kwalify (0.7.2)
41
- method_source (0.9.2)
42
- overcommit (0.51.0)
43
- childprocess (>= 0.6.3, < 4)
32
+ method_source (1.0.0)
33
+ overcommit (0.57.0)
34
+ childprocess (>= 0.6.3, < 5)
44
35
  iniparse (~> 1.4)
45
- parallel (1.19.0)
46
- parser (2.6.5.0)
47
- ast (~> 2.4.0)
48
- pry (0.12.2)
49
- coderay (~> 1.1.0)
50
- method_source (~> 0.9.0)
51
- pry-byebug (3.7.0)
36
+ parallel (1.20.1)
37
+ parser (2.7.2.0)
38
+ ast (~> 2.4.1)
39
+ pry (0.13.1)
40
+ coderay (~> 1.1)
41
+ method_source (~> 1.0)
42
+ pry-byebug (3.9.0)
52
43
  byebug (~> 11.0)
53
- pry (~> 0.10)
54
- psych (3.1.0)
44
+ pry (~> 0.13.0)
45
+ psych (3.2.0)
55
46
  rainbow (3.0.0)
56
47
  rake (13.0.1)
57
- reek (5.5.0)
58
- codeclimate-engine-rb (~> 0.4.0)
48
+ reek (6.0.2)
59
49
  kwalify (~> 0.7.0)
60
- parser (>= 2.5.0.0, < 2.7, != 2.5.1.1)
61
- psych (~> 3.1.0)
50
+ parser (>= 2.5.0.0, < 2.8, != 2.5.1.1)
51
+ psych (~> 3.1)
62
52
  rainbow (>= 2.0, < 4.0)
63
- rspec (3.9.0)
64
- rspec-core (~> 3.9.0)
65
- rspec-expectations (~> 3.9.0)
66
- rspec-mocks (~> 3.9.0)
67
- rspec-core (3.9.0)
68
- rspec-support (~> 3.9.0)
69
- rspec-expectations (3.9.0)
53
+ regexp_parser (2.0.0)
54
+ rexml (3.2.4)
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)
70
62
  diff-lcs (>= 1.2.0, < 2.0)
71
- rspec-support (~> 3.9.0)
72
- rspec-mocks (3.9.0)
63
+ rspec-support (~> 3.10.0)
64
+ rspec-mocks (3.10.0)
73
65
  diff-lcs (>= 1.2.0, < 2.0)
74
- rspec-support (~> 3.9.0)
75
- rspec-support (3.9.0)
76
- rubocop (0.76.0)
77
- jaro_winkler (~> 1.5.1)
66
+ rspec-support (~> 3.10.0)
67
+ rspec-support (3.10.0)
68
+ rubocop (1.5.2)
78
69
  parallel (~> 1.10)
79
- parser (>= 2.6)
70
+ parser (>= 2.7.1.5)
80
71
  rainbow (>= 2.2.2, < 4.0)
72
+ regexp_parser (>= 1.8, < 3.0)
73
+ rexml
74
+ rubocop-ast (>= 1.2.0, < 2.0)
81
75
  ruby-progressbar (~> 1.7)
82
- unicode-display_width (>= 1.4.0, < 1.7)
83
- rubocop-rspec (1.36.0)
84
- rubocop (>= 0.68.1)
76
+ unicode-display_width (>= 1.4.0, < 2.0)
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)
85
85
  ruby-progressbar (1.10.1)
86
- ruby_parser (3.14.1)
86
+ ruby_parser (3.15.0)
87
87
  sexp_processor (~> 4.9)
88
- sexp_processor (4.13.0)
88
+ sexp_processor (4.15.1)
89
89
  simplecov (0.17.1)
90
90
  docile (~> 1.1)
91
91
  json (>= 1.8, < 3)
92
92
  simplecov-html (~> 0.10.0)
93
93
  simplecov-html (0.10.2)
94
- thor (0.20.3)
95
- thread_safe (0.3.6)
96
- truemail (1.4.1)
97
- unicode-display_width (1.6.0)
98
- virtus (1.0.5)
99
- axiom-types (~> 0.1)
100
- coercible (~> 1.0)
101
- descendants_tracker (~> 0.0, >= 0.0.3)
102
- equalizer (~> 0.0, >= 0.0.9)
94
+ simpleidn (0.1.1)
95
+ unf (~> 0.1.4)
96
+ thor (1.0.1)
97
+ truemail (2.2.0)
98
+ simpleidn (~> 0.1.1)
99
+ unf (0.1.4)
100
+ unf_ext
101
+ unf_ext (0.0.7.7)
102
+ unicode-display_width (1.7.0)
103
103
 
104
104
  PLATFORMS
105
105
  ruby
106
106
 
107
107
  DEPENDENCIES
108
108
  bundler (~> 1.16)
109
- bundler-audit (~> 0.6.1)
110
- fasterer (~> 0.8.0)
111
- ffaker (~> 2.13)
112
- overcommit (~> 0.51.0)
113
- pry-byebug (~> 3.7)
109
+ bundler-audit (~> 0.7.0.1)
110
+ faker (~> 2.15, >= 2.15.1)
111
+ fasterer (~> 0.8.3)
112
+ overcommit (~> 0.57.0)
113
+ pry-byebug (~> 3.9)
114
114
  rake (~> 13.0, >= 13.0.1)
115
- reek (~> 5.5)
116
- rspec (~> 3.9)
117
- rubocop (~> 0.76.0)
118
- rubocop-rspec (~> 1.36)
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)
119
120
  simplecov (~> 0.17.1)
120
121
  truemail-rspec!
121
122
 
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Vladislav Trotsenko
3
+ Copyright (c) 2020 Vladislav Trotsenko
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,35 +1,53 @@
1
- # <img src='https://repository-images.githubusercontent.com/222414074/393c9600-09f9-11ea-8d21-345619b97b11' height='250' alt='Truemail RSpec helpers' />
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) [![Test Coverage](https://api.codeclimate.com/v1/badges/d23d82c1c1bdbc271b81/test_coverage)](https://codeclimate.com/github/truemail-rb/truemail-rspec/test_coverage) [![CircleCI](https://circleci.com/gh/truemail-rb/truemail-rspec/tree/master.svg?style=svg)](https://circleci.com/gh/truemail-rb/truemail-rspec/tree/master) [![Gem Version](https://badge.fury.io/rb/truemail-rspec.svg)](https://badge.fury.io/rb/truemail-rspec) [![Downloads](https://img.shields.io/gem/dt/truemail-rspec.svg?colorA=004d99&colorB=0073e6)](https://rubygems.org/gems/truemail-rspec) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
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.
13
+
14
+ > Actual and maintainable documentation :books: for developers is living [here](https://truemail-rb.org/truemail-rspec).
6
15
 
7
16
  ## Table of Contents
8
17
 
9
18
  - [Features](#features)
19
+ - [Requirements](#requirements)
10
20
  - [Installation](#installation)
11
21
  - [Usage](#usage)
12
22
  - [Create configuration instance](#create-configuration-instance)
13
23
  - [Configuration instance with default random params](#configuration-instance-with-default-random-params)
14
24
  - [Configuration instance with predefined params](#configuration-instance-with-predefined-params)
25
+ - [Create auditor instance](#create-auditor-instance)
26
+ - [create_auditor](#create-auditor)
15
27
  - [Create validator instance](#create-validator-instance)
16
28
  - [create_servers_list](#create_servers_list)
17
- - [create_validator DSL](#create_validator-dsl)
29
+ - [create_validator](#create_validator)
18
30
  - [Truemail family](#truemail-family)
19
31
  - [Contributing](#contributing)
20
32
  - [License](#license)
21
33
  - [Code of Conduct](#code-of-conduct)
34
+ - [Credits](#credits)
22
35
  - [Versioning](#versioning)
23
36
  - [Changelog](CHANGELOG.md)
24
37
 
38
+ ## Requirements
39
+
40
+ Ruby MRI 2.5.0+
41
+
25
42
  ## Features
26
43
 
27
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
28
46
  - Ability to create `Truemail::Validator` instance with random or with predefined params
29
47
 
30
48
  ## Installation
31
49
 
32
- Add this line to your application's Gemfile:
50
+ Add this line to your application's `Gemfile`:
33
51
 
34
52
  ```ruby
35
53
  group :development, :test do
@@ -59,7 +77,7 @@ Or install it yourself as:
59
77
 
60
78
  ### Create configuration instance
61
79
 
62
- Allow to create configuration instance with random or with predefined params.
80
+ Allows to create configuration instance with random or with predefined params.
63
81
 
64
82
  #### Configuration instance with default random params
65
83
 
@@ -79,9 +97,26 @@ create_configuration(verifier_email: 'email@domain.com', verifier_domain: 'other
79
97
  # => returns Truemail::Configuration instance with custom settings
80
98
  ```
81
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
+
82
117
  ### Create validator instance
83
118
 
84
- Allow to create validator instance with default random or with predefined params.
119
+ Allows to create validator instance with default random or with predefined params.
85
120
 
86
121
  #### create_servers_list
87
122
 
@@ -89,7 +124,7 @@ Allow to create validator instance with default random or with predefined params
89
124
  create_servers_list # => returns array with random ip addresses
90
125
  ```
91
126
 
92
- #### create_validator DSL
127
+ #### create_validator
93
128
 
94
129
  ```ruby
95
130
  create_validator(
@@ -97,6 +132,7 @@ create_validator(
97
132
  email, # optional, type:String, by default random email
98
133
  mail_servers, # optional, type:Array(String), by default array with random ip addresses
99
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'
100
136
  configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
101
137
  )
102
138
 
@@ -107,11 +143,16 @@ create_validator(
107
143
 
108
144
  ## Truemail family
109
145
 
110
- All Truemail extensions: https://github.com/truemail-rb
111
-
112
- ### truemail
146
+ All Truemail solutions: https://truemail-rb.org
113
147
 
114
- gem `truemail` - Configurable plain Ruby email validator, https://github.com/rubygarage/truemail
148
+ | Name | Type | Description |
149
+ | --- | --- | --- |
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 |
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 |
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 |
115
156
 
116
157
  ## Contributing
117
158
 
@@ -125,6 +166,11 @@ The gem is available as open source under the terms of the [MIT License](https:/
125
166
 
126
167
  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).
127
168
 
169
+ ## Credits
170
+
171
+ - [The Contributors](https://github.com/truemail-rb/truemail-rspec/graphs/contributors) for code and awesome suggestions
172
+ - [The Stargazers](https://github.com/truemail-rb/truemail-rspec/stargazers) for showing their support
173
+
128
174
  ## Versioning
129
175
 
130
176
  `truemail-rspec` uses [Semantic Versioning 2.0.0](https://semver.org)