dns_mock 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +89 -0
  3. data/.codeclimate.yml +13 -0
  4. data/.github/BRANCH_NAMING_CONVENTION.md +36 -0
  5. data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
  6. data/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
  7. data/.github/ISSUE_TEMPLATE/issue_report.md +28 -0
  8. data/.github/ISSUE_TEMPLATE/question.md +22 -0
  9. data/.github/PULL_REQUEST_TEMPLATE.md +49 -0
  10. data/.gitignore +10 -0
  11. data/.overcommit.yml +32 -0
  12. data/.reek.yml +46 -0
  13. data/.rspec +2 -0
  14. data/.rubocop.yml +273 -0
  15. data/.ruby-gemset +1 -0
  16. data/.ruby-version +1 -0
  17. data/CHANGELOG.md +9 -0
  18. data/CODE_OF_CONDUCT.md +74 -0
  19. data/CONTRIBUTING.md +46 -0
  20. data/Gemfile +5 -0
  21. data/Gemfile.lock +127 -0
  22. data/LICENSE.txt +21 -0
  23. data/README.md +79 -0
  24. data/Rakefile +8 -0
  25. data/bin/console +15 -0
  26. data/bin/setup +8 -0
  27. data/dns_mock.gemspec +48 -0
  28. data/lib/dns_mock.rb +19 -0
  29. data/lib/dns_mock/core.rb +56 -0
  30. data/lib/dns_mock/error/argument_type.rb +11 -0
  31. data/lib/dns_mock/error/helper.rb +22 -0
  32. data/lib/dns_mock/error/port_in_use.rb +11 -0
  33. data/lib/dns_mock/error/random_free_port.rb +11 -0
  34. data/lib/dns_mock/error/record_context.rb +11 -0
  35. data/lib/dns_mock/error/record_context_type.rb +15 -0
  36. data/lib/dns_mock/error/record_host_type.rb +11 -0
  37. data/lib/dns_mock/error/record_not_found.rb +11 -0
  38. data/lib/dns_mock/error/record_type.rb +11 -0
  39. data/lib/dns_mock/record/builder/a.rb +9 -0
  40. data/lib/dns_mock/record/builder/aaaa.rb +9 -0
  41. data/lib/dns_mock/record/builder/base.rb +26 -0
  42. data/lib/dns_mock/record/builder/cname.rb +13 -0
  43. data/lib/dns_mock/record/builder/mx.rb +22 -0
  44. data/lib/dns_mock/record/builder/ns.rb +9 -0
  45. data/lib/dns_mock/record/builder/soa.rb +19 -0
  46. data/lib/dns_mock/record/builder/txt.rb +9 -0
  47. data/lib/dns_mock/record/factory/a.rb +15 -0
  48. data/lib/dns_mock/record/factory/aaaa.rb +15 -0
  49. data/lib/dns_mock/record/factory/base.rb +54 -0
  50. data/lib/dns_mock/record/factory/cname.rb +15 -0
  51. data/lib/dns_mock/record/factory/mx.rb +15 -0
  52. data/lib/dns_mock/record/factory/ns.rb +15 -0
  53. data/lib/dns_mock/record/factory/soa.rb +15 -0
  54. data/lib/dns_mock/record/factory/txt.rb +15 -0
  55. data/lib/dns_mock/response/answer.rb +32 -0
  56. data/lib/dns_mock/response/message.rb +29 -0
  57. data/lib/dns_mock/server.rb +82 -0
  58. data/lib/dns_mock/server/random_available_port.rb +48 -0
  59. data/lib/dns_mock/server/records_dictionary_builder.rb +52 -0
  60. data/lib/dns_mock/version.rb +5 -0
  61. metadata +334 -0
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ module Record
5
+ module Factory
6
+ Ns = ::Class.new(DnsMock::Record::Factory::Base) do
7
+ record_type :ns
8
+
9
+ def instance_params
10
+ [create_dns_name(record_data)]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ module Record
5
+ module Factory
6
+ Soa = ::Class.new(DnsMock::Record::Factory::Base) do
7
+ record_type :soa
8
+
9
+ def instance_params
10
+ record_data[0..1].map(&method(:create_dns_name)) + record_data[2..-1]
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ module Record
5
+ module Factory
6
+ Txt = ::Class.new(DnsMock::Record::Factory::Base) do
7
+ record_type :txt
8
+
9
+ def instance_params
10
+ record_data
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ module Response
5
+ class Answer
6
+ TTL = 1
7
+ REVERSE_TYPE_MAPPER = DnsMock::AVAILABLE_DNS_RECORD_TYPES.each_with_object({}) do |record_type, hash|
8
+ hash[::Resolv::DNS::Resource::IN.const_get(record_type.upcase)] = record_type
9
+ end.freeze
10
+
11
+ def initialize(records)
12
+ @records = records
13
+ end
14
+
15
+ def build(hostname, record_class)
16
+ @hostname = hostname
17
+ record_by_type(record_class).map { |record| [hostname, DnsMock::Response::Answer::TTL, record] }
18
+ end
19
+
20
+ private
21
+
22
+ attr_reader :records, :hostname
23
+
24
+ def record_by_type(record_class)
25
+ record_type = DnsMock::Response::Answer::REVERSE_TYPE_MAPPER[record_class]
26
+ found_records = records.dig(hostname.to_s, record_type)
27
+ raise DnsMock::Error::RecordNotFound.new(record_type, hostname) unless found_records
28
+ found_records
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ module Response
5
+ class Message
6
+ def initialize(packet, records, dns_answer = DnsMock::Response::Answer, dns_message = ::Resolv::DNS::Message)
7
+ @dns_answer = dns_answer.new(records)
8
+ @dns_message = dns_message.decode(packet)
9
+ end
10
+
11
+ def as_binary_string
12
+ @as_binary_string ||= begin
13
+ compose_answer
14
+ dns_message.encode
15
+ end
16
+ end
17
+
18
+ private
19
+
20
+ attr_reader :dns_answer, :dns_message
21
+
22
+ def compose_answer
23
+ dns_message.each_question do |hostname, record_type|
24
+ dns_message.answer.push(*dns_answer.build(hostname, record_type))
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ class Server
5
+ include DnsMock::Error::Helper
6
+
7
+ WARMUP_DELAY = 0.1
8
+ PACKET_MAX_BYTES_SIZE = 65_535
9
+
10
+ attr_reader :port
11
+
12
+ def initialize( # rubocop:disable Metrics/ParameterLists
13
+ socket = ::UDPSocket.new,
14
+ records_dictionary_builder = DnsMock::Server::RecordsDictionaryBuilder,
15
+ random_available_port = DnsMock::Server::RandomAvailablePort,
16
+ thread_class = ::Thread,
17
+ records: nil,
18
+ port: nil
19
+ )
20
+ @socket = socket
21
+ @records_dictionary_builder = records_dictionary_builder
22
+ @thread_class = thread_class
23
+ @records = records_dictionary_builder.call(records || {})
24
+ @port = port || random_available_port.call
25
+ prepare_server_thread
26
+ end
27
+
28
+ def run
29
+ prepare_socket_for_session
30
+
31
+ begin
32
+ loop do
33
+ packet, addr = socket.recvfrom(DnsMock::Server::PACKET_MAX_BYTES_SIZE)
34
+ break if packet.size.zero?
35
+
36
+ address, port = addr.values_at(3, 1)
37
+ socket.send(DnsMock::Response::Message.new(packet, records).as_binary_string, 0, address, port)
38
+ end
39
+ ensure
40
+ socket.close
41
+ end
42
+ end
43
+
44
+ def assign_mocks(new_records)
45
+ !!self.records = records_dictionary_builder.call(new_records) if records.empty?
46
+ end
47
+
48
+ def reset_mocks!
49
+ records.clear.empty?
50
+ end
51
+
52
+ def without_mocks?
53
+ records.empty?
54
+ end
55
+
56
+ def alive?
57
+ thread.alive?
58
+ end
59
+
60
+ def stop!
61
+ thread.kill.stop?
62
+ end
63
+
64
+ private
65
+
66
+ attr_reader :socket, :records_dictionary_builder, :thread_class
67
+ attr_accessor :records, :thread
68
+
69
+ def prepare_socket_for_session
70
+ ::Socket.do_not_reverse_lookup = true
71
+ socket.setsockopt(::Socket::SOL_SOCKET, ::Socket::SO_REUSEADDR, true)
72
+ socket.bind(DnsMock::Server::CURRENT_HOST_NAME, port)
73
+ rescue ::Errno::EADDRINUSE
74
+ raise DnsMock::Error::PortInUse.new(DnsMock::Server::CURRENT_HOST_NAME, port)
75
+ end
76
+
77
+ def prepare_server_thread
78
+ self.thread = thread_class.new { run }
79
+ thread.join(DnsMock::Server::WARMUP_DELAY)
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ class Server
5
+ CURRENT_HOST_NAME = 'localhost'
6
+ CURRENT_HOST_ADDRESS = '127.0.0.1'
7
+
8
+ class RandomAvailablePort
9
+ ATTEMPTS = 100
10
+ MIN_DYNAMIC_PORT_NUMBER = 49_152
11
+ MAX_DYNAMIC_PORT_NUMBER = 65_535
12
+
13
+ class << self
14
+ def call
15
+ DnsMock::Server::RandomAvailablePort::ATTEMPTS.times do
16
+ port = rand(
17
+ DnsMock::Server::RandomAvailablePort::MIN_DYNAMIC_PORT_NUMBER..DnsMock::Server::RandomAvailablePort::MAX_DYNAMIC_PORT_NUMBER
18
+ )
19
+ return port if port_free?(port)
20
+ end
21
+ raise DnsMock::Error::RandomFreePort, DnsMock::Server::RandomAvailablePort::ATTEMPTS
22
+ end
23
+
24
+ private
25
+
26
+ def udp_port_free?(port, socket = ::UDPSocket.new)
27
+ socket.bind(DnsMock::Server::CURRENT_HOST_NAME, port)
28
+ socket.close
29
+ true
30
+ rescue ::Errno::EADDRINUSE
31
+ false
32
+ end
33
+
34
+ def tcp_port_free?(port, socket = ::Socket.new(::Socket::AF_INET, ::Socket::SOCK_STREAM, 0))
35
+ socket.bind(::Socket.sockaddr_in(port, DnsMock::Server::CURRENT_HOST_ADDRESS))
36
+ socket.close
37
+ true
38
+ rescue ::Errno::EADDRINUSE
39
+ false
40
+ end
41
+
42
+ def port_free?(port)
43
+ udp_port_free?(port) && tcp_port_free?(port)
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ class Server
5
+ class RecordsDictionaryBuilder
6
+ include DnsMock::Error::Helper
7
+
8
+ TYPE_MAPPER = DnsMock::AVAILABLE_DNS_RECORD_TYPES.zip(
9
+ [
10
+ [DnsMock::Record::Builder::A, DnsMock::Record::Factory::A, ::Array],
11
+ [DnsMock::Record::Builder::Aaaa, DnsMock::Record::Factory::Aaaa, ::Array],
12
+ [DnsMock::Record::Builder::Cname, DnsMock::Record::Factory::Cname, ::String],
13
+ [DnsMock::Record::Builder::Mx, DnsMock::Record::Factory::Mx, ::Array],
14
+ [DnsMock::Record::Builder::Ns, DnsMock::Record::Factory::Ns, ::Array],
15
+ [DnsMock::Record::Builder::Soa, DnsMock::Record::Factory::Soa, ::Array],
16
+ [DnsMock::Record::Builder::Txt, DnsMock::Record::Factory::Txt, ::Array]
17
+ ]
18
+ ).to_h.freeze
19
+
20
+ def self.call(records_to_build)
21
+ new.build(records_to_build).records
22
+ end
23
+
24
+ attr_reader :records
25
+
26
+ def initialize
27
+ @records = {}
28
+ end
29
+
30
+ def build(records_to_build)
31
+ raise_unless(DnsMock::Error::ArgumentType.new(records_to_build.class), records_to_build.is_a?(::Hash))
32
+ records_to_build.each do |hostname, dns_records|
33
+ raise_unless(DnsMock::Error::RecordHostType.new(hostname, hostname.class), hostname.is_a?(::String))
34
+ records[hostname] = dns_records.each_with_object({}) do |(record_type, records_data), records_instances_by_type|
35
+ records_instances_by_type[record_type] = build_records_instances_by_type(record_type, records_data)
36
+ end
37
+ end
38
+
39
+ self
40
+ end
41
+
42
+ private
43
+
44
+ def build_records_instances_by_type(record_type, records_to_build)
45
+ target_builder, target_factory, expected_type = DnsMock::Server::RecordsDictionaryBuilder::TYPE_MAPPER[record_type]
46
+ raise_record_type_error(record_type, target_builder)
47
+ raise_record_context_type_error(record_type, records_to_build, expected_type)
48
+ target_builder.call(target_factory, records_to_build)
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DnsMock
4
+ VERSION = '0.1.0'
5
+ end
metadata ADDED
@@ -0,0 +1,334 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dns_mock
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Vladislav Trotsenko
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2021-01-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler-audit
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.7.0.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.7.0.1
41
+ - !ruby/object:Gem::Dependency
42
+ name: faker
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.15'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 2.15.1
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.15'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.15.1
61
+ - !ruby/object:Gem::Dependency
62
+ name: fasterer
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.8.3
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.8.3
75
+ - !ruby/object:Gem::Dependency
76
+ name: overcommit
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 0.57.0
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 0.57.0
89
+ - !ruby/object:Gem::Dependency
90
+ name: pry-byebug
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '3.9'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '3.9'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rake
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '13.0'
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 13.0.3
113
+ type: :development
114
+ prerelease: false
115
+ version_requirements: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '13.0'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 13.0.3
123
+ - !ruby/object:Gem::Dependency
124
+ name: reek
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '6.0'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 6.0.3
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - "~>"
138
+ - !ruby/object:Gem::Version
139
+ version: '6.0'
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: 6.0.3
143
+ - !ruby/object:Gem::Dependency
144
+ name: rspec
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - "~>"
148
+ - !ruby/object:Gem::Version
149
+ version: '3.10'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '3.10'
157
+ - !ruby/object:Gem::Dependency
158
+ name: rspec-dns
159
+ requirement: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: 0.1.8
164
+ type: :development
165
+ prerelease: false
166
+ version_requirements: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - "~>"
169
+ - !ruby/object:Gem::Version
170
+ version: 0.1.8
171
+ - !ruby/object:Gem::Dependency
172
+ name: rubocop
173
+ requirement: !ruby/object:Gem::Requirement
174
+ requirements:
175
+ - - "~>"
176
+ - !ruby/object:Gem::Version
177
+ version: '1.8'
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 1.8.1
181
+ type: :development
182
+ prerelease: false
183
+ version_requirements: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '1.8'
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ version: 1.8.1
191
+ - !ruby/object:Gem::Dependency
192
+ name: rubocop-performance
193
+ requirement: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - - "~>"
196
+ - !ruby/object:Gem::Version
197
+ version: '1.9'
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: 1.9.2
201
+ type: :development
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - "~>"
206
+ - !ruby/object:Gem::Version
207
+ version: '1.9'
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: 1.9.2
211
+ - !ruby/object:Gem::Dependency
212
+ name: rubocop-rspec
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - "~>"
216
+ - !ruby/object:Gem::Version
217
+ version: '2.1'
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - "~>"
223
+ - !ruby/object:Gem::Version
224
+ version: '2.1'
225
+ - !ruby/object:Gem::Dependency
226
+ name: simplecov
227
+ requirement: !ruby/object:Gem::Requirement
228
+ requirements:
229
+ - - "~>"
230
+ - !ruby/object:Gem::Version
231
+ version: 0.17.1
232
+ type: :development
233
+ prerelease: false
234
+ version_requirements: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - "~>"
237
+ - !ruby/object:Gem::Version
238
+ version: 0.17.1
239
+ description: Ruby DNS mock
240
+ email:
241
+ - admin@bestweb.com.ua
242
+ executables: []
243
+ extensions: []
244
+ extra_rdoc_files: []
245
+ files:
246
+ - ".circleci/config.yml"
247
+ - ".codeclimate.yml"
248
+ - ".github/BRANCH_NAMING_CONVENTION.md"
249
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
250
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
251
+ - ".github/ISSUE_TEMPLATE/issue_report.md"
252
+ - ".github/ISSUE_TEMPLATE/question.md"
253
+ - ".github/PULL_REQUEST_TEMPLATE.md"
254
+ - ".gitignore"
255
+ - ".overcommit.yml"
256
+ - ".reek.yml"
257
+ - ".rspec"
258
+ - ".rubocop.yml"
259
+ - ".ruby-gemset"
260
+ - ".ruby-version"
261
+ - CHANGELOG.md
262
+ - CODE_OF_CONDUCT.md
263
+ - CONTRIBUTING.md
264
+ - Gemfile
265
+ - Gemfile.lock
266
+ - LICENSE.txt
267
+ - README.md
268
+ - Rakefile
269
+ - bin/console
270
+ - bin/setup
271
+ - dns_mock.gemspec
272
+ - lib/dns_mock.rb
273
+ - lib/dns_mock/core.rb
274
+ - lib/dns_mock/error/argument_type.rb
275
+ - lib/dns_mock/error/helper.rb
276
+ - lib/dns_mock/error/port_in_use.rb
277
+ - lib/dns_mock/error/random_free_port.rb
278
+ - lib/dns_mock/error/record_context.rb
279
+ - lib/dns_mock/error/record_context_type.rb
280
+ - lib/dns_mock/error/record_host_type.rb
281
+ - lib/dns_mock/error/record_not_found.rb
282
+ - lib/dns_mock/error/record_type.rb
283
+ - lib/dns_mock/record/builder/a.rb
284
+ - lib/dns_mock/record/builder/aaaa.rb
285
+ - lib/dns_mock/record/builder/base.rb
286
+ - lib/dns_mock/record/builder/cname.rb
287
+ - lib/dns_mock/record/builder/mx.rb
288
+ - lib/dns_mock/record/builder/ns.rb
289
+ - lib/dns_mock/record/builder/soa.rb
290
+ - lib/dns_mock/record/builder/txt.rb
291
+ - lib/dns_mock/record/factory/a.rb
292
+ - lib/dns_mock/record/factory/aaaa.rb
293
+ - lib/dns_mock/record/factory/base.rb
294
+ - lib/dns_mock/record/factory/cname.rb
295
+ - lib/dns_mock/record/factory/mx.rb
296
+ - lib/dns_mock/record/factory/ns.rb
297
+ - lib/dns_mock/record/factory/soa.rb
298
+ - lib/dns_mock/record/factory/txt.rb
299
+ - lib/dns_mock/response/answer.rb
300
+ - lib/dns_mock/response/message.rb
301
+ - lib/dns_mock/server.rb
302
+ - lib/dns_mock/server/random_available_port.rb
303
+ - lib/dns_mock/server/records_dictionary_builder.rb
304
+ - lib/dns_mock/version.rb
305
+ homepage: https://github.com/mocktools/ruby-dns-mock
306
+ licenses:
307
+ - MIT
308
+ metadata:
309
+ homepage_uri: https://github.com/mocktools/ruby-dns-mock
310
+ changelog_uri: https://github.com/mocktools/ruby-dns-mock/blob/master/CHANGELOG.md
311
+ source_code_uri: https://github.com/mocktools/ruby-dns-mock
312
+ documentation_uri: https://github.com/mocktools/ruby-dns-mock/blob/master/README.md
313
+ bug_tracker_uri: https://github.com/mocktools/ruby-dns-mock/issues
314
+ post_install_message:
315
+ rdoc_options: []
316
+ require_paths:
317
+ - lib
318
+ required_ruby_version: !ruby/object:Gem::Requirement
319
+ requirements:
320
+ - - ">="
321
+ - !ruby/object:Gem::Version
322
+ version: 2.5.0
323
+ required_rubygems_version: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: '0'
328
+ requirements: []
329
+ rubyforge_project:
330
+ rubygems_version: 2.7.3
331
+ signing_key:
332
+ specification_version: 4
333
+ summary: dns_mock
334
+ test_files: []