gitlab-net-dns 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -0
  3. data/.gitlab-ci.yml +20 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +3 -0
  6. data/.rubocop_defaults.yml +359 -0
  7. data/.rubocop_todo.yml +207 -0
  8. data/.travis.yml +13 -0
  9. data/CHANGELOG.md +113 -0
  10. data/Gemfile +9 -0
  11. data/LICENSE.txt +56 -0
  12. data/README.md +172 -0
  13. data/Rakefile +38 -0
  14. data/THANKS.rdoc +24 -0
  15. data/bin/console +14 -0
  16. data/demo/check_soa.rb +104 -0
  17. data/demo/threads.rb +18 -0
  18. data/gitlab-net-dns.gemspec +24 -0
  19. data/lib/net/dns.rb +104 -0
  20. data/lib/net/dns/header.rb +705 -0
  21. data/lib/net/dns/names.rb +120 -0
  22. data/lib/net/dns/packet.rb +560 -0
  23. data/lib/net/dns/question.rb +185 -0
  24. data/lib/net/dns/resolver.rb +1214 -0
  25. data/lib/net/dns/resolver/socks.rb +148 -0
  26. data/lib/net/dns/resolver/timeouts.rb +70 -0
  27. data/lib/net/dns/rr.rb +356 -0
  28. data/lib/net/dns/rr/a.rb +114 -0
  29. data/lib/net/dns/rr/aaaa.rb +94 -0
  30. data/lib/net/dns/rr/classes.rb +130 -0
  31. data/lib/net/dns/rr/cname.rb +74 -0
  32. data/lib/net/dns/rr/hinfo.rb +96 -0
  33. data/lib/net/dns/rr/mr.rb +70 -0
  34. data/lib/net/dns/rr/mx.rb +82 -0
  35. data/lib/net/dns/rr/ns.rb +70 -0
  36. data/lib/net/dns/rr/null.rb +50 -0
  37. data/lib/net/dns/rr/ptr.rb +77 -0
  38. data/lib/net/dns/rr/soa.rb +75 -0
  39. data/lib/net/dns/rr/srv.rb +41 -0
  40. data/lib/net/dns/rr/txt.rb +58 -0
  41. data/lib/net/dns/rr/types.rb +191 -0
  42. data/lib/net/dns/version.rb +8 -0
  43. data/spec/fixtures/resolv.conf +4 -0
  44. data/spec/spec_helper.rb +14 -0
  45. data/spec/unit/resolver/dns_timeout_spec.rb +36 -0
  46. data/spec/unit/resolver/tcp_timeout_spec.rb +46 -0
  47. data/spec/unit/resolver/udp_timeout_spec.rb +46 -0
  48. data/test/test_helper.rb +13 -0
  49. data/test/unit/header_test.rb +164 -0
  50. data/test/unit/names_test.rb +21 -0
  51. data/test/unit/packet_test.rb +47 -0
  52. data/test/unit/question_test.rb +81 -0
  53. data/test/unit/resolver_test.rb +114 -0
  54. data/test/unit/rr/a_test.rb +106 -0
  55. data/test/unit/rr/aaaa_test.rb +102 -0
  56. data/test/unit/rr/classes_test.rb +83 -0
  57. data/test/unit/rr/cname_test.rb +90 -0
  58. data/test/unit/rr/hinfo_test.rb +111 -0
  59. data/test/unit/rr/mr_test.rb +99 -0
  60. data/test/unit/rr/mx_test.rb +106 -0
  61. data/test/unit/rr/ns_test.rb +80 -0
  62. data/test/unit/rr/types_test.rb +71 -0
  63. data/test/unit/rr_test.rb +127 -0
  64. metadata +172 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3749874f88fb65100931c4924b9168fd258f1a7a320bfaa9b84606a37ac4f056
4
+ data.tar.gz: f73cac933b2bade1e5fd327a7bf48e8019795fc04289aea47c93b814cbad81ed
5
+ SHA512:
6
+ metadata.gz: 345cf18abc31bce77b9344deb47f850a5dedc0a71eaf3482819acf09f939e40e0889ad1b421ca67ac6391e8c9a4b90a5b591a27ce41629a8523ff1971f6b291c
7
+ data.tar.gz: 2559487da36a5ebb56299c173897bb49bd517319d07b5cc92b381e57ffc33154beba671e11224476d90f02a8dadbd21c9fd2398be5ab95e2338192710d2c33c3
@@ -0,0 +1,8 @@
1
+ # Bundler
2
+ .bundle
3
+ pkg/*
4
+ Gemfile.lock
5
+
6
+ # YARD
7
+ .yardoc
8
+ yardoc/
@@ -0,0 +1,20 @@
1
+ image: "ruby:2.6-alpine"
2
+
3
+ cache:
4
+ paths:
5
+ - vendor/ruby
6
+
7
+ before_script:
8
+ - apk add --update git make build-base
9
+ - gem install bundler
10
+ - bundle install --path vendor/ruby
11
+
12
+ rubocop:
13
+ script:
14
+ - bundle exec rubocop
15
+ allow_failure: true
16
+
17
+ rspec:
18
+ script:
19
+ - bundle exec rake
20
+
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,3 @@
1
+ inherit_from:
2
+ - .rubocop_defaults.yml
3
+ - .rubocop_todo.yml
@@ -0,0 +1,359 @@
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
+ # This cop returns false positive violations (as of rubocop 0.57.0)
105
+ # https://github.com/rubocop-hq/rubocop/issues/5953
106
+ Style/AccessModifierDeclarations:
107
+ Enabled: false
108
+
109
+ # Do not use "and" or "or" in conditionals, but for readability we can use it
110
+ # to chain executions. Just beware of operator order.
111
+ Style/AndOr:
112
+ EnforcedStyle: conditionals
113
+
114
+ # No specific reason, except that %q() is easier to grep than %()
115
+ Style/BarePercentLiterals:
116
+ EnforcedStyle: percent_q
117
+
118
+ # braces_for_chaining seems a good fit of what we've been doing so far.
119
+ Style/BlockDelimiters:
120
+ EnforcedStyle: braces_for_chaining
121
+ IgnoredMethods:
122
+ - expect
123
+
124
+ # I'm not sure we should enforce a style,
125
+ # but if we do, context_dependent offers a good compromise on readability.
126
+ Style/BracesAroundHashParameters:
127
+ Enabled: false
128
+ EnforcedStyle: context_dependent
129
+
130
+ # Warn on empty else.
131
+ Style/EmptyElse:
132
+ EnforcedStyle: empty
133
+
134
+ # There is no specific preference for empty methods.
135
+ # One-line methods are not exceptionally nice in Ruby. Just ignore this cop for now.
136
+ Style/EmptyMethod:
137
+ Enabled: false
138
+
139
+ # We don't care about the format style.
140
+ # In most cases we use %, but not at the point we want to enforce it
141
+ # as a convention in the entire code.
142
+ Style/FormatString:
143
+ Enabled: false
144
+
145
+ # Annotated tokens (like %<foo>s) are a good thing, but in most cases we don't need them.
146
+ # %s is a simpler and straightforward version that works in almost all cases. So don't complain.
147
+ Style/FormatStringToken:
148
+ Enabled: false
149
+
150
+ # We don't support frozen strings.
151
+ # This is an experimental feature and we don't know if it will be shipped with
152
+ # Ruby 3.0 or not.
153
+ Style/FrozenStringLiteralComment:
154
+ Enabled: false
155
+
156
+ # Prefer the latest Hash syntax
157
+ Style/HashSyntax:
158
+ Exclude:
159
+ # But Rakefiles generally have some definition like
160
+ # :default => :test
161
+ # that looks nicer with the old rocket syntax.
162
+ - 'Rakefile'
163
+
164
+ # We want to be able to decide when to use one-line if/unless modifiers.
165
+ Style/IfUnlessModifier:
166
+ Enabled: false
167
+
168
+ # [codesmell]
169
+ # It's not always that bad.
170
+ Style/IfInsideElse:
171
+ Enabled: false
172
+
173
+ # module_function doesn't respect the visibility of the methods,
174
+ # and doesn't work well when the module contain both public/private methods.
175
+ Style/ModuleFunction:
176
+ Enabled: false
177
+
178
+ Style/MultilineBlockChain:
179
+ Exclude:
180
+ # RSpec uses multi-line blocks for certain features
181
+ - 'spec/**/*_spec.rb'
182
+
183
+ # unless is not always cool.
184
+ Style/NegatedIf:
185
+ Enabled: false
186
+
187
+ # Magic numbers are not welcomed
188
+ Style/NumericLiterals:
189
+ Exclude:
190
+ # however tests can use numeric literals for method calls,
191
+ # without the need to define a variable just for that.
192
+ - 'spec/**/*_spec.rb'
193
+ - 'test/**/*_test.rb'
194
+
195
+ # For years, %w() has been the de-facto standard. A lot of libraries are using ().
196
+ # Switching to [] would be a nightmare.
197
+ Style/PercentLiteralDelimiters:
198
+ Enabled: false
199
+
200
+ # Enable but only for multiple returns value.
201
+ #
202
+ # return foo, bar
203
+ #
204
+ # reads much better than
205
+ #
206
+ # [foo, bar]
207
+ #
208
+ Style/RedundantReturn:
209
+ AllowMultipleReturnValues: true
210
+
211
+ # Do we care?
212
+ Style/RegexpLiteral:
213
+ Enabled: false
214
+
215
+ # There are cases were the inline rescue is ok. We can either downgrade the severity,
216
+ # or rely on the developer judgement on a case-by-case basis.
217
+ Style/RescueModifier:
218
+ Enabled: false
219
+
220
+ # This is quite annoying, especially in cases where we don't control it (e.g. schema.rb).
221
+ Style/SymbolArray:
222
+ Enabled: false
223
+
224
+ # We don't have a preference.
225
+ Style/SpecialGlobalVars:
226
+ Enabled: false
227
+ EnforcedStyle: use_perl_names
228
+
229
+ # We generally use double quotes, sometimes single quotes.
230
+ # Should we enforce it at code level?
231
+ Style/StringLiterals:
232
+ Enabled: false
233
+ EnforcedStyle: double_quotes
234
+
235
+ # As before.
236
+ Style/StringLiteralsInInterpolation:
237
+ Enabled: false
238
+ EnforcedStyle: double_quotes
239
+
240
+ # It's nice to be consistent. The trailing comma also allows easy reordering,
241
+ # and doesn't cause a diff in Git when you add a line to the bottom.
242
+ Style/TrailingCommaInArrayLiteral:
243
+ EnforcedStyleForMultiline: consistent_comma
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/TrailingCommaInHashLiteral:
248
+ EnforcedStyleForMultiline: consistent_comma
249
+
250
+ Style/TrivialAccessors:
251
+ # IgnoreClassMethods because I want to be able to define class-level accessors
252
+ # that sets an instance variable on the metaclass, such as:
253
+ #
254
+ # def self.default=(value)
255
+ # @default = value
256
+ # end
257
+ #
258
+ IgnoreClassMethods: true
259
+
260
+ Style/WordArray:
261
+ EnforcedStyle: percent
262
+ MinSize: 3
263
+
264
+ # Forces the order of comparison arguments.
265
+ #
266
+ # According to this cop, the following statement is bad:
267
+ #
268
+ # "https" == uri.scheme
269
+ #
270
+ # Whereas the following is considered good:
271
+ #
272
+ # uri.scheme == "https"
273
+ Style/YodaCondition:
274
+ Enabled: false
275
+
276
+ # For the same reason of EndAlignment, aligning with the case may have a bad impact
277
+ # on a case after a very long variable.
278
+ #
279
+ # invoice_error_message = case error
280
+ # when 1 == 1
281
+ # do_something
282
+ # else
283
+ # do_else
284
+ # end
285
+ #
286
+ Layout/CaseIndentation:
287
+ EnforcedStyle: end
288
+
289
+ # I was a big fan of leading, but trailing seems to be more commonly adopted.
290
+ # At least at the time being.
291
+ Layout/DotPosition:
292
+ EnforcedStyle: leading
293
+
294
+ # Double empty lines are useful to separate conceptually different methods
295
+ # in the same class or module.
296
+ Layout/EmptyLines:
297
+ Enabled: false
298
+
299
+ # This is buggy. It detects as a style violation a few `class` and `module` definitions
300
+ Layout/EmptyLinesAroundArguments:
301
+ Enabled: false
302
+
303
+ Layout/EmptyLinesAroundBlockBody:
304
+ Exclude:
305
+ # RSpec is all made of blocks. Disable this config in RSpec
306
+ # to be consistent with EmptyLinesAroundClassBody and EmptyLinesAroundModuleBody
307
+ - 'spec/**/*_spec.rb'
308
+ - 'test/**/*_test.rb'
309
+
310
+ # In most cases, a space is nice. Sometimes, it's not.
311
+ # Just be consistent with the rest of the surrounding code.
312
+ Layout/EmptyLinesAroundClassBody:
313
+ Enabled: false
314
+
315
+ # We're ok with it. We use it quite often for method-level rescue statements.
316
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
317
+ Enabled: false
318
+
319
+ # In most cases, a space is nice. Sometimes, it's not.
320
+ # Just be consistent with the rest of the surrounding code.
321
+ Layout/EmptyLinesAroundModuleBody:
322
+ Enabled: false
323
+
324
+ # This is quite buggy, as it doesn't recognize double lines.
325
+ Layout/EmptyLineBetweenDefs:
326
+ Enabled: false
327
+
328
+ # Multi-line differs from standard indentation, they are indented twice.
329
+ Layout/IndentFirstArgument:
330
+ IndentationWidth: 4
331
+
332
+ # Array indentation should be consistent with method/variable definition.
333
+ Layout/IndentFirstArrayElement:
334
+ EnforcedStyle: consistent
335
+
336
+ # Hash indentation should be consistent with method/variable definition.
337
+ Layout/IndentFirstHashElement:
338
+ EnforcedStyle: consistent
339
+
340
+ # Multi-line differs from standard indentation, they are indented twice.
341
+ Layout/MultilineMethodCallIndentation:
342
+ EnforcedStyle: indented
343
+ IndentationWidth: 4
344
+
345
+ # Multi-line differs from standard indentation, they are indented twice.
346
+ Layout/MultilineOperationIndentation:
347
+ EnforcedStyle: indented
348
+ IndentationWidth: 4
349
+
350
+ # Sorry, but using trailing spaces helps readability.
351
+ #
352
+ # %w( foo bar )
353
+ #
354
+ # looks better than:
355
+ #
356
+ # %w(foo bar)
357
+ #
358
+ Layout/SpaceInsidePercentLiteralDelimiters:
359
+ Enabled: false
@@ -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'