net-ldap 0.11 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of net-ldap might be problematic. Click here for more details.

Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +15 -0
  3. data/.rubocop_todo.yml +471 -180
  4. data/.travis.yml +10 -5
  5. data/Contributors.rdoc +1 -0
  6. data/History.rdoc +60 -0
  7. data/README.rdoc +18 -11
  8. data/Rakefile +0 -1
  9. data/lib/net/ber/ber_parser.rb +4 -4
  10. data/lib/net/ber/core_ext/array.rb +1 -1
  11. data/lib/net/ber/core_ext/integer.rb +1 -1
  12. data/lib/net/ber/core_ext/string.rb +1 -1
  13. data/lib/net/ber.rb +37 -5
  14. data/lib/net/ldap/auth_adapter/gss_spnego.rb +41 -0
  15. data/lib/net/ldap/auth_adapter/sasl.rb +62 -0
  16. data/lib/net/ldap/auth_adapter/simple.rb +34 -0
  17. data/lib/net/ldap/auth_adapter.rb +29 -0
  18. data/lib/net/ldap/connection.rb +197 -187
  19. data/lib/net/ldap/dataset.rb +2 -2
  20. data/lib/net/ldap/dn.rb +4 -5
  21. data/lib/net/ldap/entry.rb +4 -5
  22. data/lib/net/ldap/error.rb +36 -1
  23. data/lib/net/ldap/filter.rb +6 -6
  24. data/lib/net/ldap/pdu.rb +26 -2
  25. data/lib/net/ldap/version.rb +1 -1
  26. data/lib/net/ldap.rb +189 -75
  27. data/lib/net/snmp.rb +18 -18
  28. data/net-ldap.gemspec +4 -2
  29. data/script/changelog +47 -0
  30. data/script/generate-fixture-ca +48 -0
  31. data/script/install-openldap +67 -44
  32. data/test/ber/core_ext/test_array.rb +1 -1
  33. data/test/ber/test_ber.rb +11 -3
  34. data/test/fixtures/ca/ca.info +4 -0
  35. data/test/fixtures/ca/cacert.pem +24 -0
  36. data/test/fixtures/ca/cakey.pem +190 -0
  37. data/test/fixtures/openldap/slapd.conf.ldif +1 -1
  38. data/test/integration/test_add.rb +1 -1
  39. data/test/integration/test_ber.rb +1 -1
  40. data/test/integration/test_bind.rb +220 -10
  41. data/test/integration/test_delete.rb +1 -1
  42. data/test/integration/test_open.rb +1 -1
  43. data/test/integration/test_password_modify.rb +80 -0
  44. data/test/integration/test_search.rb +1 -1
  45. data/test/support/vm/openldap/README.md +35 -3
  46. data/test/support/vm/openldap/Vagrantfile +1 -0
  47. data/test/test_auth_adapter.rb +15 -0
  48. data/test/test_dn.rb +3 -3
  49. data/test/test_filter.rb +4 -4
  50. data/test/test_filter_parser.rb +4 -0
  51. data/test/test_helper.rb +10 -2
  52. data/test/test_ldap.rb +64 -10
  53. data/test/test_ldap_connection.rb +115 -28
  54. data/test/test_ldif.rb +11 -11
  55. data/test/test_search.rb +2 -2
  56. data/test/test_snmp.rb +4 -4
  57. data/testserver/ldapserver.rb +11 -12
  58. metadata +50 -8
  59. data/test/fixtures/cacert.pem +0 -20
data/.rubocop_todo.yml CHANGED
@@ -1,41 +1,74 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-12-19 15:32:44 +1100 using RuboCop version 0.28.0.
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2016-08-17 14:58:12 -0700 using RuboCop version 0.42.0.
3
4
  # The point is for the user to remove these configuration records
4
5
  # one by one as the offenses are removed from the code base.
5
6
  # Note that changes in the inspected code, or installation of new
6
7
  # versions of RuboCop, may require this file to be generated again.
7
8
 
8
- # Offense count: 12
9
- # Configuration parameters: AllowSafeAssignment.
10
- Lint/AssignmentInCondition:
11
- Enabled: false
12
-
13
9
  # Offense count: 1
14
- # Configuration parameters: AlignWith, SupportedStyles.
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
12
+ # SupportedStyles: keyword, variable, start_of_line
15
13
  Lint/EndAlignment:
16
- Enabled: false
14
+ Exclude:
15
+ - 'testserver/ldapserver.rb'
16
+
17
+ # Offense count: 30
18
+ Lint/ImplicitStringConcatenation:
19
+ Exclude:
20
+ - 'test/test_filter.rb'
21
+
22
+ # Offense count: 1
23
+ Lint/NonLocalExitFromIterator:
24
+ Exclude:
25
+ - 'lib/net/ldap/connection.rb'
17
26
 
18
27
  # Offense count: 1
19
28
  Lint/RescueException:
20
- Enabled: false
29
+ Exclude:
30
+ - 'lib/net/ldap/pdu.rb'
21
31
 
22
32
  # Offense count: 1
23
33
  Lint/ShadowingOuterLocalVariable:
24
- Enabled: false
34
+ Exclude:
35
+ - 'lib/net/ldap/instrumentation.rb'
25
36
 
26
- # Offense count: 9
37
+ # Offense count: 10
27
38
  # Cop supports --auto-correct.
39
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
28
40
  Lint/UnusedBlockArgument:
29
- Enabled: false
41
+ Exclude:
42
+ - 'lib/net/ldap.rb'
43
+ - 'lib/net/snmp.rb'
44
+ - 'test/support/vm/openldap/Vagrantfile'
30
45
 
31
- # Offense count: 3
46
+ # Offense count: 7
32
47
  # Cop supports --auto-correct.
48
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
33
49
  Lint/UnusedMethodArgument:
34
- Enabled: false
50
+ Exclude:
51
+ - 'lib/net/ldap/entry.rb'
52
+ - 'lib/net/ldap/pdu.rb'
53
+ - 'test/test_ldap.rb'
54
+ - 'test/test_ldap_connection.rb'
55
+ - 'test/test_search.rb'
35
56
 
36
- # Offense count: 7
57
+ # Offense count: 1
58
+ # Configuration parameters: ContextCreatingMethods.
59
+ Lint/UselessAccessModifier:
60
+ Exclude:
61
+ - 'lib/net/ldap/connection.rb'
62
+
63
+ # Offense count: 9
37
64
  Lint/UselessAssignment:
38
- Enabled: false
65
+ Exclude:
66
+ - 'lib/net/ldap/connection.rb'
67
+ - 'lib/net/ldap/password.rb'
68
+ - 'test/integration/test_add.rb'
69
+ - 'test/test_ldap_connection.rb'
70
+ - 'test/test_search.rb'
71
+ - 'test/test_snmp.rb'
39
72
 
40
73
  # Offense count: 47
41
74
  Metrics/AbcSize:
@@ -45,418 +78,676 @@ Metrics/AbcSize:
45
78
  Metrics/BlockNesting:
46
79
  Max: 4
47
80
 
48
- # Offense count: 9
81
+ # Offense count: 10
49
82
  # Configuration parameters: CountComments.
50
83
  Metrics/ClassLength:
51
- Max: 470
84
+ Max: 431
52
85
 
53
- # Offense count: 20
86
+ # Offense count: 22
54
87
  Metrics/CyclomaticComplexity:
55
88
  Max: 41
56
89
 
57
- # Offense count: 193
58
- # Configuration parameters: AllowURI, URISchemes.
90
+ # Offense count: 225
91
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
92
+ # URISchemes: http, https
59
93
  Metrics/LineLength:
60
94
  Max: 360
61
95
 
62
- # Offense count: 71
96
+ # Offense count: 70
63
97
  # Configuration parameters: CountComments.
64
98
  Metrics/MethodLength:
65
99
  Max: 130
66
100
 
67
- # Offense count: 13
101
+ # Offense count: 1
102
+ # Configuration parameters: CountComments.
103
+ Metrics/ModuleLength:
104
+ Max: 104
105
+
106
+ # Offense count: 14
68
107
  Metrics/PerceivedComplexity:
69
- Max: 36
108
+ Max: 37
70
109
 
71
110
  # Offense count: 1
72
111
  Style/AccessorMethodName:
73
- Enabled: false
112
+ Exclude:
113
+ - 'lib/net/ldap.rb'
114
+
115
+ # Offense count: 10
116
+ # Cop supports --auto-correct.
117
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
118
+ # SupportedStyles: prefer_alias, prefer_alias_method
119
+ Style/Alias:
120
+ Exclude:
121
+ - 'lib/net/ber/core_ext/array.rb'
122
+ - 'lib/net/ldap.rb'
123
+ - 'lib/net/ldap/entry.rb'
124
+ - 'lib/net/ldap/filter.rb'
125
+ - 'lib/net/ldap/pdu.rb'
74
126
 
75
127
  # Offense count: 4
76
128
  # Cop supports --auto-correct.
77
129
  Style/AlignArray:
78
- Enabled: false
130
+ Exclude:
131
+ - 'lib/net/ldap.rb'
132
+ - 'lib/net/ldap/auth_adapter/sasl.rb'
133
+ - 'lib/net/ldap/connection.rb'
79
134
 
80
- # Offense count: 3
135
+ # Offense count: 10
81
136
  # Cop supports --auto-correct.
82
- # Configuration parameters: EnforcedStyle, SupportedStyles.
137
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
138
+ # SupportedStyles: with_first_parameter, with_fixed_indentation
83
139
  Style/AlignParameters:
84
- Enabled: false
140
+ Exclude:
141
+ - 'test/ber/test_ber.rb'
142
+ - 'test/integration/test_ber.rb'
143
+ - 'test/integration/test_bind.rb'
144
+ - 'test/integration/test_password_modify.rb'
85
145
 
86
- # Offense count: 36
146
+ # Offense count: 37
87
147
  # Cop supports --auto-correct.
88
148
  # Configuration parameters: EnforcedStyle, SupportedStyles.
149
+ # SupportedStyles: always, conditionals
89
150
  Style/AndOr:
90
- Enabled: false
151
+ Exclude:
152
+ - 'lib/net/ber/ber_parser.rb'
153
+ - 'lib/net/ldap.rb'
154
+ - 'lib/net/ldap/connection.rb'
155
+ - 'lib/net/ldap/dataset.rb'
156
+ - 'lib/net/ldap/filter.rb'
157
+ - 'lib/net/ldap/pdu.rb'
158
+ - 'testserver/ldapserver.rb'
91
159
 
92
160
  # Offense count: 1
93
161
  # Cop supports --auto-correct.
94
162
  # Configuration parameters: EnforcedStyle, SupportedStyles.
163
+ # SupportedStyles: percent_q, bare_percent
95
164
  Style/BarePercentLiterals:
96
- Enabled: false
165
+ Exclude:
166
+ - 'test/test_entry.rb'
97
167
 
98
168
  # Offense count: 1
99
169
  # Cop supports --auto-correct.
100
170
  Style/BlockComments:
101
- Enabled: false
171
+ Exclude:
172
+ - 'test/test_rename.rb'
102
173
 
103
- # Offense count: 20
104
- # Cop supports --auto-correct.
105
- Style/Blocks:
106
- Enabled: false
107
-
108
- # Offense count: 2
174
+ # Offense count: 6
109
175
  # Cop supports --auto-correct.
110
176
  # Configuration parameters: EnforcedStyle, SupportedStyles.
177
+ # SupportedStyles: braces, no_braces, context_dependent
111
178
  Style/BracesAroundHashParameters:
112
- Enabled: false
179
+ Exclude:
180
+ - 'lib/net/ldap/auth_adapter/gss_spnego.rb'
181
+ - 'lib/net/snmp.rb'
182
+ - 'test/test_ldap.rb'
113
183
 
114
184
  # Offense count: 4
115
- # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
185
+ # Cop supports --auto-correct.
186
+ # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
187
+ # SupportedStyles: case, end
116
188
  Style/CaseIndentation:
117
- Enabled: false
189
+ Exclude:
190
+ - 'lib/net/ldap/filter.rb'
118
191
 
119
192
  # Offense count: 4
120
193
  # Cop supports --auto-correct.
121
194
  Style/CharacterLiteral:
122
- Enabled: false
195
+ Exclude:
196
+ - 'lib/net/ldap/dataset.rb'
197
+ - 'lib/net/ldap/entry.rb'
123
198
 
124
- # Offense count: 22
199
+ # Offense count: 1
200
+ Style/ClassAndModuleCamelCase:
201
+ Exclude:
202
+ - 'lib/net/ldap/auth_adapter/gss_spnego.rb'
203
+
204
+ # Offense count: 23
125
205
  # Configuration parameters: EnforcedStyle, SupportedStyles.
206
+ # SupportedStyles: nested, compact
126
207
  Style/ClassAndModuleChildren:
127
208
  Enabled: false
128
209
 
129
- # Offense count: 1
210
+ # Offense count: 2
130
211
  # Cop supports --auto-correct.
131
212
  # Configuration parameters: EnforcedStyle, SupportedStyles.
213
+ # SupportedStyles: is_a?, kind_of?
132
214
  Style/ClassCheck:
133
- Enabled: false
215
+ Exclude:
216
+ - 'lib/net/ber/core_ext/array.rb'
217
+ - 'lib/net/ldap/error.rb'
134
218
 
135
219
  # Offense count: 13
136
220
  # Cop supports --auto-correct.
137
221
  Style/ColonMethodCall:
138
- Enabled: false
222
+ Exclude:
223
+ - 'test/test_ldif.rb'
224
+ - 'test/test_ssl_ber.rb'
139
225
 
140
- # Offense count: 2
226
+ # Offense count: 1
227
+ # Cop supports --auto-correct.
141
228
  # Configuration parameters: Keywords.
229
+ # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
142
230
  Style/CommentAnnotation:
143
- Enabled: false
231
+ Exclude:
232
+ - 'lib/net/ber.rb'
144
233
 
145
- # Offense count: 86
146
- Style/ConstantName:
147
- Enabled: false
148
-
149
- # Offense count: 18
234
+ # Offense count: 1
150
235
  # Cop supports --auto-correct.
151
- Style/DeprecatedHashMethods:
152
- Enabled: false
236
+ # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
237
+ # SupportedStyles: assign_to_condition, assign_inside_condition
238
+ Style/ConditionalAssignment:
239
+ Exclude:
240
+ - 'lib/net/ldap/dn.rb'
153
241
 
154
- # Offense count: 46
242
+ # Offense count: 88
243
+ Style/ConstantName:
244
+ Exclude:
245
+ - 'lib/net/ldap.rb'
246
+ - 'lib/net/ldap/connection.rb'
247
+ - 'lib/net/ldap/filter.rb'
248
+ - 'lib/net/ldap/pdu.rb'
249
+ - 'lib/net/snmp.rb'
250
+ - 'test/test_ldif.rb'
251
+ - 'testserver/ldapserver.rb'
252
+
253
+ # Offense count: 17
155
254
  Style/Documentation:
156
- Enabled: false
157
-
158
- # Offense count: 23
255
+ Exclude:
256
+ - 'spec/**/*'
257
+ - 'test/**/*'
258
+ - 'lib/net/ber/core_ext.rb'
259
+ - 'lib/net/ldap.rb'
260
+ - 'lib/net/ldap/auth_adapter.rb'
261
+ - 'lib/net/ldap/auth_adapter/sasl.rb'
262
+ - 'lib/net/ldap/auth_adapter/simple.rb'
263
+ - 'lib/net/ldap/connection.rb'
264
+ - 'lib/net/ldap/error.rb'
265
+ - 'lib/net/ldap/instrumentation.rb'
266
+ - 'lib/net/ldap/password.rb'
267
+ - 'lib/net/ldap/pdu.rb'
268
+ - 'lib/net/snmp.rb'
269
+ - 'testserver/ldapserver.rb'
270
+
271
+ # Offense count: 19
159
272
  # Cop supports --auto-correct.
160
273
  # Configuration parameters: EnforcedStyle, SupportedStyles.
274
+ # SupportedStyles: leading, trailing
161
275
  Style/DotPosition:
162
- Enabled: false
276
+ Exclude:
277
+ - 'test/test_ldap_connection.rb'
278
+ - 'test/test_ssl_ber.rb'
163
279
 
164
280
  # Offense count: 1
165
281
  # Cop supports --auto-correct.
166
282
  Style/ElseAlignment:
167
- Enabled: false
283
+ Exclude:
284
+ - 'testserver/ldapserver.rb'
168
285
 
169
- # Offense count: 4
286
+ # Offense count: 5
170
287
  # Cop supports --auto-correct.
171
288
  # Configuration parameters: AllowAdjacentOneLineDefs.
172
289
  Style/EmptyLineBetweenDefs:
173
- Enabled: false
290
+ Exclude:
291
+ - 'lib/net/ldap.rb'
292
+ - 'lib/net/ldap/dataset.rb'
293
+ - 'lib/net/snmp.rb'
174
294
 
175
- # Offense count: 9
295
+ # Offense count: 8
176
296
  # Cop supports --auto-correct.
177
297
  Style/EmptyLines:
178
- Enabled: false
298
+ Exclude:
299
+ - 'lib/net/snmp.rb'
300
+ - 'testserver/ldapserver.rb'
179
301
 
180
- # Offense count: 1
302
+ # Offense count: 2
181
303
  # Cop supports --auto-correct.
182
304
  # Configuration parameters: EnforcedStyle, SupportedStyles.
305
+ # SupportedStyles: empty_lines, no_empty_lines
183
306
  Style/EmptyLinesAroundClassBody:
184
- Enabled: false
307
+ Exclude:
308
+ - 'lib/net/ldap.rb'
309
+ - 'test/test_snmp.rb'
185
310
 
186
311
  # Offense count: 2
187
312
  # Cop supports --auto-correct.
188
313
  # Configuration parameters: EnforcedStyle, SupportedStyles.
314
+ # SupportedStyles: empty_lines, no_empty_lines
189
315
  Style/EmptyLinesAroundModuleBody:
190
- Enabled: false
316
+ Exclude:
317
+ - 'testserver/ldapserver.rb'
191
318
 
192
319
  # Offense count: 3
320
+ # Cop supports --auto-correct.
193
321
  Style/EvenOdd:
194
- Enabled: false
322
+ Exclude:
323
+ - 'lib/net/ldap/dn.rb'
195
324
 
196
325
  # Offense count: 1
197
- # Configuration parameters: Exclude.
326
+ # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
198
327
  Style/FileName:
199
- Enabled: false
328
+ Exclude:
329
+ - 'lib/net-ldap.rb'
200
330
 
201
331
  # Offense count: 9
202
332
  # Configuration parameters: AllowedVariables.
203
333
  Style/GlobalVars:
204
- Enabled: false
334
+ Exclude:
335
+ - 'testserver/ldapserver.rb'
205
336
 
206
- # Offense count: 3
207
- # Configuration parameters: MinBodyLength.
208
- Style/GuardClause:
209
- Enabled: false
210
-
211
- # Offense count: 150
337
+ # Offense count: 161
212
338
  # Cop supports --auto-correct.
213
- # Configuration parameters: EnforcedStyle, SupportedStyles.
339
+ # Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
340
+ # SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
214
341
  Style/HashSyntax:
215
- Enabled: false
342
+ Exclude:
343
+ - 'lib/net/ber.rb'
344
+ - 'lib/net/ber/ber_parser.rb'
345
+ - 'lib/net/ldap.rb'
346
+ - 'lib/net/ldap/auth_adapter/gss_spnego.rb'
347
+ - 'lib/net/ldap/connection.rb'
348
+ - 'lib/net/ldap/pdu.rb'
349
+ - 'lib/net/snmp.rb'
350
+ - 'test/integration/test_bind.rb'
351
+ - 'test/test_auth_adapter.rb'
352
+ - 'test/test_ldap.rb'
353
+ - 'test/test_ldap_connection.rb'
354
+ - 'test/test_search.rb'
355
+ - 'test/test_ssl_ber.rb'
356
+ - 'testserver/ldapserver.rb'
216
357
 
217
- # Offense count: 8
358
+ # Offense count: 1
359
+ Style/IfInsideElse:
360
+ Exclude:
361
+ - 'lib/net/ldap/instrumentation.rb'
362
+
363
+ # Offense count: 7
364
+ # Cop supports --auto-correct.
218
365
  # Configuration parameters: MaxLineLength.
219
366
  Style/IfUnlessModifier:
220
- Enabled: false
367
+ Exclude:
368
+ - 'lib/net/ber.rb'
369
+ - 'lib/net/ber/core_ext/integer.rb'
370
+ - 'lib/net/ldap.rb'
371
+ - 'lib/net/ldap/filter.rb'
372
+ - 'lib/net/snmp.rb'
373
+ - 'test/test_ldap_connection.rb'
221
374
 
222
375
  # Offense count: 2
223
376
  # Cop supports --auto-correct.
224
- # Configuration parameters: EnforcedStyle, SupportedStyles.
377
+ # Configuration parameters: SupportedStyles, IndentationWidth.
378
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
379
+ Style/IndentArray:
380
+ EnforcedStyle: consistent
381
+
382
+ # Offense count: 2
383
+ # Cop supports --auto-correct.
384
+ # Configuration parameters: SupportedStyles, IndentationWidth.
385
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
225
386
  Style/IndentHash:
226
- Enabled: false
387
+ EnforcedStyle: consistent
227
388
 
228
- # Offense count: 6
389
+ # Offense count: 10
229
390
  # Cop supports --auto-correct.
230
391
  # Configuration parameters: Width.
231
392
  Style/IndentationWidth:
232
- Enabled: false
393
+ Exclude:
394
+ - 'lib/net/ber.rb'
395
+ - 'lib/net/ldap/password.rb'
396
+ - 'lib/net/snmp.rb'
397
+ - 'test/test_snmp.rb'
398
+ - 'testserver/ldapserver.rb'
233
399
 
234
- # Offense count: 2
400
+ # Offense count: 3
235
401
  # Cop supports --auto-correct.
236
402
  Style/LeadingCommentSpace:
237
- Enabled: false
403
+ Exclude:
404
+ - 'lib/net/ber/core_ext/array.rb'
405
+ - 'lib/net/ldap.rb'
406
+ - 'lib/net/ldap/connection.rb'
238
407
 
239
408
  # Offense count: 21
240
409
  # Cop supports --auto-correct.
241
410
  # Configuration parameters: EnforcedStyle, SupportedStyles.
411
+ # SupportedStyles: require_parentheses, require_no_parentheses, require_no_parentheses_except_multiline
242
412
  Style/MethodDefParentheses:
243
- Enabled: false
413
+ Exclude:
414
+ - 'lib/net/ber.rb'
415
+ - 'lib/net/ldap/pdu.rb'
416
+ - 'lib/net/snmp.rb'
417
+ - 'testserver/ldapserver.rb'
418
+
419
+ # Offense count: 2
420
+ Style/MethodMissing:
421
+ Exclude:
422
+ - 'lib/net/ldap/dn.rb'
423
+ - 'lib/net/ldap/entry.rb'
244
424
 
245
425
  # Offense count: 1
246
426
  # Configuration parameters: EnforcedStyle, SupportedStyles.
427
+ # SupportedStyles: snake_case, camelCase
247
428
  Style/MethodName:
248
- Enabled: false
429
+ Exclude:
430
+ - 'lib/net/ldap/filter.rb'
249
431
 
250
- # Offense count: 5
432
+ # Offense count: 4
251
433
  # Cop supports --auto-correct.
252
434
  # Configuration parameters: EnforcedStyle, SupportedStyles.
253
- Style/MultilineOperationIndentation:
254
- Enabled: false
435
+ # SupportedStyles: symmetrical, new_line, same_line
436
+ Style/MultilineMethodCallBraceLayout:
437
+ Exclude:
438
+ - 'lib/net/ldap/filter.rb'
439
+ - 'test/test_entry.rb'
440
+ - 'test/test_ldap_connection.rb'
441
+
442
+ # Offense count: 1
443
+ # Cop supports --auto-correct.
444
+ # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
445
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
446
+ Style/MultilineMethodCallIndentation:
447
+ Exclude:
448
+ - 'test/test_ldap_connection.rb'
255
449
 
256
450
  # Offense count: 1
257
451
  Style/MultilineTernaryOperator:
258
- Enabled: false
452
+ Exclude:
453
+ - 'lib/net/ldap/connection.rb'
454
+
455
+ # Offense count: 26
456
+ # Cop supports --auto-correct.
457
+ Style/MutableConstant:
458
+ Exclude:
459
+ - 'lib/net/ber.rb'
460
+ - 'lib/net/ldap.rb'
461
+ - 'lib/net/ldap/connection.rb'
462
+ - 'lib/net/ldap/dn.rb'
463
+ - 'lib/net/ldap/filter.rb'
464
+ - 'lib/net/ldap/version.rb'
465
+ - 'lib/net/snmp.rb'
466
+ - 'test/support/vm/openldap/Vagrantfile'
467
+ - 'test/test_ldif.rb'
468
+ - 'testserver/ldapserver.rb'
259
469
 
260
470
  # Offense count: 1
261
471
  # Cop supports --auto-correct.
262
472
  Style/NegatedIf:
263
- Enabled: false
473
+ Exclude:
474
+ - 'test/test_helper.rb'
264
475
 
265
476
  # Offense count: 1
266
477
  # Cop supports --auto-correct.
267
478
  Style/NegatedWhile:
268
- Enabled: false
479
+ Exclude:
480
+ - 'lib/net/ldap/filter.rb'
269
481
 
270
482
  # Offense count: 3
483
+ # Cop supports --auto-correct.
271
484
  # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
485
+ # SupportedStyles: skip_modifier_ifs, always
272
486
  Style/Next:
273
- Enabled: false
487
+ Exclude:
488
+ - 'lib/net/ldap/connection.rb'
489
+ - 'testserver/ldapserver.rb'
274
490
 
275
491
  # Offense count: 1
276
492
  # Cop supports --auto-correct.
277
493
  Style/NilComparison:
278
- Enabled: false
494
+ Exclude:
495
+ - 'lib/net/ldap/connection.rb'
279
496
 
280
497
  # Offense count: 1
281
498
  # Cop supports --auto-correct.
282
499
  # Configuration parameters: IncludeSemanticChanges.
283
500
  Style/NonNilCheck:
284
- Enabled: false
501
+ Exclude:
502
+ - 'lib/net/ber/ber_parser.rb'
285
503
 
286
504
  # Offense count: 1
287
505
  # Cop supports --auto-correct.
288
506
  Style/Not:
289
- Enabled: false
507
+ Exclude:
508
+ - 'lib/net/ldap/filter.rb'
290
509
 
291
- # Offense count: 10
510
+ # Offense count: 11
292
511
  # Cop supports --auto-correct.
293
512
  Style/NumericLiterals:
294
513
  MinDigits: 8
295
514
 
515
+ # Offense count: 4
516
+ # Cop supports --auto-correct.
517
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
518
+ # SupportedStyles: predicate, comparison
519
+ Style/NumericPredicate:
520
+ Exclude:
521
+ - 'lib/net/ber/core_ext/integer.rb'
522
+ - 'lib/net/ldap/dn.rb'
523
+ - 'testserver/ldapserver.rb'
524
+
296
525
  # Offense count: 3
297
526
  Style/OpMethod:
298
- Enabled: false
527
+ Exclude:
528
+ - 'lib/net/ldap/filter.rb'
299
529
 
300
530
  # Offense count: 6
301
531
  # Cop supports --auto-correct.
302
532
  # Configuration parameters: AllowSafeAssignment.
303
533
  Style/ParenthesesAroundCondition:
304
- Enabled: false
534
+ Exclude:
535
+ - 'lib/net/ldap.rb'
536
+ - 'lib/net/ldap/auth_adapter/gss_spnego.rb'
537
+ - 'lib/net/ldap/auth_adapter/sasl.rb'
538
+ - 'lib/net/ldap/auth_adapter/simple.rb'
305
539
 
306
540
  # Offense count: 3
307
541
  # Cop supports --auto-correct.
308
542
  # Configuration parameters: PreferredDelimiters.
309
543
  Style/PercentLiteralDelimiters:
310
- Enabled: false
544
+ Exclude:
545
+ - 'net-ldap.gemspec'
546
+ - 'test/test_entry.rb'
311
547
 
312
548
  # Offense count: 11
313
549
  # Cop supports --auto-correct.
314
550
  Style/PerlBackrefs:
315
- Enabled: false
551
+ Exclude:
552
+ - 'lib/net/ldap/dataset.rb'
553
+ - 'lib/net/ldap/filter.rb'
554
+ - 'testserver/ldapserver.rb'
316
555
 
317
- # Offense count: 9
556
+ # Offense count: 10
557
+ # Cop supports --auto-correct.
318
558
  # Configuration parameters: EnforcedStyle, SupportedStyles.
559
+ # SupportedStyles: compact, exploded
319
560
  Style/RaiseArgs:
320
- Enabled: false
561
+ Exclude:
562
+ - 'lib/net/ldap/connection.rb'
563
+ - 'lib/net/ldap/pdu.rb'
564
+ - 'lib/net/snmp.rb'
321
565
 
322
566
  # Offense count: 1
323
567
  # Cop supports --auto-correct.
324
568
  Style/RedundantBegin:
325
- Enabled: false
569
+ Exclude:
570
+ - 'lib/net/snmp.rb'
326
571
 
327
- # Offense count: 3
572
+ # Offense count: 4
573
+ # Cop supports --auto-correct.
574
+ Style/RedundantParentheses:
575
+ Exclude:
576
+ - 'lib/net/ldap/filter.rb'
577
+ - 'test/test_filter.rb'
578
+
579
+ # Offense count: 4
328
580
  # Cop supports --auto-correct.
329
581
  # Configuration parameters: AllowMultipleReturnValues.
330
582
  Style/RedundantReturn:
331
- Enabled: false
583
+ Exclude:
584
+ - 'lib/net/ber/core_ext/string.rb'
585
+ - 'lib/net/ldap/auth_adapter.rb'
586
+ - 'lib/net/ldap/entry.rb'
587
+ - 'lib/net/ldap/password.rb'
332
588
 
333
- # Offense count: 7
589
+ # Offense count: 8
334
590
  # Cop supports --auto-correct.
335
591
  Style/RedundantSelf:
336
- Enabled: false
592
+ Exclude:
593
+ - 'lib/net/ber/core_ext/array.rb'
594
+ - 'lib/net/ber/core_ext/string.rb'
595
+ - 'lib/net/ldap/dn.rb'
596
+ - 'lib/net/ldap/filter.rb'
337
597
 
338
- # Offense count: 1
339
- # Configuration parameters: MaxSlashes.
598
+ # Offense count: 2
599
+ # Cop supports --auto-correct.
600
+ # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
601
+ # SupportedStyles: slashes, percent_r, mixed
340
602
  Style/RegexpLiteral:
341
- Enabled: false
603
+ Exclude:
604
+ - 'lib/net/ldap/filter.rb'
605
+ - 'net-ldap.gemspec'
342
606
 
343
- # Offense count: 2
607
+ # Offense count: 1
608
+ # Cop supports --auto-correct.
344
609
  Style/RescueModifier:
345
- Enabled: false
610
+ Exclude:
611
+ - 'test/ber/core_ext/test_string.rb'
346
612
 
347
- # Offense count: 7
613
+ # Offense count: 8
348
614
  # Cop supports --auto-correct.
349
615
  # Configuration parameters: AllowAsExpressionSeparator.
350
616
  Style/Semicolon:
351
- Enabled: false
352
-
353
- # Offense count: 61
354
- # Cop supports --auto-correct.
355
- # Configuration parameters: EnforcedStyle, SupportedStyles.
356
- Style/SignalException:
357
- Enabled: false
617
+ Exclude:
618
+ - 'lib/net/ldap/dn.rb'
619
+ - 'lib/net/ldap/error.rb'
620
+ - 'testserver/ldapserver.rb'
358
621
 
359
622
  # Offense count: 2
360
623
  # Configuration parameters: Methods.
624
+ # Methods: {"reduce"=>["a", "e"]}, {"inject"=>["a", "e"]}
361
625
  Style/SingleLineBlockParams:
362
- Enabled: false
363
-
364
- # Offense count: 2
365
- # Cop supports --auto-correct.
366
- Style/SingleSpaceBeforeFirstArg:
367
- Enabled: false
626
+ Exclude:
627
+ - 'lib/net/ldap/filter.rb'
368
628
 
369
- # Offense count: 24
370
- # Cop supports --auto-correct.
371
- Style/SpaceAfterComma:
372
- Enabled: false
373
-
374
- # Offense count: 2
629
+ # Offense count: 5
375
630
  # Cop supports --auto-correct.
376
631
  # Configuration parameters: EnforcedStyle, SupportedStyles.
632
+ # SupportedStyles: space, no_space
377
633
  Style/SpaceAroundEqualsInParameterDefault:
378
- Enabled: false
634
+ Exclude:
635
+ - 'lib/net/ldap/connection.rb'
636
+ - 'lib/net/snmp.rb'
379
637
 
380
- # Offense count: 8
638
+ # Offense count: 4
381
639
  # Cop supports --auto-correct.
382
- Style/SpaceAroundOperators:
383
- Enabled: false
640
+ Style/SpaceAroundKeyword:
641
+ Exclude:
642
+ - 'lib/net/ldap/entry.rb'
643
+ - 'lib/net/snmp.rb'
384
644
 
385
- # Offense count: 2
645
+ # Offense count: 9
386
646
  # Cop supports --auto-correct.
387
- # Configuration parameters: EnforcedStyle, SupportedStyles.
388
- Style/SpaceBeforeBlockBraces:
389
- Enabled: false
647
+ # Configuration parameters: AllowForAlignment.
648
+ Style/SpaceAroundOperators:
649
+ Exclude:
650
+ - 'lib/net/ber/ber_parser.rb'
651
+ - 'lib/net/ldap/connection.rb'
652
+ - 'lib/net/ldap/entry.rb'
653
+ - 'lib/net/ldap/filter.rb'
654
+ - 'test/test_entry.rb'
655
+ - 'test/test_ldap_connection.rb'
390
656
 
391
- # Offense count: 18
657
+ # Offense count: 5
392
658
  # Cop supports --auto-correct.
393
659
  # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
660
+ # SupportedStyles: space, no_space
394
661
  Style/SpaceInsideBlockBraces:
395
- Enabled: false
396
-
397
- # Offense count: 37
398
- # Cop supports --auto-correct.
399
- Style/SpaceInsideBrackets:
400
- Enabled: false
662
+ Exclude:
663
+ - 'lib/net/ldap/dataset.rb'
664
+ - 'test/test_snmp.rb'
665
+ - 'testserver/ldapserver.rb'
401
666
 
402
- # Offense count: 1
667
+ # Offense count: 13
403
668
  # Cop supports --auto-correct.
404
669
  # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
670
+ # SupportedStyles: space, no_space, compact
405
671
  Style/SpaceInsideHashLiteralBraces:
406
- Enabled: false
672
+ Exclude:
673
+ - 'lib/net/ldap/dataset.rb'
674
+ - 'test/test_ldap.rb'
407
675
 
408
676
  # Offense count: 20
409
677
  # Cop supports --auto-correct.
410
678
  Style/SpaceInsideParens:
411
- Enabled: false
679
+ Exclude:
680
+ - 'lib/net/ldap/entry.rb'
681
+ - 'lib/net/snmp.rb'
682
+ - 'test/test_password.rb'
683
+ - 'testserver/ldapserver.rb'
412
684
 
413
685
  # Offense count: 5
414
686
  # Cop supports --auto-correct.
687
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
688
+ # SupportedStyles: use_perl_names, use_english_names
415
689
  Style/SpecialGlobalVars:
416
- Enabled: false
690
+ Exclude:
691
+ - 'lib/net/snmp.rb'
692
+ - 'net-ldap.gemspec'
693
+ - 'testserver/ldapserver.rb'
417
694
 
418
- # Offense count: 645
695
+ # Offense count: 679
419
696
  # Cop supports --auto-correct.
420
- # Configuration parameters: EnforcedStyle, SupportedStyles.
697
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
698
+ # SupportedStyles: single_quotes, double_quotes
421
699
  Style/StringLiterals:
422
700
  Enabled: false
423
701
 
424
- # Offense count: 10
425
- # Cop supports --auto-correct.
426
- # Configuration parameters: IgnoredMethods.
427
- Style/SymbolProc:
428
- Enabled: false
429
-
430
702
  # Offense count: 1
431
- # Cop supports --auto-correct.
432
- # Configuration parameters: EnforcedStyle, SupportedStyles.
433
- Style/TrailingBlankLines:
434
- Enabled: false
703
+ Style/StructInheritance:
704
+ Exclude:
705
+ - 'test/test_ldap.rb'
435
706
 
436
- # Offense count: 9
707
+ # Offense count: 4
437
708
  # Cop supports --auto-correct.
438
- # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
439
- Style/TrailingComma:
440
- Enabled: false
709
+ # Configuration parameters: EnforcedStyle, SupportedStyles, AllowSafeAssignment.
710
+ # SupportedStyles: require_parentheses, require_no_parentheses
711
+ Style/TernaryParentheses:
712
+ Exclude:
713
+ - 'lib/net/ber/core_ext/integer.rb'
714
+ - 'lib/net/ldap/connection.rb'
715
+ - 'lib/net/ldap/dataset.rb'
441
716
 
442
717
  # Offense count: 1
443
718
  # Cop supports --auto-correct.
444
- # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
719
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
720
+ # Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
445
721
  Style/TrivialAccessors:
446
- Enabled: false
722
+ Exclude:
723
+ - 'lib/net/ldap/connection.rb'
447
724
 
448
725
  # Offense count: 5
449
726
  # Cop supports --auto-correct.
450
727
  Style/UnneededPercentQ:
451
- Enabled: false
728
+ Exclude:
729
+ - 'net-ldap.gemspec'
730
+ - 'test/test_entry.rb'
452
731
 
453
732
  # Offense count: 1
733
+ # Cop supports --auto-correct.
454
734
  # Configuration parameters: MaxLineLength.
455
735
  Style/WhileUntilModifier:
456
- Enabled: false
736
+ Exclude:
737
+ - 'lib/net/ldap/filter.rb'
457
738
 
458
739
  # Offense count: 1
459
740
  # Cop supports --auto-correct.
460
- # Configuration parameters: WordRegex.
741
+ # Configuration parameters: SupportedStyles, WordRegex.
742
+ # SupportedStyles: percent, brackets
461
743
  Style/WordArray:
462
- MinSize: 2
744
+ EnforcedStyle: percent
745
+ MinSize: 3
746
+
747
+ # Offense count: 6
748
+ # Cop supports --auto-correct.
749
+ Style/ZeroLengthPredicate:
750
+ Exclude:
751
+ - 'lib/net/ldap/connection.rb'
752
+ - 'lib/net/ldap/filter.rb'
753
+ - 'testserver/ldapserver.rb'