dns_mock 1.1.0 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +59 -18
- data/.codeclimate.yml +1 -1
- data/.reek.yml +4 -0
- data/.rubocop.yml +18 -0
- data/CHANGELOG.md +66 -0
- data/Gemfile.lock +32 -32
- data/README.md +5 -3
- data/dns_mock.gemspec +8 -8
- data/lib/dns_mock/record/builder/mx.rb +12 -1
- data/lib/dns_mock/version.rb +1 -1
- metadata +26 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48eac73ca0f2e0aef0f0e84a87eb79dc240e44529eb0ac3e3d34417dd2886f1a
|
4
|
+
data.tar.gz: 604d66dbc157a3c0159ba0355eb5b12d97c9a8da78de580902985b1c452e2e42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b679e4f84f3f465e05e0d4c4c2a7507899fdd2c4acef4ea2f82ff69f837f9086f2a2d238dbf67548d1c5309e4ca715859ab1877de28fdf471c80c33ae79b616
|
7
|
+
data.tar.gz: fe8fd0cf5723bc58c3dc72e1f528e8379546f1c9def076413de47a28e025956a4e972f3ac885f77f6dd51675c6d39a7308b6490f637bf4f53f9b7fc406a6b15c
|
data/.circleci/config.yml
CHANGED
@@ -1,11 +1,21 @@
|
|
1
|
+
version: 2.1
|
2
|
+
|
1
3
|
defaults: &defaults
|
2
4
|
working_directory: ~/ruby-dns-mock
|
3
5
|
docker:
|
4
|
-
- image:
|
6
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
5
7
|
environment:
|
6
8
|
CC_TEST_REPORTER_ID: 18fba9e7d6885c48453a80a0f019a60d9ffa3fd80467652a6b3c95fef5ea9a50
|
7
9
|
|
10
|
+
orbs:
|
11
|
+
ruby: circleci/ruby@1.1.3
|
12
|
+
|
8
13
|
references:
|
14
|
+
install_bundler: &install_bundler
|
15
|
+
run:
|
16
|
+
name: Installing Bundler
|
17
|
+
command: gem i bundler -v $(tail -1 Gemfile.lock | tr -d ' ')
|
18
|
+
|
9
19
|
restore_bundle_cache: &restore_bundle_cache
|
10
20
|
restore_cache:
|
11
21
|
keys:
|
@@ -24,66 +34,97 @@ references:
|
|
24
34
|
|
25
35
|
install_codeclimate_reporter: &install_codeclimate_reporter
|
26
36
|
run:
|
27
|
-
name:
|
37
|
+
name: Installing CodeClimate test reporter
|
28
38
|
command: |
|
29
39
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
30
40
|
chmod +x ./cc-test-reporter
|
31
41
|
|
32
|
-
version: 2
|
33
42
|
jobs:
|
34
|
-
linters:
|
43
|
+
linters-ruby:
|
44
|
+
parameters:
|
45
|
+
ruby-version:
|
46
|
+
type: string
|
47
|
+
|
35
48
|
<<: *defaults
|
36
49
|
|
37
50
|
steps:
|
38
51
|
- checkout
|
39
52
|
|
53
|
+
- <<: *install_bundler
|
40
54
|
- <<: *restore_bundle_cache
|
41
55
|
- <<: *bundle_install
|
42
56
|
- <<: *save_bundle_cache
|
43
57
|
|
44
58
|
- run:
|
45
|
-
name: Running
|
59
|
+
name: Running Overcommit
|
46
60
|
command: |
|
47
61
|
bundle exec overcommit -s
|
48
62
|
SKIP=AuthorEmail,AuthorName bundle exec overcommit -r
|
49
63
|
|
50
|
-
tests:
|
64
|
+
tests-ruby:
|
65
|
+
parameters:
|
66
|
+
ruby-version:
|
67
|
+
type: string
|
68
|
+
|
51
69
|
<<: *defaults
|
52
70
|
|
53
71
|
steps:
|
54
72
|
- checkout
|
55
73
|
|
74
|
+
- <<: *install_bundler
|
56
75
|
- <<: *restore_bundle_cache
|
57
76
|
- <<: *bundle_install
|
58
77
|
- <<: *save_bundle_cache
|
59
78
|
- <<: *install_codeclimate_reporter
|
60
79
|
|
61
80
|
- run:
|
62
|
-
name: Running
|
81
|
+
name: Running RSpec
|
63
82
|
command: |
|
64
|
-
mkdir /tmp/test-results
|
65
83
|
./cc-test-reporter before-build
|
66
84
|
bundle exec rspec
|
67
85
|
|
68
86
|
- run:
|
69
|
-
name:
|
87
|
+
name: Creating CodeClimate test coverage report
|
70
88
|
command: |
|
71
89
|
./cc-test-reporter format-coverage -t simplecov -o "coverage/codeclimate.$CIRCLE_NODE_INDEX.json"
|
72
90
|
|
73
|
-
- store_test_results:
|
74
|
-
path: /tmp/test-results
|
75
|
-
|
76
91
|
- store_artifacts:
|
77
|
-
|
78
|
-
|
92
|
+
name: Saving Simplecov coverage artifacts
|
93
|
+
path: ~/ruby-dns-mock/coverage
|
94
|
+
destination: coverage
|
79
95
|
|
80
96
|
- deploy:
|
97
|
+
name: Uploading CodeClimate test coverage report
|
81
98
|
command: |
|
82
99
|
./cc-test-reporter sum-coverage --output - --parts $CIRCLE_NODE_TOTAL coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --debug --input -
|
83
100
|
|
101
|
+
compatibility-ruby:
|
102
|
+
parameters:
|
103
|
+
ruby-version:
|
104
|
+
type: string
|
105
|
+
docker:
|
106
|
+
- image: cimg/ruby:<< parameters.ruby-version >>
|
107
|
+
steps:
|
108
|
+
- checkout
|
109
|
+
- ruby/install-deps:
|
110
|
+
with-cache: false
|
111
|
+
path: './vendor/custom_bundle'
|
112
|
+
- run:
|
113
|
+
name: Running compatibility tests
|
114
|
+
command: bundle exec rspec
|
115
|
+
|
84
116
|
workflows:
|
85
|
-
|
86
|
-
build:
|
117
|
+
build_and_test:
|
87
118
|
jobs:
|
88
|
-
- linters
|
89
|
-
|
119
|
+
- linters-ruby:
|
120
|
+
matrix:
|
121
|
+
parameters:
|
122
|
+
ruby-version: ["2.5"]
|
123
|
+
- tests-ruby:
|
124
|
+
matrix:
|
125
|
+
parameters:
|
126
|
+
ruby-version: ["2.5"]
|
127
|
+
- compatibility-ruby:
|
128
|
+
matrix:
|
129
|
+
parameters:
|
130
|
+
ruby-version: ["2.6", "2.7", "3.0"]
|
data/.codeclimate.yml
CHANGED
data/.reek.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -121,6 +121,12 @@ Style/HashExcept:
|
|
121
121
|
Style/IfWithBooleanLiteralBranches:
|
122
122
|
Enabled: true
|
123
123
|
|
124
|
+
Style/HashConversion:
|
125
|
+
Enabled: true
|
126
|
+
|
127
|
+
Style/StringChars:
|
128
|
+
Enabled: true
|
129
|
+
|
124
130
|
Layout/LineLength:
|
125
131
|
Max: 150
|
126
132
|
|
@@ -218,6 +224,9 @@ Lint/SymbolConversion:
|
|
218
224
|
Lint/TripleQuotes:
|
219
225
|
Enabled: true
|
220
226
|
|
227
|
+
Gemspec/DateAssignment:
|
228
|
+
Enabled: true
|
229
|
+
|
221
230
|
Performance/AncestorsInclude:
|
222
231
|
Enabled: true
|
223
232
|
|
@@ -257,6 +266,15 @@ Performance/MethodObjectAsBlock:
|
|
257
266
|
Performance/Sum:
|
258
267
|
Enabled: true
|
259
268
|
|
269
|
+
Performance/RedundantEqualityComparisonBlock:
|
270
|
+
Enabled: true
|
271
|
+
|
272
|
+
Performance/RedundantSplitRegexpArgument:
|
273
|
+
Enabled: true
|
274
|
+
|
275
|
+
Performance/MapCompact:
|
276
|
+
Enabled: true
|
277
|
+
|
260
278
|
RSpec/ExampleLength:
|
261
279
|
Enabled: false
|
262
280
|
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,72 @@
|
|
2
2
|
|
3
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
4
|
|
5
|
+
## [1.2.4] - 2021-05-25
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- Updated gem development dependencies
|
10
|
+
- Updated CircleCI config
|
11
|
+
|
12
|
+
## [1.2.3] - 2021-05-11
|
13
|
+
|
14
|
+
### Changed
|
15
|
+
|
16
|
+
- Updated gem development dependencies
|
17
|
+
- Updated CircleCI config
|
18
|
+
|
19
|
+
## [1.2.2] - 2021-05-06
|
20
|
+
|
21
|
+
### Changed
|
22
|
+
|
23
|
+
- Updated gem development dependencies
|
24
|
+
- Updated rubocop/codeclimate config
|
25
|
+
- Updated CircleCI config
|
26
|
+
|
27
|
+
## [1.2.1] - 2021-03-23
|
28
|
+
|
29
|
+
### Changed
|
30
|
+
|
31
|
+
- Updated gem development dependencies
|
32
|
+
- Updated rubocop/codeclimate config
|
33
|
+
- Updated gem documentation
|
34
|
+
- Updated tests
|
35
|
+
|
36
|
+
## [1.2.0] - 2021-02-04
|
37
|
+
|
38
|
+
### Ability to specify MX record priority
|
39
|
+
|
40
|
+
Added ability to specify custom priority of MX record if it needed. Now it impossible to define null or backup MX records. Please note, if you haven't specified a priority of MX record, it will be assigned automatically. MX records builder is assigning priority with step 10 from first item of defined MX records array.
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
records = {
|
44
|
+
'example.com' => {
|
45
|
+
mx: %w[.:0 mx1.domain.com:10 mx2.domain.com:10 mx3.domain.com] # .:0 - null MX record
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
DnsMock.start_server(records: records)
|
50
|
+
```
|
51
|
+
|
52
|
+
```bash
|
53
|
+
dig @localhost -p 5300 MX example.com
|
54
|
+
```
|
55
|
+
|
56
|
+
```
|
57
|
+
; <<>> DiG 9.10.6 <<>> @localhost -p 5300 MX example.com
|
58
|
+
|
59
|
+
;; ANSWER SECTION:
|
60
|
+
example.com. 1 IN MX 0 .
|
61
|
+
example.com. 1 IN MX 10 mx1.domain.com.
|
62
|
+
example.com. 1 IN MX 10 mx2.domain.com.
|
63
|
+
example.com. 1 IN MX 40 mx3.domain.com.
|
64
|
+
|
65
|
+
;; Query time: 0 msec
|
66
|
+
;; SERVER: 127.0.0.1#5300(127.0.0.1)
|
67
|
+
;; WHEN: Wed Feb 03 20:19:51 EET 2021
|
68
|
+
;; MSG SIZE rcvd: 102
|
69
|
+
```
|
70
|
+
|
5
71
|
## [1.1.0] - 2021-02-01
|
6
72
|
|
7
73
|
### RSpec native support
|
data/Gemfile.lock
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dns_mock (1.
|
4
|
+
dns_mock (1.2.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.2)
|
10
|
-
bundler-audit (0.
|
10
|
+
bundler-audit (0.8.0)
|
11
11
|
bundler (>= 1.2.0, < 3)
|
12
|
-
thor (
|
12
|
+
thor (~> 1.0)
|
13
13
|
byebug (11.1.3)
|
14
14
|
childprocess (4.0.0)
|
15
15
|
coderay (1.1.3)
|
@@ -18,13 +18,13 @@ GEM
|
|
18
18
|
diff-lcs (1.4.4)
|
19
19
|
dnsruby (1.61.5)
|
20
20
|
simpleidn (~> 0.1)
|
21
|
-
docile (1.
|
22
|
-
faker (2.
|
21
|
+
docile (1.4.0)
|
22
|
+
faker (2.18.0)
|
23
23
|
i18n (>= 1.6, < 2)
|
24
|
-
fasterer (0.
|
24
|
+
fasterer (0.9.0)
|
25
25
|
colorize (~> 0.7)
|
26
26
|
ruby_parser (>= 3.14.1)
|
27
|
-
i18n (1.8.
|
27
|
+
i18n (1.8.10)
|
28
28
|
concurrent-ruby (~> 1.0)
|
29
29
|
iniparse (1.5.0)
|
30
30
|
json (2.5.1)
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
childprocess (>= 0.6.3, < 5)
|
35
35
|
iniparse (~> 1.4)
|
36
36
|
parallel (1.20.1)
|
37
|
-
parser (3.0.
|
37
|
+
parser (3.0.1.1)
|
38
38
|
ast (~> 2.4.1)
|
39
39
|
pry (0.13.1)
|
40
40
|
coderay (~> 1.1)
|
@@ -42,16 +42,16 @@ GEM
|
|
42
42
|
pry-byebug (3.9.0)
|
43
43
|
byebug (~> 11.0)
|
44
44
|
pry (~> 0.13.0)
|
45
|
-
psych (3.3.
|
45
|
+
psych (3.3.2)
|
46
46
|
rainbow (3.0.0)
|
47
47
|
rake (13.0.3)
|
48
|
-
reek (6.0.
|
48
|
+
reek (6.0.4)
|
49
49
|
kwalify (~> 0.7.0)
|
50
50
|
parser (~> 3.0.0)
|
51
51
|
psych (~> 3.1)
|
52
52
|
rainbow (>= 2.0, < 4.0)
|
53
|
-
regexp_parser (2.
|
54
|
-
rexml (3.2.
|
53
|
+
regexp_parser (2.1.1)
|
54
|
+
rexml (3.2.5)
|
55
55
|
rspec (3.10.0)
|
56
56
|
rspec-core (~> 3.10.0)
|
57
57
|
rspec-expectations (~> 3.10.0)
|
@@ -69,27 +69,27 @@ GEM
|
|
69
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
70
|
rspec-support (~> 3.10.0)
|
71
71
|
rspec-support (3.10.2)
|
72
|
-
rubocop (1.
|
72
|
+
rubocop (1.15.0)
|
73
73
|
parallel (~> 1.10)
|
74
74
|
parser (>= 3.0.0.0)
|
75
75
|
rainbow (>= 2.2.2, < 4.0)
|
76
76
|
regexp_parser (>= 1.8, < 3.0)
|
77
77
|
rexml
|
78
|
-
rubocop-ast (>= 1.
|
78
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
79
79
|
ruby-progressbar (~> 1.7)
|
80
80
|
unicode-display_width (>= 1.4.0, < 3.0)
|
81
|
-
rubocop-ast (1.
|
82
|
-
parser (>=
|
83
|
-
rubocop-performance (1.
|
84
|
-
rubocop (>=
|
81
|
+
rubocop-ast (1.5.0)
|
82
|
+
parser (>= 3.0.1.1)
|
83
|
+
rubocop-performance (1.11.3)
|
84
|
+
rubocop (>= 1.7.0, < 2.0)
|
85
85
|
rubocop-ast (>= 0.4.0)
|
86
|
-
rubocop-rspec (2.
|
86
|
+
rubocop-rspec (2.3.0)
|
87
87
|
rubocop (~> 1.0)
|
88
88
|
rubocop-ast (>= 1.1.0)
|
89
89
|
ruby-progressbar (1.11.0)
|
90
|
-
ruby_parser (3.
|
91
|
-
sexp_processor (~> 4.
|
92
|
-
sexp_processor (4.15.
|
90
|
+
ruby_parser (3.16.0)
|
91
|
+
sexp_processor (~> 4.15, >= 4.15.1)
|
92
|
+
sexp_processor (4.15.3)
|
93
93
|
simplecov (0.17.1)
|
94
94
|
docile (~> 1.1)
|
95
95
|
json (>= 1.8, < 3)
|
@@ -104,24 +104,24 @@ GEM
|
|
104
104
|
unicode-display_width (2.0.0)
|
105
105
|
|
106
106
|
PLATFORMS
|
107
|
-
|
107
|
+
x86_64-darwin-19
|
108
108
|
|
109
109
|
DEPENDENCIES
|
110
|
-
bundler (~>
|
111
|
-
bundler-audit (~> 0.
|
110
|
+
bundler (~> 2.2, >= 2.2.17)
|
111
|
+
bundler-audit (~> 0.8.0)
|
112
112
|
dns_mock!
|
113
|
-
faker (~> 2.
|
114
|
-
fasterer (~> 0.
|
113
|
+
faker (~> 2.18)
|
114
|
+
fasterer (~> 0.9.0)
|
115
115
|
overcommit (~> 0.57.0)
|
116
116
|
pry-byebug (~> 3.9)
|
117
117
|
rake (~> 13.0, >= 13.0.3)
|
118
|
-
reek (~> 6.0, >= 6.0.
|
118
|
+
reek (~> 6.0, >= 6.0.4)
|
119
119
|
rspec (~> 3.10)
|
120
120
|
rspec-dns (~> 0.1.8)
|
121
|
-
rubocop (~> 1.
|
122
|
-
rubocop-performance (~> 1.
|
123
|
-
rubocop-rspec (~> 2.
|
121
|
+
rubocop (~> 1.15)
|
122
|
+
rubocop-performance (~> 1.11, >= 1.11.3)
|
123
|
+
rubocop-rspec (~> 2.3)
|
124
124
|
simplecov (~> 0.17.1)
|
125
125
|
|
126
126
|
BUNDLED WITH
|
127
|
-
|
127
|
+
2.2.17
|
data/README.md
CHANGED
@@ -17,6 +17,8 @@
|
|
17
17
|
- [Installation](#installation)
|
18
18
|
- [Usage](#usage)
|
19
19
|
- [RSpec](#rspec)
|
20
|
+
- [DnsMock RSpec helper](#dnsmock-rspec-helper)
|
21
|
+
- [DnsMock RSpec interface](#dnsmock-rspec-interface)
|
20
22
|
- [Contributing](#contributing)
|
21
23
|
- [License](#license)
|
22
24
|
- [Code of Conduct](#code-of-conduct)
|
@@ -57,13 +59,13 @@ Or install it yourself as:
|
|
57
59
|
## Usage
|
58
60
|
|
59
61
|
```ruby
|
60
|
-
# Example of mocked DNS records structure
|
62
|
+
# Example of mocked DNS records, please follow this data structure
|
61
63
|
records = {
|
62
64
|
'example.com' => {
|
63
65
|
a: %w[1.1.1.1 2.2.2.2],
|
64
66
|
aaaa: %w[2a00:1450:4001:81e::200e],
|
65
67
|
ns: %w[ns1.domain.com ns2.domain.com],
|
66
|
-
mx: %w[mx1.domain.com mx2.domain.com],
|
68
|
+
mx: %w[mx1.domain.com mx2.domain.com:50], # you can specify host(s) or host(s) with priority, use '.:0' for definition null MX record
|
67
69
|
txt: %w[txt_record_1 txt_record_2],
|
68
70
|
cname: 'some.domain.com',
|
69
71
|
soa: [
|
@@ -132,7 +134,7 @@ require 'dns_mock/test_framework/rspec'
|
|
132
134
|
|
133
135
|
#### DnsMock RSpec helper
|
134
136
|
|
135
|
-
Just add `DnsMock::TestFramework::RSpec::Helper` if you wanna
|
137
|
+
Just add `DnsMock::TestFramework::RSpec::Helper` if you wanna use shortcut `dns_mock_server` for DnsMock server instance into your `RSpec.describe` blocks:
|
136
138
|
|
137
139
|
```ruby
|
138
140
|
# spec/support/config/dns_mock.rb
|
data/dns_mock.gemspec
CHANGED
@@ -31,18 +31,18 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
32
|
spec.require_paths = ['lib']
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler', '~>
|
35
|
-
spec.add_development_dependency 'bundler-audit', '~> 0.
|
36
|
-
spec.add_development_dependency 'faker', '~> 2.
|
37
|
-
spec.add_development_dependency 'fasterer', '~> 0.
|
34
|
+
spec.add_development_dependency 'bundler', '~> 2.2', '>= 2.2.17'
|
35
|
+
spec.add_development_dependency 'bundler-audit', '~> 0.8.0'
|
36
|
+
spec.add_development_dependency 'faker', '~> 2.18'
|
37
|
+
spec.add_development_dependency 'fasterer', '~> 0.9.0'
|
38
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.3'
|
41
|
-
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.
|
41
|
+
spec.add_development_dependency 'reek', '~> 6.0', '>= 6.0.4'
|
42
42
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
43
43
|
spec.add_development_dependency 'rspec-dns', '~> 0.1.8'
|
44
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
45
|
-
spec.add_development_dependency 'rubocop-performance', '~> 1.
|
46
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.
|
44
|
+
spec.add_development_dependency 'rubocop', '~> 1.15'
|
45
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.11', '>= 1.11.3'
|
46
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.3'
|
47
47
|
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
48
48
|
end
|
@@ -4,18 +4,29 @@ module DnsMock
|
|
4
4
|
module Record
|
5
5
|
module Builder
|
6
6
|
class Mx < DnsMock::Record::Builder::Base
|
7
|
+
include DnsMock::Error::Helper
|
8
|
+
|
9
|
+
MX_RECORD_REGEX_PATTERN = /\A(.+):(\d+)|(.+)\z/.freeze
|
7
10
|
RECORD_PREFERENCE_STEP = 10
|
8
11
|
|
9
12
|
def build
|
10
13
|
records_data.map.with_index(1) do |record_data, record_preference|
|
14
|
+
record_data, custom_record_preference = parse_mx_record_data(record_data)
|
11
15
|
target_factory.new(
|
12
16
|
record_data: [
|
13
|
-
record_preference * DnsMock::Record::Builder::Mx::RECORD_PREFERENCE_STEP,
|
17
|
+
custom_record_preference&.to_i || record_preference * DnsMock::Record::Builder::Mx::RECORD_PREFERENCE_STEP,
|
14
18
|
record_data
|
15
19
|
]
|
16
20
|
).create
|
17
21
|
end
|
18
22
|
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def parse_mx_record_data(record_data)
|
27
|
+
raise_record_context_type_error(:mx, record_data, ::String)
|
28
|
+
record_data.scan(DnsMock::Record::Builder::Mx::MX_RECORD_REGEX_PATTERN).flatten.compact
|
29
|
+
end
|
19
30
|
end
|
20
31
|
end
|
21
32
|
end
|
data/lib/dns_mock/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dns_mock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladislav Trotsenko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,62 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.2.17
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '2.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.2.17
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler-audit
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
39
|
+
version: 0.8.0
|
34
40
|
type: :development
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
46
|
+
version: 0.8.0
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: faker
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
51
|
- - "~>"
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
48
|
-
- - ">="
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: 2.15.1
|
53
|
+
version: '2.18'
|
51
54
|
type: :development
|
52
55
|
prerelease: false
|
53
56
|
version_requirements: !ruby/object:Gem::Requirement
|
54
57
|
requirements:
|
55
58
|
- - "~>"
|
56
59
|
- !ruby/object:Gem::Version
|
57
|
-
version: '2.
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 2.15.1
|
60
|
+
version: '2.18'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: fasterer
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0.
|
67
|
+
version: 0.9.0
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: 0.9.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: overcommit
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,7 +129,7 @@ dependencies:
|
|
129
129
|
version: '6.0'
|
130
130
|
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 6.0.
|
132
|
+
version: 6.0.4
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -139,7 +139,7 @@ dependencies:
|
|
139
139
|
version: '6.0'
|
140
140
|
- - ">="
|
141
141
|
- !ruby/object:Gem::Version
|
142
|
-
version: 6.0.
|
142
|
+
version: 6.0.4
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: rspec
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -174,48 +174,48 @@ dependencies:
|
|
174
174
|
requirements:
|
175
175
|
- - "~>"
|
176
176
|
- !ruby/object:Gem::Version
|
177
|
-
version: '1.
|
177
|
+
version: '1.15'
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
180
|
version_requirements: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
182
|
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: '1.
|
184
|
+
version: '1.15'
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
186
|
name: rubocop-performance
|
187
187
|
requirement: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
189
|
- - "~>"
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: '1.
|
191
|
+
version: '1.11'
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 1.
|
194
|
+
version: 1.11.3
|
195
195
|
type: :development
|
196
196
|
prerelease: false
|
197
197
|
version_requirements: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '1.
|
201
|
+
version: '1.11'
|
202
202
|
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version: 1.
|
204
|
+
version: 1.11.3
|
205
205
|
- !ruby/object:Gem::Dependency
|
206
206
|
name: rubocop-rspec
|
207
207
|
requirement: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
209
|
- - "~>"
|
210
210
|
- !ruby/object:Gem::Version
|
211
|
-
version: '2.
|
211
|
+
version: '2.3'
|
212
212
|
type: :development
|
213
213
|
prerelease: false
|
214
214
|
version_requirements: !ruby/object:Gem::Requirement
|
215
215
|
requirements:
|
216
216
|
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
|
-
version: '2.
|
218
|
+
version: '2.3'
|
219
219
|
- !ruby/object:Gem::Dependency
|
220
220
|
name: simplecov
|
221
221
|
requirement: !ruby/object:Gem::Requirement
|