net-dns 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/.gitignore +1 -1
- data/.rspec +1 -0
- data/.rubocop.yml +3 -0
- data/.rubocop_defaults.yml +364 -0
- data/.rubocop_todo.yml +207 -0
- data/.travis.yml +9 -16
- data/CHANGELOG.md +12 -1
- data/Gemfile +6 -2
- data/LICENSE.txt +56 -0
- data/README.md +94 -77
- data/Rakefile +23 -56
- data/bin/console +14 -0
- data/demo/check_soa.rb +27 -38
- data/demo/threads.rb +3 -7
- data/lib/net/dns.rb +4 -11
- data/lib/net/dns/core_ext.rb +8 -15
- data/lib/net/dns/header.rb +58 -66
- data/lib/net/dns/names.rb +25 -23
- data/lib/net/dns/packet.rb +136 -139
- data/lib/net/dns/question.rb +36 -39
- data/lib/net/dns/resolver.rb +103 -113
- data/lib/net/dns/resolver/socks.rb +45 -51
- data/lib/net/dns/resolver/timeouts.rb +17 -26
- data/lib/net/dns/rr.rb +107 -117
- data/lib/net/dns/rr/a.rb +46 -55
- data/lib/net/dns/rr/aaaa.rb +40 -49
- data/lib/net/dns/rr/classes.rb +26 -29
- data/lib/net/dns/rr/cname.rb +33 -41
- data/lib/net/dns/rr/hinfo.rb +44 -56
- data/lib/net/dns/rr/mr.rb +33 -42
- data/lib/net/dns/rr/mx.rb +37 -47
- data/lib/net/dns/rr/ns.rb +33 -41
- data/lib/net/dns/rr/null.rb +8 -11
- data/lib/net/dns/rr/ptr.rb +14 -20
- data/lib/net/dns/rr/soa.rb +27 -30
- data/lib/net/dns/rr/srv.rb +13 -17
- data/lib/net/dns/rr/txt.rb +8 -11
- data/lib/net/dns/rr/types.rb +97 -99
- data/lib/net/dns/version.rb +5 -13
- data/net-dns.gemspec +17 -29
- data/{fixtures → spec/fixtures}/resolv.conf +0 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/unit/resolver/dns_timeout_spec.rb +36 -0
- data/spec/unit/resolver/tcp_timeout_spec.rb +46 -0
- data/spec/unit/resolver/udp_timeout_spec.rb +46 -0
- data/test/test_helper.rb +12 -3
- data/test/{header_test.rb → unit/header_test.rb} +43 -46
- data/test/{names_test.rb → unit/names_test.rb} +1 -1
- data/test/{packet_test.rb → unit/packet_test.rb} +3 -5
- data/test/{question_test.rb → unit/question_test.rb} +3 -5
- data/test/{resolver_test.rb → unit/resolver_test.rb} +10 -13
- data/test/{rr → unit/rr}/a_test.rb +10 -17
- data/test/{rr → unit/rr}/aaaa_test.rb +7 -14
- data/test/{rr → unit/rr}/classes_test.rb +14 -16
- data/test/{rr → unit/rr}/cname_test.rb +7 -14
- data/test/{rr → unit/rr}/hinfo_test.rb +16 -22
- data/test/{rr → unit/rr}/mr_test.rb +12 -18
- data/test/{rr → unit/rr}/mx_test.rb +18 -24
- data/test/{rr → unit/rr}/ns_test.rb +10 -16
- data/test/{rr → unit/rr}/types_test.rb +10 -8
- data/test/{rr_test.rb → unit/rr_test.rb} +33 -37
- metadata +77 -49
- data/test/resolver/timeouts_test.rb +0 -109
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YzMzY2RhYjJlNTcyNTllMzQ4ODdlYjkzNjViY2QyNDg4ZTQxNDJhNjA0MDM1
|
10
|
-
OThjMGZjY2EwMmY2ZTNjYTM0NGRmMDM2YzcwMDk0Yzg2MGVjYzNiODYzZDhj
|
11
|
-
M2JjNzExN2FkMTdlMzg5MGE1ZWIyMWJlOTQzMTBmMzYxOTAwYjk=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDRiZjIyY2UxZTMxMjYxZDM3MjhlYjFiNDAxNDhmNWEwMDRmODNiYjg3MmY3
|
14
|
-
MzQxNWU4ZTlhMGE1ZDQ0MGYzNzBmMTU4YzVkYjc4ZjJlYmQ1NmY0OTE3ZDQ5
|
15
|
-
ZjkwYTNiZmM5ODBlMjM1MWU0Y2I5MmU4ZmI4NWJmNmEzMzRiNTQ=
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5dc42ad67563fd2c8dff75111f86d918da967e98b0beb1be2797b5a718081a65
|
4
|
+
data.tar.gz: 7dcdef18fe96bde06059de4953787a4f80f352dd49f4d75d1358e44c286477b5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 29ec0713726b0a5b8ff79e3bedc35dbb9ace5f6e98c4b77e5ceaaf814b1220028ef879e426468e5189364ffc028c2d938f2639420f398701656eb2a562f6cf7b
|
7
|
+
data.tar.gz: a515331bf54ce6c5d2d5971979d333043f02b569d4343f3883b99af92c162669eea0aa1287307573c1455a4f257d970a86bf6c0c717a068b8213879190a63460
|
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,364 @@
|
|
1
|
+
# This cop requires odd code indentations (as of rubocop 0.57.0)
|
2
|
+
# https://github.com/rubocop-hq/rubocop/issues/5956
|
3
|
+
Layout/AccessModifierIndentation:
|
4
|
+
Enabled: false
|
5
|
+
|
6
|
+
# It causes weird aligments, especially for specs.
|
7
|
+
Layout/BlockEndNewline:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
# Generally, the keyword style uses a lot of space. This is particularly true when
|
11
|
+
# you use case/if statements, in combination with a long-name variable.
|
12
|
+
#
|
13
|
+
# invoice_error_message = case error
|
14
|
+
# when 1 == 1
|
15
|
+
# do_something
|
16
|
+
# else
|
17
|
+
# do_else
|
18
|
+
# end
|
19
|
+
#
|
20
|
+
Layout/EndAlignment:
|
21
|
+
EnforcedStyleAlignWith: variable
|
22
|
+
|
23
|
+
# [codesmell]
|
24
|
+
Lint/HandleExceptions:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
# [codesmell]
|
28
|
+
Metrics/AbcSize:
|
29
|
+
Enabled: false
|
30
|
+
Exclude:
|
31
|
+
- 'spec/**/*_spec.rb'
|
32
|
+
- 'test/**/*_test.rb'
|
33
|
+
|
34
|
+
# [codesmell]
|
35
|
+
Metrics/BlockLength:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
# [codesmell]
|
39
|
+
Metrics/CyclomaticComplexity:
|
40
|
+
Enabled: false
|
41
|
+
Exclude:
|
42
|
+
- 'spec/**/*_spec.rb'
|
43
|
+
- 'test/**/*_test.rb'
|
44
|
+
|
45
|
+
# [codesmell]
|
46
|
+
Metrics/ClassLength:
|
47
|
+
Enabled: false
|
48
|
+
Exclude:
|
49
|
+
- 'spec/**/*_spec.rb'
|
50
|
+
- 'test/**/*_test.rb'
|
51
|
+
|
52
|
+
# [codesmell]
|
53
|
+
Metrics/LineLength:
|
54
|
+
Enabled: false
|
55
|
+
Exclude:
|
56
|
+
- 'spec/**/*_spec.rb'
|
57
|
+
- 'test/**/*_test.rb'
|
58
|
+
Max: 100
|
59
|
+
|
60
|
+
# [codesmell]
|
61
|
+
Metrics/MethodLength:
|
62
|
+
Enabled: false
|
63
|
+
Exclude:
|
64
|
+
- 'spec/**/*_spec.rb'
|
65
|
+
- 'test/**/*_test.rb'
|
66
|
+
Max: 10
|
67
|
+
|
68
|
+
# [codesmell]
|
69
|
+
Metrics/ModuleLength:
|
70
|
+
Enabled: false
|
71
|
+
Exclude:
|
72
|
+
- 'spec/**/*_spec.rb'
|
73
|
+
- 'test/**/*_test.rb'
|
74
|
+
|
75
|
+
# [codesmell]
|
76
|
+
Metrics/ParameterLists:
|
77
|
+
Enabled: false
|
78
|
+
Max: 5
|
79
|
+
|
80
|
+
# [codesmell]
|
81
|
+
Metrics/PerceivedComplexity:
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
# We tend to use @_name to represent a variable that is memoized,
|
85
|
+
# but it should not be accessed directly and kept as private.
|
86
|
+
Naming/MemoizedInstanceVariableName:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
# We use it from time to time, as it's not always possible (or maintainable)
|
90
|
+
# to use simple ? methods.
|
91
|
+
# Moreover, it's actually more efficient to not-use predicates:
|
92
|
+
# https://github.com/bbatsov/rubocop/issues/3633
|
93
|
+
Naming/PredicateName:
|
94
|
+
Enabled: false
|
95
|
+
|
96
|
+
# This cop triggers several false positives that make sense in our domain model.
|
97
|
+
# For instance, ip is considered an uncommunicative parameter name:
|
98
|
+
#
|
99
|
+
# ipv4_to_arpa_name(ip)
|
100
|
+
#
|
101
|
+
Naming/UncommunicativeMethodParamName:
|
102
|
+
Enabled: false
|
103
|
+
|
104
|
+
# [codesmell]
|
105
|
+
# I don't really get the point of this cop.
|
106
|
+
Performance/RedundantMerge:
|
107
|
+
Enabled: false
|
108
|
+
|
109
|
+
# This cop returns false positive violations (as of rubocop 0.57.0)
|
110
|
+
# https://github.com/rubocop-hq/rubocop/issues/5953
|
111
|
+
Style/AccessModifierDeclarations:
|
112
|
+
Enabled: false
|
113
|
+
|
114
|
+
# Do not use "and" or "or" in conditionals, but for readability we can use it
|
115
|
+
# to chain executions. Just beware of operator order.
|
116
|
+
Style/AndOr:
|
117
|
+
EnforcedStyle: conditionals
|
118
|
+
|
119
|
+
# No specific reason, except that %q() is easier to grep than %()
|
120
|
+
Style/BarePercentLiterals:
|
121
|
+
EnforcedStyle: percent_q
|
122
|
+
|
123
|
+
# braces_for_chaining seems a good fit of what we've been doing so far.
|
124
|
+
Style/BlockDelimiters:
|
125
|
+
EnforcedStyle: braces_for_chaining
|
126
|
+
IgnoredMethods:
|
127
|
+
- expect
|
128
|
+
|
129
|
+
# I'm not sure we should enforce a style,
|
130
|
+
# but if we do, context_dependent offers a good compromise on readability.
|
131
|
+
Style/BracesAroundHashParameters:
|
132
|
+
Enabled: false
|
133
|
+
EnforcedStyle: context_dependent
|
134
|
+
|
135
|
+
# Warn on empty else.
|
136
|
+
Style/EmptyElse:
|
137
|
+
EnforcedStyle: empty
|
138
|
+
|
139
|
+
# There is no specific preference for empty methods.
|
140
|
+
# One-line methods are not exceptionally nice in Ruby. Just ignore this cop for now.
|
141
|
+
Style/EmptyMethod:
|
142
|
+
Enabled: false
|
143
|
+
|
144
|
+
# We don't care about the format style.
|
145
|
+
# In most cases we use %, but not at the point we want to enforce it
|
146
|
+
# as a convention in the entire code.
|
147
|
+
Style/FormatString:
|
148
|
+
Enabled: false
|
149
|
+
|
150
|
+
# Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
|
151
|
+
# %s is a simpler and straightforward version that works in almost all cases. So don't complain.
|
152
|
+
Style/FormatStringToken:
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
# We don't support frozen strings.
|
156
|
+
# This is an experimental feature and we don't know if it will be shipped with
|
157
|
+
# Ruby 3.0 or not.
|
158
|
+
Style/FrozenStringLiteralComment:
|
159
|
+
Enabled: false
|
160
|
+
|
161
|
+
# Prefer the latest Hash syntax
|
162
|
+
Style/HashSyntax:
|
163
|
+
Exclude:
|
164
|
+
# But Rakefiles generally have some definition like
|
165
|
+
# :default => :test
|
166
|
+
# that looks nicer with the old rocket syntax.
|
167
|
+
- 'Rakefile'
|
168
|
+
|
169
|
+
# We want to be able to decide when to use one-line if/unless modifiers.
|
170
|
+
Style/IfUnlessModifier:
|
171
|
+
Enabled: false
|
172
|
+
|
173
|
+
# [codesmell]
|
174
|
+
# It's not always that bad.
|
175
|
+
Style/IfInsideElse:
|
176
|
+
Enabled: false
|
177
|
+
|
178
|
+
# module_function doesn't respect the visibility of the methods,
|
179
|
+
# and doesn't work well when the module contain both public/private methods.
|
180
|
+
Style/ModuleFunction:
|
181
|
+
Enabled: false
|
182
|
+
|
183
|
+
Style/MultilineBlockChain:
|
184
|
+
Exclude:
|
185
|
+
# RSpec uses multi-line blocks for certain features
|
186
|
+
- 'spec/**/*_spec.rb'
|
187
|
+
|
188
|
+
# unless is not always cool.
|
189
|
+
Style/NegatedIf:
|
190
|
+
Enabled: false
|
191
|
+
|
192
|
+
# Magic numbers are not welcomed
|
193
|
+
Style/NumericLiterals:
|
194
|
+
Exclude:
|
195
|
+
# however tests can use numeric literals for method calls,
|
196
|
+
# without the need to define a variable just for that.
|
197
|
+
- 'spec/**/*_spec.rb'
|
198
|
+
- 'test/**/*_test.rb'
|
199
|
+
|
200
|
+
# For years, %w() has been the de-facto standard. A lot of libraries are using ().
|
201
|
+
# Switching to [] would be a nightmare.
|
202
|
+
Style/PercentLiteralDelimiters:
|
203
|
+
Enabled: false
|
204
|
+
|
205
|
+
# Enable but only for multiple returns value.
|
206
|
+
#
|
207
|
+
# return foo, bar
|
208
|
+
#
|
209
|
+
# reads much better than
|
210
|
+
#
|
211
|
+
# [foo, bar]
|
212
|
+
#
|
213
|
+
Style/RedundantReturn:
|
214
|
+
AllowMultipleReturnValues: true
|
215
|
+
|
216
|
+
# Do we care?
|
217
|
+
Style/RegexpLiteral:
|
218
|
+
Enabled: false
|
219
|
+
|
220
|
+
# There are cases were the inline rescue is ok. We can either downgrade the severity,
|
221
|
+
# or rely on the developer judgement on a case-by-case basis.
|
222
|
+
Style/RescueModifier:
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
# This is quite annoying, especially in cases where we don't control it (e.g. schema.rb).
|
226
|
+
Style/SymbolArray:
|
227
|
+
Enabled: false
|
228
|
+
|
229
|
+
# We don't have a preference.
|
230
|
+
Style/SpecialGlobalVars:
|
231
|
+
Enabled: false
|
232
|
+
EnforcedStyle: use_perl_names
|
233
|
+
|
234
|
+
# We generally use double quotes, sometimes single quotes.
|
235
|
+
# Should we enforce it at code level?
|
236
|
+
Style/StringLiterals:
|
237
|
+
Enabled: false
|
238
|
+
EnforcedStyle: double_quotes
|
239
|
+
|
240
|
+
# As before.
|
241
|
+
Style/StringLiteralsInInterpolation:
|
242
|
+
Enabled: false
|
243
|
+
EnforcedStyle: double_quotes
|
244
|
+
|
245
|
+
# It's nice to be consistent. The trailing comma also allows easy reordering,
|
246
|
+
# and doesn't cause a diff in Git when you add a line to the bottom.
|
247
|
+
Style/TrailingCommaInArrayLiteral:
|
248
|
+
EnforcedStyleForMultiline: consistent_comma
|
249
|
+
|
250
|
+
# It's nice to be consistent. The trailing comma also allows easy reordering,
|
251
|
+
# and doesn't cause a diff in Git when you add a line to the bottom.
|
252
|
+
Style/TrailingCommaInHashLiteral:
|
253
|
+
EnforcedStyleForMultiline: consistent_comma
|
254
|
+
|
255
|
+
Style/TrivialAccessors:
|
256
|
+
# IgnoreClassMethods because I want to be able to define class-level accessors
|
257
|
+
# that sets an instance variable on the metaclass, such as:
|
258
|
+
#
|
259
|
+
# def self.default=(value)
|
260
|
+
# @default = value
|
261
|
+
# end
|
262
|
+
#
|
263
|
+
IgnoreClassMethods: true
|
264
|
+
|
265
|
+
Style/WordArray:
|
266
|
+
EnforcedStyle: percent
|
267
|
+
MinSize: 3
|
268
|
+
|
269
|
+
# Forces the order of comparison arguments.
|
270
|
+
#
|
271
|
+
# According to this cop, the following statement is bad:
|
272
|
+
#
|
273
|
+
# "https" == uri.scheme
|
274
|
+
#
|
275
|
+
# Whereas the following is considered good:
|
276
|
+
#
|
277
|
+
# uri.scheme == "https"
|
278
|
+
Style/YodaCondition:
|
279
|
+
Enabled: false
|
280
|
+
|
281
|
+
# For the same reason of EndAlignment, aligning with the case may have a bad impact
|
282
|
+
# on a case after a very long variable.
|
283
|
+
#
|
284
|
+
# invoice_error_message = case error
|
285
|
+
# when 1 == 1
|
286
|
+
# do_something
|
287
|
+
# else
|
288
|
+
# do_else
|
289
|
+
# end
|
290
|
+
#
|
291
|
+
Layout/CaseIndentation:
|
292
|
+
EnforcedStyle: end
|
293
|
+
|
294
|
+
# I was a big fan of leading, but trailing seems to be more commonly adopted.
|
295
|
+
# At least at the time being.
|
296
|
+
Layout/DotPosition:
|
297
|
+
EnforcedStyle: leading
|
298
|
+
|
299
|
+
# Double empty lines are useful to separate conceptually different methods
|
300
|
+
# in the same class or module.
|
301
|
+
Layout/EmptyLines:
|
302
|
+
Enabled: false
|
303
|
+
|
304
|
+
# This is buggy. It detects as a style violation a few `class` and `module` definitions
|
305
|
+
Layout/EmptyLinesAroundArguments:
|
306
|
+
Enabled: false
|
307
|
+
|
308
|
+
Layout/EmptyLinesAroundBlockBody:
|
309
|
+
Exclude:
|
310
|
+
# RSpec is all made of blocks. Disable this config in RSpec
|
311
|
+
# to be consistent with EmptyLinesAroundClassBody and EmptyLinesAroundModuleBody
|
312
|
+
- 'spec/**/*_spec.rb'
|
313
|
+
- 'test/**/*_test.rb'
|
314
|
+
|
315
|
+
# In most cases, a space is nice. Sometimes, it's not.
|
316
|
+
# Just be consistent with the rest of the surrounding code.
|
317
|
+
Layout/EmptyLinesAroundClassBody:
|
318
|
+
Enabled: false
|
319
|
+
|
320
|
+
# We're ok with it. We use it quite often for method-level rescue statements.
|
321
|
+
Layout/EmptyLinesAroundExceptionHandlingKeywords:
|
322
|
+
Enabled: false
|
323
|
+
|
324
|
+
# In most cases, a space is nice. Sometimes, it's not.
|
325
|
+
# Just be consistent with the rest of the surrounding code.
|
326
|
+
Layout/EmptyLinesAroundModuleBody:
|
327
|
+
Enabled: false
|
328
|
+
|
329
|
+
# This is quite buggy, as it doesn't recognize double lines.
|
330
|
+
Layout/EmptyLineBetweenDefs:
|
331
|
+
Enabled: false
|
332
|
+
|
333
|
+
# Multi-line differs from standard indentation, they are indented twice.
|
334
|
+
Layout/FirstParameterIndentation:
|
335
|
+
IndentationWidth: 4
|
336
|
+
|
337
|
+
# Array indentation should be consistent with method/variable definition.
|
338
|
+
Layout/IndentArray:
|
339
|
+
EnforcedStyle: consistent
|
340
|
+
|
341
|
+
# Hash indentation should be consistent with method/variable definition.
|
342
|
+
Layout/IndentHash:
|
343
|
+
EnforcedStyle: consistent
|
344
|
+
|
345
|
+
# Multi-line differs from standard indentation, they are indented twice.
|
346
|
+
Layout/MultilineMethodCallIndentation:
|
347
|
+
EnforcedStyle: indented
|
348
|
+
IndentationWidth: 4
|
349
|
+
|
350
|
+
# Multi-line differs from standard indentation, they are indented twice.
|
351
|
+
Layout/MultilineOperationIndentation:
|
352
|
+
EnforcedStyle: indented
|
353
|
+
IndentationWidth: 4
|
354
|
+
|
355
|
+
# Sorry, but using trailing spaces helps readability.
|
356
|
+
#
|
357
|
+
# %w( foo bar )
|
358
|
+
#
|
359
|
+
# looks better than:
|
360
|
+
#
|
361
|
+
# %w(foo bar)
|
362
|
+
#
|
363
|
+
Layout/SpaceInsidePercentLiteralDelimiters:
|
364
|
+
Enabled: false
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,207 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2018-10-29 22:14:14 +0100 using RuboCop version 0.60.0.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'net-dns.gemspec'
|
15
|
+
|
16
|
+
|
17
|
+
# Offense count: 2
|
18
|
+
Lint/AmbiguousRegexpLiteral:
|
19
|
+
Exclude:
|
20
|
+
- 'test/unit/rr/mr_test.rb'
|
21
|
+
- 'test/unit/rr/types_test.rb'
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
Lint/DuplicateMethods:
|
25
|
+
Exclude:
|
26
|
+
- 'lib/net/dns/resolver.rb'
|
27
|
+
|
28
|
+
# Offense count: 1
|
29
|
+
Lint/EmptyWhen:
|
30
|
+
Exclude:
|
31
|
+
- 'lib/net/dns/rr/types.rb'
|
32
|
+
|
33
|
+
# Offense count: 1
|
34
|
+
Lint/IneffectiveAccessModifier:
|
35
|
+
Exclude:
|
36
|
+
- 'lib/net/dns/rr.rb'
|
37
|
+
|
38
|
+
# Offense count: 1
|
39
|
+
Lint/LiteralAsCondition:
|
40
|
+
Exclude:
|
41
|
+
- 'lib/net/dns/header.rb'
|
42
|
+
|
43
|
+
# Offense count: 1
|
44
|
+
Lint/NonLocalExitFromIterator:
|
45
|
+
Exclude:
|
46
|
+
- 'lib/net/dns/resolver.rb'
|
47
|
+
|
48
|
+
# Offense count: 5
|
49
|
+
# Cop supports --auto-correct.
|
50
|
+
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
51
|
+
Lint/UnusedBlockArgument:
|
52
|
+
Exclude:
|
53
|
+
- 'lib/net/dns/core_ext.rb'
|
54
|
+
- 'lib/net/dns/header.rb'
|
55
|
+
- 'lib/net/dns/resolver.rb'
|
56
|
+
- 'test/unit/rr/types_test.rb'
|
57
|
+
|
58
|
+
# Offense count: 9
|
59
|
+
# Cop supports --auto-correct.
|
60
|
+
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
|
61
|
+
Lint/UnusedMethodArgument:
|
62
|
+
Exclude:
|
63
|
+
- 'lib/net/dns/packet.rb'
|
64
|
+
- 'lib/net/dns/resolver.rb'
|
65
|
+
- 'test/unit/resolver_test.rb'
|
66
|
+
|
67
|
+
# Offense count: 5
|
68
|
+
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
69
|
+
Lint/UselessAccessModifier:
|
70
|
+
Exclude:
|
71
|
+
- 'lib/net/dns/rr/null.rb'
|
72
|
+
- 'lib/net/dns/rr/ptr.rb'
|
73
|
+
- 'lib/net/dns/rr/soa.rb'
|
74
|
+
- 'lib/net/dns/rr/srv.rb'
|
75
|
+
- 'lib/net/dns/rr/txt.rb'
|
76
|
+
|
77
|
+
# Offense count: 13
|
78
|
+
Lint/UselessAssignment:
|
79
|
+
Exclude:
|
80
|
+
- 'lib/net/dns/packet.rb'
|
81
|
+
- 'lib/net/dns/question.rb'
|
82
|
+
- 'lib/net/dns/resolver.rb'
|
83
|
+
- 'lib/net/dns/rr.rb'
|
84
|
+
- 'lib/net/dns/rr/hinfo.rb'
|
85
|
+
- 'lib/net/dns/rr/srv.rb'
|
86
|
+
- 'test/unit/resolver_test.rb'
|
87
|
+
|
88
|
+
# Offense count: 3
|
89
|
+
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
90
|
+
Lint/Void:
|
91
|
+
Exclude:
|
92
|
+
- 'lib/net/dns/rr.rb'
|
93
|
+
- 'lib/net/dns/rr/a.rb'
|
94
|
+
- 'lib/net/dns/rr/aaaa.rb'
|
95
|
+
|
96
|
+
# Offense count: 23
|
97
|
+
Naming/AccessorMethodName:
|
98
|
+
Exclude:
|
99
|
+
- 'lib/net/dns/rr.rb'
|
100
|
+
- 'lib/net/dns/rr/a.rb'
|
101
|
+
- 'lib/net/dns/rr/aaaa.rb'
|
102
|
+
- 'lib/net/dns/rr/cname.rb'
|
103
|
+
- 'lib/net/dns/rr/hinfo.rb'
|
104
|
+
- 'lib/net/dns/rr/mr.rb'
|
105
|
+
- 'lib/net/dns/rr/mx.rb'
|
106
|
+
- 'lib/net/dns/rr/ns.rb'
|
107
|
+
- 'lib/net/dns/rr/null.rb'
|
108
|
+
- 'lib/net/dns/rr/ptr.rb'
|
109
|
+
- 'lib/net/dns/rr/soa.rb'
|
110
|
+
- 'lib/net/dns/rr/txt.rb'
|
111
|
+
|
112
|
+
# Offense count: 12
|
113
|
+
Naming/ConstantName:
|
114
|
+
Exclude:
|
115
|
+
- 'lib/net/dns/header.rb'
|
116
|
+
- 'lib/net/dns/resolver.rb'
|
117
|
+
- 'test/unit/resolver_test.rb'
|
118
|
+
- 'test/unit/rr/a_test.rb'
|
119
|
+
- 'test/unit/rr/aaaa_test.rb'
|
120
|
+
- 'test/unit/rr/classes_test.rb'
|
121
|
+
- 'test/unit/rr/cname_test.rb'
|
122
|
+
- 'test/unit/rr/hinfo_test.rb'
|
123
|
+
- 'test/unit/rr/mr_test.rb'
|
124
|
+
- 'test/unit/rr/mx_test.rb'
|
125
|
+
- 'test/unit/rr/ns_test.rb'
|
126
|
+
|
127
|
+
# Offense count: 12
|
128
|
+
# Configuration parameters: EnforcedStyle.
|
129
|
+
# SupportedStyles: snake_case, camelCase
|
130
|
+
Naming/MethodName:
|
131
|
+
Exclude:
|
132
|
+
- 'lib/net/dns/header.rb'
|
133
|
+
- 'lib/net/dns/question.rb'
|
134
|
+
- 'lib/net/dns/resolver.rb'
|
135
|
+
- 'lib/net/dns/resolver/socks.rb'
|
136
|
+
|
137
|
+
# Offense count: 24
|
138
|
+
# Configuration parameters: EnforcedStyle.
|
139
|
+
# SupportedStyles: snake_case, camelCase
|
140
|
+
Naming/VariableName:
|
141
|
+
Exclude:
|
142
|
+
- 'lib/net/dns/header.rb'
|
143
|
+
- 'lib/net/dns/question.rb'
|
144
|
+
|
145
|
+
# Offense count: 5
|
146
|
+
Security/Eval:
|
147
|
+
Exclude:
|
148
|
+
- 'lib/net/dns/header.rb'
|
149
|
+
- 'lib/net/dns/resolver.rb'
|
150
|
+
- 'lib/net/dns/rr.rb'
|
151
|
+
|
152
|
+
# Offense count: 2
|
153
|
+
# Cop supports --auto-correct.
|
154
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
155
|
+
# SupportedStyles: nested, compact
|
156
|
+
Style/ClassAndModuleChildren:
|
157
|
+
Exclude:
|
158
|
+
- 'test/test_helper.rb'
|
159
|
+
- 'test/unit/resolver_test.rb'
|
160
|
+
|
161
|
+
# Offense count: 5
|
162
|
+
Style/ClassVars:
|
163
|
+
Exclude:
|
164
|
+
- 'lib/net/dns/resolver/socks.rb'
|
165
|
+
- 'lib/net/dns/rr/classes.rb'
|
166
|
+
- 'lib/net/dns/rr/types.rb'
|
167
|
+
|
168
|
+
# Offense count: 6
|
169
|
+
Style/Documentation:
|
170
|
+
Exclude:
|
171
|
+
- 'spec/**/*'
|
172
|
+
- 'test/**/*'
|
173
|
+
- 'lib/net/dns.rb'
|
174
|
+
- 'lib/net/dns/names.rb'
|
175
|
+
- 'lib/net/dns/resolver.rb'
|
176
|
+
- 'lib/net/dns/resolver/timeouts.rb'
|
177
|
+
|
178
|
+
# Offense count: 2
|
179
|
+
Style/DoubleNegation:
|
180
|
+
Exclude:
|
181
|
+
- 'Rakefile'
|
182
|
+
- 'lib/net/dns/resolver.rb'
|
183
|
+
|
184
|
+
# Offense count: 4
|
185
|
+
Style/EvalWithLocation:
|
186
|
+
Exclude:
|
187
|
+
- 'lib/net/dns/header.rb'
|
188
|
+
- 'lib/net/dns/resolver.rb'
|
189
|
+
- 'lib/net/dns/rr.rb'
|
190
|
+
|
191
|
+
# Offense count: 41
|
192
|
+
# Configuration parameters: MinBodyLength.
|
193
|
+
Style/GuardClause:
|
194
|
+
Enabled: false
|
195
|
+
|
196
|
+
# Offense count: 7
|
197
|
+
# Cop supports --auto-correct.
|
198
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
199
|
+
# SupportedStyles: predicate, comparison
|
200
|
+
Style/NumericPredicate:
|
201
|
+
Exclude:
|
202
|
+
- 'spec/**/*'
|
203
|
+
- 'lib/net/dns/header.rb'
|
204
|
+
- 'lib/net/dns/names.rb'
|
205
|
+
- 'lib/net/dns/question.rb'
|
206
|
+
- 'lib/net/dns/resolver.rb'
|
207
|
+
- 'lib/net/dns/resolver/timeouts.rb'
|