net-dns 0.9.0 → 0.20.0

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -16
  3. data/README.md +1 -1
  4. data/lib/net/dns/header.rb +48 -64
  5. data/lib/net/dns/names.rb +8 -10
  6. data/lib/net/dns/packet.rb +46 -53
  7. data/lib/net/dns/question.rb +5 -3
  8. data/lib/net/dns/resolver/socks.rb +5 -7
  9. data/lib/net/dns/resolver/timeouts.rb +3 -5
  10. data/lib/net/dns/resolver.rb +54 -69
  11. data/lib/net/dns/rr/a.rb +3 -4
  12. data/lib/net/dns/rr/aaaa.rb +3 -5
  13. data/lib/net/dns/rr/classes.rb +6 -8
  14. data/lib/net/dns/rr/cname.rb +3 -5
  15. data/lib/net/dns/rr/hinfo.rb +9 -13
  16. data/lib/net/dns/rr/mr.rb +3 -5
  17. data/lib/net/dns/rr/mx.rb +5 -7
  18. data/lib/net/dns/rr/ns.rb +3 -5
  19. data/lib/net/dns/rr/null.rb +3 -5
  20. data/lib/net/dns/rr/ptr.rb +3 -5
  21. data/lib/net/dns/rr/soa.rb +11 -7
  22. data/lib/net/dns/rr/srv.rb +5 -2
  23. data/lib/net/dns/rr/txt.rb +4 -6
  24. data/lib/net/dns/rr/types.rb +90 -79
  25. data/lib/net/dns/rr.rb +2 -2
  26. data/lib/net/dns/version.rb +1 -1
  27. data/lib/net/dns.rb +3 -1
  28. metadata +11 -104
  29. data/.gitignore +0 -8
  30. data/.rubocop.yml +0 -3
  31. data/.rubocop_defaults.yml +0 -364
  32. data/.rubocop_todo.yml +0 -207
  33. data/Gemfile +0 -8
  34. data/Rakefile +0 -38
  35. data/bin/console +0 -14
  36. data/lib/net/dns/core_ext.rb +0 -45
  37. data/net-dns.gemspec +0 -23
  38. data/spec/fixtures/resolv.conf +0 -4
  39. data/spec/spec_helper.rb +0 -14
  40. data/spec/unit/resolver/dns_timeout_spec.rb +0 -36
  41. data/spec/unit/resolver/tcp_timeout_spec.rb +0 -46
  42. data/spec/unit/resolver/udp_timeout_spec.rb +0 -46
  43. data/test/test_helper.rb +0 -13
  44. data/test/unit/header_test.rb +0 -164
  45. data/test/unit/names_test.rb +0 -21
  46. data/test/unit/packet_test.rb +0 -47
  47. data/test/unit/question_test.rb +0 -81
  48. data/test/unit/resolver_test.rb +0 -114
  49. data/test/unit/rr/a_test.rb +0 -106
  50. data/test/unit/rr/aaaa_test.rb +0 -102
  51. data/test/unit/rr/classes_test.rb +0 -83
  52. data/test/unit/rr/cname_test.rb +0 -90
  53. data/test/unit/rr/hinfo_test.rb +0 -111
  54. data/test/unit/rr/mr_test.rb +0 -99
  55. data/test/unit/rr/mx_test.rb +0 -106
  56. data/test/unit/rr/ns_test.rb +0 -80
  57. data/test/unit/rr/types_test.rb +0 -71
  58. data/test/unit/rr_test.rb +0 -127
@@ -1,364 +0,0 @@
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 DELETED
@@ -1,207 +0,0 @@
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'
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "minitest"
6
- gem "minitest-reporters"
7
- gem "rspec"
8
- gem "rubocop", require: false
data/Rakefile DELETED
@@ -1,38 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- # Run test by default.
4
- task default: :test
5
- task test: %i[testunit spec]
6
-
7
- require 'rake/testtask'
8
-
9
- Rake::TestTask.new(:testunit) do |t|
10
- t.libs = %w[lib test]
11
- t.pattern = "test/**/*_test.rb"
12
- t.verbose = !ENV["VERBOSE"].nil?
13
- t.warning = !ENV["WARNING"].nil?
14
- end
15
-
16
- require "rubocop/rake_task"
17
-
18
- RuboCop::RakeTask.new
19
-
20
- require 'rspec/core/rake_task'
21
- begin
22
- require 'fuubar'
23
- rescue LoadError
24
- end
25
-
26
- RSpec::Core::RakeTask.new do |t|
27
- t.verbose = !!ENV["VERBOSE"]
28
- t.rspec_opts = []
29
- t.rspec_opts << ['--format', 'Fuubar'] if defined?(Fuubar)
30
- end
31
-
32
- require 'yard/rake/yardoc_task'
33
-
34
- YARD::Rake::YardocTask.new(:yardoc) do |y|
35
- y.options = ["--output-dir", "yardoc"]
36
- end
37
-
38
- CLOBBER.include "yardoc"
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "net/dns"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
@@ -1,45 +0,0 @@
1
- module Net # :nodoc:
2
- module DNS
3
- module HashKeys # :nodoc:
4
- # Returns an hash with all the
5
- # keys turned into downcase
6
- #
7
- # hsh = {"Test" => 1, "FooBar" => 2}
8
- # hsh.downcase_keys!
9
- # #=> {"test"=>1,"foobar"=>2}
10
- #
11
- def downcase_keys!
12
- hsh = {}
13
- each do |key, val|
14
- hsh[key.downcase] = val
15
- end
16
- replace(hsh)
17
- end
18
- end
19
-
20
- module HashOperators # :nodoc:
21
- # Performs a sort of group difference
22
- # operation on hashes or arrays
23
- #
24
- # a = {:a=>1,:b=>2,:c=>3}
25
- # b = {:a=>1,:b=>2}
26
- # c = [:a,:c]
27
- # a-b #=> {:c=>3}
28
- # a-c #=> {:b=>2}
29
- #
30
- def -(other)
31
- case other
32
- when Hash
33
- delete_if { |k, v| other.key?(k) }
34
- when Array
35
- delete_if { |k, v| other.include?(k) }
36
- end
37
- end
38
- end
39
- end
40
- end
41
-
42
- class Hash # :nodoc:
43
- include Net::DNS::HashKeys
44
- include Net::DNS::HashOperators
45
- end
data/net-dns.gemspec DELETED
@@ -1,23 +0,0 @@
1
- $LOAD_PATH.push File.expand_path('lib', __dir__)
2
- require "net/dns/version"
3
-
4
- Gem::Specification.new do |s|
5
- s.name = "net-dns"
6
- s.version = Net::DNS::VERSION
7
- s.authors = ["Marco Ceresa", "Simone Carletti"]
8
- s.email = ["ceresa@gmail.com", "weppos@weppos.net"]
9
- s.homepage = "http://github.com/bluemonk/net-dns"
10
- s.summary = "Pure Ruby DNS library."
11
- s.description = "Net::DNS is a pure Ruby DNS library, with a clean OO interface and an extensible API."
12
-
13
- s.required_ruby_version = ">= 2.1"
14
-
15
- s.require_paths = ["lib"]
16
- s.files = `git ls-files`.split("\n")
17
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.extra_rdoc_files = %w[LICENSE.txt]
19
-
20
- s.add_development_dependency "mocha"
21
- s.add_development_dependency "rake"
22
- s.add_development_dependency "yard"
23
- end
@@ -1,4 +0,0 @@
1
- search corporate.thoughtworks.com
2
- nameserver 192.168.1.1
3
- nameserver 192.168.1.2
4
- nameserver 192.168.1.3 192.168.1.4