rubinius-net-ldap 0.11

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 (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/.rubocop.yml +5 -0
  4. data/.rubocop_todo.yml +462 -0
  5. data/.travis.yml +19 -0
  6. data/CONTRIBUTING.md +54 -0
  7. data/Contributors.rdoc +24 -0
  8. data/Gemfile +2 -0
  9. data/Hacking.rdoc +63 -0
  10. data/History.rdoc +260 -0
  11. data/License.rdoc +29 -0
  12. data/README.rdoc +65 -0
  13. data/Rakefile +17 -0
  14. data/lib/net-ldap.rb +2 -0
  15. data/lib/net/ber.rb +320 -0
  16. data/lib/net/ber/ber_parser.rb +182 -0
  17. data/lib/net/ber/core_ext.rb +55 -0
  18. data/lib/net/ber/core_ext/array.rb +96 -0
  19. data/lib/net/ber/core_ext/false_class.rb +10 -0
  20. data/lib/net/ber/core_ext/integer.rb +74 -0
  21. data/lib/net/ber/core_ext/string.rb +66 -0
  22. data/lib/net/ber/core_ext/true_class.rb +11 -0
  23. data/lib/net/ldap.rb +1229 -0
  24. data/lib/net/ldap/connection.rb +702 -0
  25. data/lib/net/ldap/dataset.rb +168 -0
  26. data/lib/net/ldap/dn.rb +225 -0
  27. data/lib/net/ldap/entry.rb +193 -0
  28. data/lib/net/ldap/error.rb +38 -0
  29. data/lib/net/ldap/filter.rb +778 -0
  30. data/lib/net/ldap/instrumentation.rb +23 -0
  31. data/lib/net/ldap/password.rb +38 -0
  32. data/lib/net/ldap/pdu.rb +297 -0
  33. data/lib/net/ldap/version.rb +5 -0
  34. data/lib/net/snmp.rb +264 -0
  35. data/rubinius-net-ldap.gemspec +37 -0
  36. data/script/install-openldap +112 -0
  37. data/script/package +7 -0
  38. data/script/release +16 -0
  39. data/test/ber/core_ext/test_array.rb +22 -0
  40. data/test/ber/core_ext/test_string.rb +25 -0
  41. data/test/ber/test_ber.rb +99 -0
  42. data/test/fixtures/cacert.pem +20 -0
  43. data/test/fixtures/openldap/memberof.ldif +33 -0
  44. data/test/fixtures/openldap/retcode.ldif +76 -0
  45. data/test/fixtures/openldap/slapd.conf.ldif +67 -0
  46. data/test/fixtures/seed.ldif +374 -0
  47. data/test/integration/test_add.rb +28 -0
  48. data/test/integration/test_ber.rb +30 -0
  49. data/test/integration/test_bind.rb +34 -0
  50. data/test/integration/test_delete.rb +31 -0
  51. data/test/integration/test_open.rb +88 -0
  52. data/test/integration/test_return_codes.rb +38 -0
  53. data/test/integration/test_search.rb +77 -0
  54. data/test/support/vm/openldap/.gitignore +1 -0
  55. data/test/support/vm/openldap/README.md +32 -0
  56. data/test/support/vm/openldap/Vagrantfile +33 -0
  57. data/test/test_dn.rb +44 -0
  58. data/test/test_entry.rb +65 -0
  59. data/test/test_filter.rb +223 -0
  60. data/test/test_filter_parser.rb +20 -0
  61. data/test/test_helper.rb +66 -0
  62. data/test/test_ldap.rb +60 -0
  63. data/test/test_ldap_connection.rb +404 -0
  64. data/test/test_ldif.rb +104 -0
  65. data/test/test_password.rb +10 -0
  66. data/test/test_rename.rb +77 -0
  67. data/test/test_search.rb +39 -0
  68. data/test/test_snmp.rb +119 -0
  69. data/test/test_ssl_ber.rb +40 -0
  70. data/test/testdata.ldif +101 -0
  71. data/testserver/ldapserver.rb +210 -0
  72. data/testserver/testdata.ldif +101 -0
  73. metadata +204 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA512:
3
+ metadata.gz: fc0bbc7146ca583c298cfcf307e59edbb4a777eb6e84be4f305ed502b5203037e0b2e7755ca000937b0992a319860b2b0f3d8a2f85970a0943b35e91f0d8e818
4
+ data.tar.gz: 5367129fd532b6f5ab314b922ebf78816ef0acfc6760db3adf9e25ecd425efcf68dbd30a6c048fe9a5502ed1a56ae04a1385259956091d675092a85c2855dffd
5
+ SHA1:
6
+ metadata.gz: ef920e0e5e4d2489b6c66ae8d3df712201620568
7
+ data.tar.gz: dc81cadbacca3da8cbf9a45d511cda443f4cf1e2
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ *~
2
+ *.swp
3
+ .rvmrc
4
+ .rbx
5
+ pkg/
6
+ doc/
7
+ publish/
8
+ Gemfile.lock
9
+ .bundle
10
+ bin/
data/.rubocop.yml ADDED
@@ -0,0 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - 'pkg/**/*'
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,462 @@
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.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 12
9
+ # Configuration parameters: AllowSafeAssignment.
10
+ Lint/AssignmentInCondition:
11
+ Enabled: false
12
+
13
+ # Offense count: 1
14
+ # Configuration parameters: AlignWith, SupportedStyles.
15
+ Lint/EndAlignment:
16
+ Enabled: false
17
+
18
+ # Offense count: 1
19
+ Lint/RescueException:
20
+ Enabled: false
21
+
22
+ # Offense count: 1
23
+ Lint/ShadowingOuterLocalVariable:
24
+ Enabled: false
25
+
26
+ # Offense count: 9
27
+ # Cop supports --auto-correct.
28
+ Lint/UnusedBlockArgument:
29
+ Enabled: false
30
+
31
+ # Offense count: 3
32
+ # Cop supports --auto-correct.
33
+ Lint/UnusedMethodArgument:
34
+ Enabled: false
35
+
36
+ # Offense count: 7
37
+ Lint/UselessAssignment:
38
+ Enabled: false
39
+
40
+ # Offense count: 47
41
+ Metrics/AbcSize:
42
+ Max: 114
43
+
44
+ # Offense count: 11
45
+ Metrics/BlockNesting:
46
+ Max: 4
47
+
48
+ # Offense count: 9
49
+ # Configuration parameters: CountComments.
50
+ Metrics/ClassLength:
51
+ Max: 470
52
+
53
+ # Offense count: 20
54
+ Metrics/CyclomaticComplexity:
55
+ Max: 41
56
+
57
+ # Offense count: 193
58
+ # Configuration parameters: AllowURI, URISchemes.
59
+ Metrics/LineLength:
60
+ Max: 360
61
+
62
+ # Offense count: 71
63
+ # Configuration parameters: CountComments.
64
+ Metrics/MethodLength:
65
+ Max: 130
66
+
67
+ # Offense count: 13
68
+ Metrics/PerceivedComplexity:
69
+ Max: 36
70
+
71
+ # Offense count: 1
72
+ Style/AccessorMethodName:
73
+ Enabled: false
74
+
75
+ # Offense count: 4
76
+ # Cop supports --auto-correct.
77
+ Style/AlignArray:
78
+ Enabled: false
79
+
80
+ # Offense count: 3
81
+ # Cop supports --auto-correct.
82
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
83
+ Style/AlignParameters:
84
+ Enabled: false
85
+
86
+ # Offense count: 36
87
+ # Cop supports --auto-correct.
88
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
89
+ Style/AndOr:
90
+ Enabled: false
91
+
92
+ # Offense count: 1
93
+ # Cop supports --auto-correct.
94
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
95
+ Style/BarePercentLiterals:
96
+ Enabled: false
97
+
98
+ # Offense count: 1
99
+ # Cop supports --auto-correct.
100
+ Style/BlockComments:
101
+ Enabled: false
102
+
103
+ # Offense count: 20
104
+ # Cop supports --auto-correct.
105
+ Style/Blocks:
106
+ Enabled: false
107
+
108
+ # Offense count: 2
109
+ # Cop supports --auto-correct.
110
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
111
+ Style/BracesAroundHashParameters:
112
+ Enabled: false
113
+
114
+ # Offense count: 4
115
+ # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
116
+ Style/CaseIndentation:
117
+ Enabled: false
118
+
119
+ # Offense count: 4
120
+ # Cop supports --auto-correct.
121
+ Style/CharacterLiteral:
122
+ Enabled: false
123
+
124
+ # Offense count: 22
125
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
126
+ Style/ClassAndModuleChildren:
127
+ Enabled: false
128
+
129
+ # Offense count: 1
130
+ # Cop supports --auto-correct.
131
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
132
+ Style/ClassCheck:
133
+ Enabled: false
134
+
135
+ # Offense count: 13
136
+ # Cop supports --auto-correct.
137
+ Style/ColonMethodCall:
138
+ Enabled: false
139
+
140
+ # Offense count: 2
141
+ # Configuration parameters: Keywords.
142
+ Style/CommentAnnotation:
143
+ Enabled: false
144
+
145
+ # Offense count: 86
146
+ Style/ConstantName:
147
+ Enabled: false
148
+
149
+ # Offense count: 18
150
+ # Cop supports --auto-correct.
151
+ Style/DeprecatedHashMethods:
152
+ Enabled: false
153
+
154
+ # Offense count: 46
155
+ Style/Documentation:
156
+ Enabled: false
157
+
158
+ # Offense count: 23
159
+ # Cop supports --auto-correct.
160
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
161
+ Style/DotPosition:
162
+ Enabled: false
163
+
164
+ # Offense count: 1
165
+ # Cop supports --auto-correct.
166
+ Style/ElseAlignment:
167
+ Enabled: false
168
+
169
+ # Offense count: 4
170
+ # Cop supports --auto-correct.
171
+ # Configuration parameters: AllowAdjacentOneLineDefs.
172
+ Style/EmptyLineBetweenDefs:
173
+ Enabled: false
174
+
175
+ # Offense count: 9
176
+ # Cop supports --auto-correct.
177
+ Style/EmptyLines:
178
+ Enabled: false
179
+
180
+ # Offense count: 1
181
+ # Cop supports --auto-correct.
182
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
183
+ Style/EmptyLinesAroundClassBody:
184
+ Enabled: false
185
+
186
+ # Offense count: 2
187
+ # Cop supports --auto-correct.
188
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
189
+ Style/EmptyLinesAroundModuleBody:
190
+ Enabled: false
191
+
192
+ # Offense count: 3
193
+ Style/EvenOdd:
194
+ Enabled: false
195
+
196
+ # Offense count: 1
197
+ # Configuration parameters: Exclude.
198
+ Style/FileName:
199
+ Enabled: false
200
+
201
+ # Offense count: 9
202
+ # Configuration parameters: AllowedVariables.
203
+ Style/GlobalVars:
204
+ Enabled: false
205
+
206
+ # Offense count: 3
207
+ # Configuration parameters: MinBodyLength.
208
+ Style/GuardClause:
209
+ Enabled: false
210
+
211
+ # Offense count: 150
212
+ # Cop supports --auto-correct.
213
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
214
+ Style/HashSyntax:
215
+ Enabled: false
216
+
217
+ # Offense count: 8
218
+ # Configuration parameters: MaxLineLength.
219
+ Style/IfUnlessModifier:
220
+ Enabled: false
221
+
222
+ # Offense count: 2
223
+ # Cop supports --auto-correct.
224
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
225
+ Style/IndentHash:
226
+ Enabled: false
227
+
228
+ # Offense count: 6
229
+ # Cop supports --auto-correct.
230
+ # Configuration parameters: Width.
231
+ Style/IndentationWidth:
232
+ Enabled: false
233
+
234
+ # Offense count: 2
235
+ # Cop supports --auto-correct.
236
+ Style/LeadingCommentSpace:
237
+ Enabled: false
238
+
239
+ # Offense count: 21
240
+ # Cop supports --auto-correct.
241
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
242
+ Style/MethodDefParentheses:
243
+ Enabled: false
244
+
245
+ # Offense count: 1
246
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
247
+ Style/MethodName:
248
+ Enabled: false
249
+
250
+ # Offense count: 5
251
+ # Cop supports --auto-correct.
252
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
253
+ Style/MultilineOperationIndentation:
254
+ Enabled: false
255
+
256
+ # Offense count: 1
257
+ Style/MultilineTernaryOperator:
258
+ Enabled: false
259
+
260
+ # Offense count: 1
261
+ # Cop supports --auto-correct.
262
+ Style/NegatedIf:
263
+ Enabled: false
264
+
265
+ # Offense count: 1
266
+ # Cop supports --auto-correct.
267
+ Style/NegatedWhile:
268
+ Enabled: false
269
+
270
+ # Offense count: 3
271
+ # Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
272
+ Style/Next:
273
+ Enabled: false
274
+
275
+ # Offense count: 1
276
+ # Cop supports --auto-correct.
277
+ Style/NilComparison:
278
+ Enabled: false
279
+
280
+ # Offense count: 1
281
+ # Cop supports --auto-correct.
282
+ # Configuration parameters: IncludeSemanticChanges.
283
+ Style/NonNilCheck:
284
+ Enabled: false
285
+
286
+ # Offense count: 1
287
+ # Cop supports --auto-correct.
288
+ Style/Not:
289
+ Enabled: false
290
+
291
+ # Offense count: 10
292
+ # Cop supports --auto-correct.
293
+ Style/NumericLiterals:
294
+ MinDigits: 8
295
+
296
+ # Offense count: 3
297
+ Style/OpMethod:
298
+ Enabled: false
299
+
300
+ # Offense count: 6
301
+ # Cop supports --auto-correct.
302
+ # Configuration parameters: AllowSafeAssignment.
303
+ Style/ParenthesesAroundCondition:
304
+ Enabled: false
305
+
306
+ # Offense count: 3
307
+ # Cop supports --auto-correct.
308
+ # Configuration parameters: PreferredDelimiters.
309
+ Style/PercentLiteralDelimiters:
310
+ Enabled: false
311
+
312
+ # Offense count: 11
313
+ # Cop supports --auto-correct.
314
+ Style/PerlBackrefs:
315
+ Enabled: false
316
+
317
+ # Offense count: 9
318
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
319
+ Style/RaiseArgs:
320
+ Enabled: false
321
+
322
+ # Offense count: 1
323
+ # Cop supports --auto-correct.
324
+ Style/RedundantBegin:
325
+ Enabled: false
326
+
327
+ # Offense count: 3
328
+ # Cop supports --auto-correct.
329
+ # Configuration parameters: AllowMultipleReturnValues.
330
+ Style/RedundantReturn:
331
+ Enabled: false
332
+
333
+ # Offense count: 7
334
+ # Cop supports --auto-correct.
335
+ Style/RedundantSelf:
336
+ Enabled: false
337
+
338
+ # Offense count: 1
339
+ # Configuration parameters: MaxSlashes.
340
+ Style/RegexpLiteral:
341
+ Enabled: false
342
+
343
+ # Offense count: 2
344
+ Style/RescueModifier:
345
+ Enabled: false
346
+
347
+ # Offense count: 7
348
+ # Cop supports --auto-correct.
349
+ # Configuration parameters: AllowAsExpressionSeparator.
350
+ 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
358
+
359
+ # Offense count: 2
360
+ # Configuration parameters: Methods.
361
+ Style/SingleLineBlockParams:
362
+ Enabled: false
363
+
364
+ # Offense count: 2
365
+ # Cop supports --auto-correct.
366
+ Style/SingleSpaceBeforeFirstArg:
367
+ Enabled: false
368
+
369
+ # Offense count: 24
370
+ # Cop supports --auto-correct.
371
+ Style/SpaceAfterComma:
372
+ Enabled: false
373
+
374
+ # Offense count: 2
375
+ # Cop supports --auto-correct.
376
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
377
+ Style/SpaceAroundEqualsInParameterDefault:
378
+ Enabled: false
379
+
380
+ # Offense count: 8
381
+ # Cop supports --auto-correct.
382
+ Style/SpaceAroundOperators:
383
+ Enabled: false
384
+
385
+ # Offense count: 2
386
+ # Cop supports --auto-correct.
387
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
388
+ Style/SpaceBeforeBlockBraces:
389
+ Enabled: false
390
+
391
+ # Offense count: 18
392
+ # Cop supports --auto-correct.
393
+ # Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
394
+ Style/SpaceInsideBlockBraces:
395
+ Enabled: false
396
+
397
+ # Offense count: 37
398
+ # Cop supports --auto-correct.
399
+ Style/SpaceInsideBrackets:
400
+ Enabled: false
401
+
402
+ # Offense count: 1
403
+ # Cop supports --auto-correct.
404
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
405
+ Style/SpaceInsideHashLiteralBraces:
406
+ Enabled: false
407
+
408
+ # Offense count: 20
409
+ # Cop supports --auto-correct.
410
+ Style/SpaceInsideParens:
411
+ Enabled: false
412
+
413
+ # Offense count: 5
414
+ # Cop supports --auto-correct.
415
+ Style/SpecialGlobalVars:
416
+ Enabled: false
417
+
418
+ # Offense count: 645
419
+ # Cop supports --auto-correct.
420
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
421
+ Style/StringLiterals:
422
+ Enabled: false
423
+
424
+ # Offense count: 10
425
+ # Cop supports --auto-correct.
426
+ # Configuration parameters: IgnoredMethods.
427
+ Style/SymbolProc:
428
+ Enabled: false
429
+
430
+ # Offense count: 1
431
+ # Cop supports --auto-correct.
432
+ # Configuration parameters: EnforcedStyle, SupportedStyles.
433
+ Style/TrailingBlankLines:
434
+ Enabled: false
435
+
436
+ # Offense count: 9
437
+ # Cop supports --auto-correct.
438
+ # Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
439
+ Style/TrailingComma:
440
+ Enabled: false
441
+
442
+ # Offense count: 1
443
+ # Cop supports --auto-correct.
444
+ # Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
445
+ Style/TrivialAccessors:
446
+ Enabled: false
447
+
448
+ # Offense count: 5
449
+ # Cop supports --auto-correct.
450
+ Style/UnneededPercentQ:
451
+ Enabled: false
452
+
453
+ # Offense count: 1
454
+ # Configuration parameters: MaxLineLength.
455
+ Style/WhileUntilModifier:
456
+ Enabled: false
457
+
458
+ # Offense count: 1
459
+ # Cop supports --auto-correct.
460
+ # Configuration parameters: WordRegex.
461
+ Style/WordArray:
462
+ MinSize: 2