activeldap 1.2.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Gemfile +18 -0
  2. data/LICENSE +2 -1
  3. data/README.textile +137 -0
  4. data/doc/text/development.textile +50 -0
  5. data/{CHANGES → doc/text/news.textile} +256 -237
  6. data/doc/text/rails.textile +144 -0
  7. data/doc/text/tutorial.textile +1005 -0
  8. data/lib/active_ldap/adapter/base.rb +5 -3
  9. data/lib/active_ldap/adapter/net_ldap_ext.rb +1 -1
  10. data/lib/active_ldap/associations.rb +6 -2
  11. data/lib/active_ldap/base.rb +16 -71
  12. data/lib/active_ldap/callbacks.rb +52 -33
  13. data/lib/active_ldap/configuration.rb +2 -2
  14. data/lib/active_ldap/get_text/parser.rb +2 -2
  15. data/lib/active_ldap/human_readable.rb +5 -4
  16. data/lib/active_ldap/log_subscriber.rb +50 -0
  17. data/lib/active_ldap/persistence.rb +65 -0
  18. data/lib/active_ldap/railtie.rb +40 -0
  19. data/lib/active_ldap/railties/controller_runtime.rb +48 -0
  20. data/lib/active_ldap/user_password.rb +1 -0
  21. data/lib/active_ldap/validations.rb +34 -72
  22. data/lib/active_ldap.rb +13 -912
  23. data/{rails_generators/model_active_ldap → lib/rails/generators/active_ldap/model}/USAGE +2 -1
  24. data/lib/rails/generators/active_ldap/model/model_generator.rb +47 -0
  25. data/{rails_generators/model_active_ldap → lib/rails/generators/active_ldap/model}/templates/model_active_ldap.rb +0 -0
  26. data/lib/rails/generators/active_ldap/scaffold/scaffold_generator.rb +14 -0
  27. data/{rails_generators/scaffold_active_ldap → lib/rails/generators/active_ldap/scaffold}/templates/ldap.yml +1 -0
  28. data/test/test_base.rb +9 -0
  29. data/test/test_callback.rb +2 -6
  30. data/test/test_connection.rb +2 -2
  31. data/test/test_user.rb +2 -2
  32. data/test/test_validation.rb +11 -11
  33. metadata +165 -106
  34. data/README +0 -155
  35. data/Rakefile +0 -133
  36. data/rails/README +0 -54
  37. data/rails/init.rb +0 -33
  38. data/rails_generators/model_active_ldap/model_active_ldap_generator.rb +0 -69
  39. data/rails_generators/model_active_ldap/templates/unit_test.rb +0 -8
  40. data/rails_generators/scaffold_active_ldap/scaffold_active_ldap_generator.rb +0 -7
  41. data/test/al-test-utils.rb +0 -439
  42. data/test/command.rb +0 -112
  43. data/test/config.yaml.sample +0 -6
  44. data/test/fixtures/lower_case_object_class_schema.rb +0 -802
  45. data/test/run-test.rb +0 -44
@@ -1,12 +1,19 @@
1
- = CHANGES
1
+ h1. News
2
2
 
3
- == 1.2.4: 2011-05-13
3
+ h2(#3-1-0). 3.1.0: 2011-07-09
4
+
5
+ * Supported Rails 3.1.0.rc4.
6
+ [Ryan Tandy, Narihiro Nakamura, Hidetoshi Yoshimoto]
7
+ * Removed ActiveRecord dependency and added ActiveModel dependency.
8
+ * Used YARD instead of RDoc as documentation sysytem.
9
+
10
+ h2. 1.2.4: 2011-05-13
4
11
 
5
12
  * Splited AL-Admin into other repository: https://github.com/activeldap/al-admin
6
13
  * [GitHub:#2] Fixed "path po cound not be found" error by fast_gettext.
7
14
  [rbq]
8
15
 
9
- == 1.2.3: 2011-04-30
16
+ h2. 1.2.3: 2011-04-30
10
17
 
11
18
  * [#40] Ignored nil value attribute.
12
19
  [christian.pennafort]
@@ -21,7 +28,7 @@
21
28
  * Fixed wrong assertion in test.
22
29
  [Ryan Tandy]
23
30
 
24
- === Thanks
31
+ h3. Thanks
25
32
 
26
33
  * christian.pennafort
27
34
  * planetmcd
@@ -30,7 +37,7 @@
30
37
  * Kris Wehner
31
38
  * Ryan Tandy
32
39
 
33
- == 1.2.2: 2010-07-04
40
+ h2. 1.2.2: 2010-07-04
34
41
 
35
42
  * Supported ActiveRecord 2.3.8 and Rails 2.3.8.
36
43
  * [#37] Fixed gem dependencies in Rakefile. [zachwily]
@@ -47,7 +54,7 @@
47
54
  * Supported DN attribute value for assosiation replacement.
48
55
  [Jörg Herzinger]
49
56
 
50
- == 1.2.1: 2009-12-15
57
+ h2. 1.2.1: 2009-12-15
51
58
 
52
59
  * Supported ActiveRecord 2.3.5 and Rails 2.3.5.
53
60
  * Supported GetText 2.1.0 and Locale 2.0.5.
@@ -58,7 +65,7 @@
58
65
  * [#35] fix has_many association is broken. [culturespy]
59
66
  * Supported nested attribute options. [Hideyuki Yasuda]
60
67
 
61
- == 1.2.0: 2009-09-22
68
+ h2. 1.2.0: 2009-09-22
62
69
 
63
70
  * Supported ActiveRecord 2.3.4 and Rails 2.3.4.
64
71
  * [IMCOMPATIBLE]
@@ -73,60 +80,60 @@
73
80
  * Supported renaming an entry. Renaming other DTI is only supported by
74
81
  JNDI backend.
75
82
 
76
- == 1.1.0: 2009-07-18
83
+ h2. 1.1.0: 2009-07-18
77
84
 
78
85
  * Improved tutorial. [Kazuaki Takase]
79
86
  * Improvements:
80
- * API:
81
- * [#26] Supported to_xml for associations. [achemze]
82
- * ActiveLdap::Base.delete_all(filter=nil, options={}) ->
83
- ActiveLdap::Base.delete_all(filter_or_options={}).
84
- Sure, old method signature is also still supported.
85
- * belongs_to(:many) with :foreign_key is deprecated.
86
- Use :primary_key instead of :foreign_key. [Kazuaki Takase]
87
- * Means of has_many's :primary_key and :foreign_key are inverted.
88
- [Kazuaki Takase]
89
- * [experimental] Added ldap_field ActionView helper to
90
- generate form fileds for a LDAP entry.
91
- * Suppressed needless attributes updating.
87
+ ** API:
88
+ *** [#26] Supported to_xml for associations. [achemze]
89
+ *** ActiveLdap::Base.delete_all(filter=nil, options={}) ->
90
+ ActiveLdap::Base.delete_all(filter_or_options={}).
91
+ Sure, old method signature is also still supported.
92
+ *** belongs_to(:many) with :foreign_key is deprecated.
93
+ Use :primary_key instead of :foreign_key. [Kazuaki Takase]
94
+ *** Means of has_many's :primary_key and :foreign_key are inverted.
95
+ [Kazuaki Takase]
96
+ *** [experimental] Added ldap_field ActionView helper to
97
+ generate form fileds for a LDAP entry.
98
+ ** Suppressed needless attributes updating.
92
99
  * Dependencies:
93
- * Re-supported GetText.
94
- * ActiveRecord 2.3.2 is only supported.
100
+ ** Re-supported GetText.
101
+ ** ActiveRecord 2.3.2 is only supported.
95
102
 
96
- == 1.0.9
103
+ h2. 1.0.9
97
104
 
98
105
  * Added documents in Japanese. [Kazuaki Takase]
99
106
  * Supported Ruby 1.9.1.
100
- * [#20] [Ruby 1.9 Support] :: Running Tests [Alexey.Chebotar]
107
+ ** [#20] [Ruby 1.9 Support] :: Running Tests [Alexey.Chebotar]
101
108
  * Supported Rails 2.3.2.
102
- * [#18] [Rails 2.3 Support] :: Running WEBrick Hangs [Alexey.Chebotar]
109
+ ** [#18] [Rails 2.3 Support] :: Running WEBrick Hangs [Alexey.Chebotar]
103
110
  * Bug fixes:
104
- * Fixed blank values detection. [David Morton]
105
- * [#22] Ruby 1.8.6 p287 :: Undefined methods [Alexey.Chebotar]
106
- * Fixed gem loading. [Tiago Fernandes]
107
- * Fixed DN change via #base=. [David Morton]
108
- * Fixed infinite retry on timeout.
109
- * Fixed needless reconnection.
111
+ ** Fixed blank values detection. [David Morton]
112
+ ** [#22] Ruby 1.8.6 p287 :: Undefined methods [Alexey.Chebotar]
113
+ ** Fixed gem loading. [Tiago Fernandes]
114
+ ** Fixed DN change via #base=. [David Morton]
115
+ ** Fixed infinite retry on timeout.
116
+ ** Fixed needless reconnection.
110
117
  * API improvements:
111
- * Removed needless instance methods: #prefix=,
112
- #dn_attribute=, #sort_by=, #order=, #required_classes=,
113
- #recommended_classes= and #excluded_classes. [David Morton]
114
- * Removed obsolete scafoold_al generator.
115
- * Reduced default :retry_limit.
116
- * Supported association as parameter. [Joe Francis]
117
- * Normalized schema attribute name. [Tim Hermans]
118
- * Suppressed AuthenticationError -> ConnectionError
119
- conversion on reconnection. [Kazuaki Takase]
120
- * Added ActiveLdap::Schema#dump.
121
- * ActiveLdap::Base.establish_connection ->
122
- ActiveLdap::Base.setup_connection.
123
- * Supported ActiveLdap::Base.find(:last).
124
- * Added convenient methods:
125
- * ActiveLdap::Base.first
126
- * ActiveLdap::Base.last
127
- * ActiveLdap::Base.all
128
-
129
- == 1.0.2
118
+ ** Removed needless instance methods: #prefix=,
119
+ #dn_attribute=, #sort_by=, #order=, #required_classes=,
120
+ #recommended_classes= and #excluded_classes. [David Morton]
121
+ ** Removed obsolete scafoold_al generator.
122
+ ** Reduced default :retry_limit.
123
+ ** Supported association as parameter. [Joe Francis]
124
+ ** Normalized schema attribute name. [Tim Hermans]
125
+ ** Suppressed AuthenticationError -> ConnectionError
126
+ conversion on reconnection. [Kazuaki Takase]
127
+ ** Added ActiveLdap::Schema#dump.
128
+ ** ActiveLdap::Base.establish_connection ->
129
+ ActiveLdap::Base.setup_connection.
130
+ ** Supported ActiveLdap::Base.find(:last).
131
+ ** Added convenient methods:
132
+ *** ActiveLdap::Base.first
133
+ *** ActiveLdap::Base.last
134
+ *** ActiveLdap::Base.all
135
+
136
+ h2. 1.0.2
130
137
 
131
138
  * Removed Base64 module use.
132
139
  * Improved LDIF parser.
@@ -142,26 +149,26 @@
142
149
  * Accepted :class_name for belong_to and has_many option.
143
150
  * Improved default port guess.
144
151
  * Bug fixes:
145
- * [#4] ModifyRecord#load doesn't operate atomic. [gwarf12]
146
- * [#5] to_xml supports :except option. [baptiste.grenier]
147
- * [#6] to_xml uses ActiveResource format. [baptiste.grenier]
148
- * Out of ranged GeneralizedTime uses Time.at(0) as fallback value.
149
- [Richard Nicholas]
150
- * ActiveLdap::Base#to_s uses #to_ldif. [Kazuhiro NISHIYAMA]
151
- * Fixed excess prefix extraction. [Grzegorz Marszałek]
152
- * Skiped read only attribute validation. [しまさわらさん]
153
- * Treated "" as empty value. [Ted Lepich]
154
- * [#9][#16] Reduced raising when DN value is invalid.
155
- [danger1986][Alexey.Chebotar]
156
- * [#10][#12] Fixed needless ',' is appeared. [michael.j.konopka]
157
- * [#11] Required missing 'active_ldap/user_password'. [michael.j.konopka]
158
- * [#13] Returned entries if has_many :wrap has nonexistent entry.
159
- [ingersoll]
160
- * [#15] Fixed type error on computing DN. [ery.lee]
161
- * ">=" filter operator doesn't work. [id:dicdak]
162
- * [#17] ActiveLdap::Base.create doesn't raise exception. [Alexey.Chebotar]
163
-
164
- == 1.0.1
152
+ ** [#4] ModifyRecord#load doesn't operate atomic. [gwarf12]
153
+ ** [#5] to_xml supports :except option. [baptiste.grenier]
154
+ ** [#6] to_xml uses ActiveResource format. [baptiste.grenier]
155
+ ** Out of ranged GeneralizedTime uses Time.at(0) as fallback value.
156
+ [Richard Nicholas]
157
+ ** ActiveLdap::Base#to_s uses #to_ldif. [Kazuhiro NISHIYAMA]
158
+ ** Fixed excess prefix extraction. [Grzegorz Marszałek]
159
+ ** Skiped read only attribute validation. [しまさわらさん]
160
+ ** Treated "" as empty value. [Ted Lepich]
161
+ ** [#9][#16] Reduced raising when DN value is invalid.
162
+ [danger1986][Alexey.Chebotar]
163
+ ** [#10][#12] Fixed needless ',' is appeared. [michael.j.konopka]
164
+ ** [#11] Required missing 'active_ldap/user_password'. [michael.j.konopka]
165
+ ** [#13] Returned entries if has_many :wrap has nonexistent entry.
166
+ [ingersoll]
167
+ ** [#15] Fixed type error on computing DN. [ery.lee]
168
+ ** ">=" filter operator doesn't work. [id:dicdak]
169
+ ** [#17] ActiveLdap::Base.create doesn't raise exception. [Alexey.Chebotar]
170
+
171
+ h2. 1.0.1
165
172
 
166
173
  * Fixed GetText integration.
167
174
  * Fixed ActiveLdap::Base.find with ActiveLdap::DN. (Reported by Jeremy Pruitt)
@@ -172,73 +179,77 @@
172
179
  * Improved inspect.
173
180
  * Supported ActiveSupport 2.1.0.
174
181
 
175
- == 1.0.0
182
+ h2. 1.0.0
176
183
 
177
184
  * Fixed GSSAPI auth failure. [#18764] (Reported by Lennon Day-Reynolds)
178
185
  * Supported Symbol as :dn_attribute_value. [#18921] (Requested by Nobody)
179
186
  * Improved DN attribute detection. (Reported by Iain Pople)
180
187
  * Avoided unnecesally modify operation. (Reported by Tilo)
181
188
 
182
- == 0.10.0
189
+ h2. 0.10.0
183
190
 
184
191
  * Implemented LDIF parser.
185
192
  * Improved validation:
186
- * Added some validations.
187
- * Fixed SINGLE-VALUE validation. [#17763]
188
- (Reported by Naoto Morishima)
193
+ ** Added some validations.
194
+ ** Fixed SINGLE-VALUE validation. [#17763]
195
+ (Reported by Naoto Morishima)
189
196
  * Supported JNDI as backend.
190
197
  * Improved auto reconnection.
191
198
  * Supported Rails 2.0.2.
192
199
  * Improved performance. (4x)
193
200
  * [API CHANGE]: removed "'binary' =>" from getter result.
194
201
 
202
+ <pre>
203
+ !!!plain
195
204
  e.g.:
196
205
  before:
197
206
  user.user_certificate # => {"binary" => "..."}
198
207
  now:
199
208
  user.user_certificate # => "..."
209
+ </pre>
210
+
200
211
  * Added :excluded_classed ldap_mapping option.
201
212
  * Logged operation time used for LDAP operation.
202
213
  * Improved API:
203
- * Accepted non String value for find(:value => XXX).
204
- (Suggested by Marc Dequèn)
205
- * Accepted DN as ActiveLdap::Base.new(XXX).
206
- (Reported by Jeremy Pruitt)
207
- * Treated empty password for smiple bind as anonymous bind.
208
- (Suggested by Bodaniel Jeans)
209
- * Ensured adding "objectClass" for find's :attribute value. [#16946]
210
- (Suggested by Nobody)
211
- * Fixed a GeneralizedTime type casting bug.
212
- (Reported by Bodaniel Jeanes)
213
- * Supported :base and :prefix search/find option value escaping.
214
- (Suggested by David Morton)
215
-
216
- == 0.9.0
214
+ ** Accepted non String value for find(:value => XXX).
215
+ (Suggested by Marc Dequèn)
216
+ ** Accepted DN as ActiveLdap::Base.new(XXX).
217
+ (Reported by Jeremy Pruitt)
218
+ ** Treated empty password for smiple bind as anonymous bind.
219
+ (Suggested by Bodaniel Jeans)
220
+ ** Ensured adding "objectClass" for find's :attribute value. [#16946]
221
+ (Suggested by Nobody)
222
+ ** Fixed a GeneralizedTime type casting bug.
223
+ (Reported by Bodaniel Jeanes)
224
+ ** Supported :base and :prefix search/find option value escaping.
225
+ (Suggested by David Morton)
226
+
227
+ h2. 0.9.0
217
228
 
218
229
  * Improved DN handling.
219
230
  * Supported attribute value validation by LDAP schema.
220
231
  * Changed RubyGems name: ruby-activeldap -> activeldap.
221
232
  * Removed Log4r dependency.
222
233
  * Supported lazy connection establishing.
223
- * [API CHANGE]: establish_connection doesn't connect LDAP server.
234
+ ** [API CHANGE]: establish_connection doesn't connect LDAP server.
224
235
  * [API CHANGE]: Removed ActiveLdap::Base#establish_connection.
225
236
  * Added ActiveLdap::Base#bind. (use this instead of #establish_connection)
226
237
  * Supported implicit acts_as_tree.
227
238
  * [API CHANGE]: Supported type casting.
228
239
  * Supported :uri option in configuration.
229
240
  * Improved Rails integration:
230
- * Followed Rails 2.0 changes.
231
- * AL-Admin:
232
- * Supported lang parameter in URL.
233
- * Improved design a bit. (Please someone help us!)
234
- * Supported schema inspection.
235
- * Supported objectClass modifiation.
236
- * Rails plugin:
237
- * Added ActiveLdap::VERSION check.
238
- * Added model_active_ldap generator.
239
- * Renamed scaffold_al generator to scaffold_active_ldap.
240
-
241
- == 0.8.3
241
+ ** Followed Rails 2.0 changes.
242
+ ** AL-Admin:
243
+ *** Supported lang parameter in URL.
244
+ *** Improved design a bit. (Please someone help us!)
245
+ *** Supported schema inspection.
246
+ *** Supported objectClass modifiation.
247
+ ** Rails plugin:
248
+ *** Added ActiveLdap::VERSION check.
249
+ *** Added model_active_ldap generator.
250
+ *** Renamed scaffold_al generator to scaffold_active_ldap.
251
+
252
+ h2. 0.8.3
242
253
 
243
254
  * Added AL-Admin Sample Rails app
244
255
  * Added Ruby-GetText-Package support
@@ -247,36 +258,36 @@
247
258
  * Improved performance
248
259
  * Many bug fixes
249
260
 
250
- == 0.8.2
261
+ h2. 0.8.2
251
262
 
252
263
  * Added Net::LDAP support!
253
- * supported SASL Digest-MD5 authentication with Net::LDAP.
264
+ ** supported SASL Digest-MD5 authentication with Net::LDAP.
254
265
  * improved LDAP server support:
255
- * improved Sun DS support.
256
- * improved ActiveDirectory support. Thanks to Ernie Miller!
257
- * improved Fedora-DS support. Thanks to Daniel Pfile!
266
+ ** improved Sun DS support.
267
+ ** improved ActiveDirectory support. Thanks to Ernie Miller!
268
+ ** improved Fedora-DS support. Thanks to Daniel Pfile!
258
269
  * improved existing functions:
259
- * improved DN handling. Thanks to James Hughes!
260
- * improved SASL bind.
261
- * improved old API check.
262
- * improved schema handling. Thanks to Christoph Lipp!
263
- * improved filter notification.
270
+ ** improved DN handling. Thanks to James Hughes!
271
+ ** improved SASL bind.
272
+ ** improved old API check.
273
+ ** improved schema handling. Thanks to Christoph Lipp!
274
+ ** improved filter notification.
264
275
  * updated documents:
265
- * updated Rails realted documenation. Thanks to James Hughes!
266
- * updated documentation for the changes between 0.7.1 and 0.8.0.
267
- Thanks to Buzz Chopra!
276
+ ** updated Rails realted documenation. Thanks to James Hughes!
277
+ ** updated documentation for the changes between 0.7.1 and 0.8.0.
278
+ Thanks to Buzz Chopra!
268
279
  * added new features:
269
- * added scaffold_al generator for Rails.
270
- * added required_classes to default filter value. Thanks to Jeff Hall!
271
- * added :recommended_classes option to ldap_mapping.
272
- * added :sort_by and :order options to find.
273
- * added ActiveLdap::Base#to_param for ActionController.
280
+ ** added scaffold_al generator for Rails.
281
+ ** added required_classes to default filter value. Thanks to Jeff Hall!
282
+ ** added :recommended_classes option to ldap_mapping.
283
+ ** added :sort_by and :order options to find.
284
+ ** added ActiveLdap::Base#to_param for ActionController.
274
285
  * fixed some bugs:
275
- * fixed rake install/uninstall.
276
- * fixed typos. Thanks to Nobody!
277
- * fixed required_classes initialization. Thanks to James Hughes!
286
+ ** fixed rake install/uninstall.
287
+ ** fixed typos. Thanks to Nobody!
288
+ ** fixed required_classes initialization. Thanks to James Hughes!
278
289
 
279
- == 0.8.1
290
+ h2. 0.8.1
280
291
 
281
292
  * used Dependencies.load_paths.
282
293
  * check whether attribute name is available or not.
@@ -294,7 +305,7 @@
294
305
  * followed new API.
295
306
  * removed a finished task: support Reloadable::Subclasses.
296
307
 
297
- == 0.8.0
308
+ h2. 0.8.0
298
309
 
299
310
  * Makefile/gemspec system replaced with Rakefile + Hoe
300
311
  * Bugfix: Allow base to be empty
@@ -325,30 +336,30 @@
325
336
  * make save!() raise EntryNotSaved exception
326
337
  * to_xml()
327
338
  * clear_active_connections!() -- Conn per class
328
- - make @@active_connections and name them by
339
+ ** make @@active_connections and name them by
329
340
  * base_class() (just return the ancestor)
330
341
  * Separate ObjectClass changes to live in ActiveLDAP::ObjectClass
331
- - add_objectclass
332
- - remove_objectclass
333
- - replace_objectclass
334
- - disallow direct objectclass access?
342
+ ** add_objectclass
343
+ ** remove_objectclass
344
+ ** replace_objectclass
345
+ ** disallow direct objectclass access?
335
346
  * support ActiveRecord::Validations.
336
347
  * support ActiveRecord::Callbacks.
337
348
  * rename to ActiveLdap from ActiveLDAP to integrate RoR easily and enforce
338
349
  many API changes.
339
350
 
340
- == 0.7.4
351
+ h2. 0.7.4
341
352
 
342
353
  * Bugfix: do not base LDAP::PrettyError on RuntimeError due to rescue evaluation.
343
354
  * Bugfix: :return_objects was overriding :objects in find and find_all
344
355
  * Rollup exception code into smaller space reusing similar code.
345
356
 
346
- == 0.7.3
357
+ h2. 0.7.3
347
358
 
348
359
  * Made has_many and belongs_to use :return_objects value
349
360
  * Force generation of LDAP constants on import - currently broken
350
361
 
351
- == 0.7.2
362
+ h2. 0.7.2
352
363
 
353
364
  * Stopped overriding Conn.schema in ldap/schema - now use schema2
354
365
  * Fix attributes being deleted when changing between objectclasses with shared attributes
@@ -371,14 +382,14 @@
371
382
  * Added(*) a forking timeout using SIGALRM to interrupt handling.
372
383
  * (*) Only works when RUBY_PLATFORM has "linux" in it
373
384
 
374
- == 0.7.1
385
+ h2. 0.7.1
375
386
 
376
387
  * Fix broken -W0 arg in activeldap.rb
377
388
  * attribute_method=: '' and nil converted to ldap-pleasing [] values
378
389
  * Added checks in write and search for connection down (to reconnect)
379
390
  * Fixed broken idea of LDAP::err2string exceptions. Instead took errcodes from ldap.c in Ruby/LDAP.
380
391
 
381
- == 0.7.0
392
+ h2. 0.7.0
382
393
 
383
394
  * ConnectionError thrown from #initialize when there is no connection and retry limit was exceeded
384
395
  * ConnectionError thrown when retries exceeded when no connection was created
@@ -399,7 +410,7 @@
399
410
  * Added support for Base::connect(.., :password => String, ...) to avoid stupid Proc.new {'foo'} crap
400
411
  * Add :store_password option. When this is set, :password is not cleared and :password_block is not re-evaluated on each rebind.
401
412
 
402
- == 0.6.0
413
+ h2. 0.6.0
403
414
 
404
415
  * Disallow blank DN attribute values on initialization
405
416
  * Fix bug reported by Maik Schmidt regarding object creation
@@ -410,7 +421,7 @@
410
421
  * Changes examples and tests to use "dc=localdomain"
411
422
  * has_many() entries no longer return nil when empty
412
423
 
413
- == 0.5.9
424
+ h2. 0.5.9
414
425
 
415
426
  * Change default base to dc=localdomain (as per Debian default).
416
427
  * schema2.rb:attr() now returns [] instead of '' when empty.
@@ -422,60 +433,60 @@
422
433
  * Fixed broken creation of objects from anonymous classes.
423
434
  * Fixed broken use of ldap_mapping with anonymous classes.
424
435
 
425
- == 0.5.8: Bugfix galore
436
+ h2. 0.5.8: Bugfix galore
426
437
 
427
438
  * Allow nil "prefix"
428
439
  * Fixed the dup bug with Anonymous patch.
429
440
  * (maybe) Fixed stale connection problems by attempting reconn/bind.
430
441
  * Hiding redefine warnings (for now)
431
442
 
432
- == 0.5.7
443
+ h2. 0.5.7
433
444
 
434
445
  * Fixed the @data.default = [] bug that daniel@nightrunner.com pointed out
435
446
  (and partially patched).
436
447
 
437
- == 0.5.6
448
+ h2. 0.5.6
438
449
 
439
450
  * Added support for foreign_key => 'dn' in has_many.
440
451
 
441
- == 0.5.5
452
+ h2. 0.5.5
442
453
 
443
454
  * Remove @@logger.debug entries during build
444
455
  * Building -debug and regular gems and tarballs
445
456
 
446
- == 0.5.4
457
+ h2. 0.5.4
447
458
 
448
459
  * Added Base#import to streamline the Base.find and Base.find_all methods
449
- - Speeds up find and find_all by not accessing LDAP multiple times
450
- for data we already have.
460
+ ** Speeds up find and find_all by not accessing LDAP multiple times
461
+ for data we already have.
451
462
  * Added tests/benchmark which is a slightly modified version of excellent
452
463
  benchmarking code contributed by
453
464
  Ollivier Robert <roberto -_-AT-_- keltia.freenix.fr>.
454
465
 
455
- == 0.5.3
466
+ h2. 0.5.3
456
467
 
457
468
  * Changed attribute_method to send in associations
458
- - fixes belongs_to (with local_kay) and inheritance around that
469
+ ** fixes belongs_to (with local_kay) and inheritance around that
459
470
 
460
- == 0.5.2
471
+ h2. 0.5.2
461
472
 
462
473
  * Make sure values are .dup'd when they come from LDAP
463
474
 
464
- == 0.5.1
475
+ h2. 0.5.1
465
476
 
466
- * Changed Schema2#class_attributes to return {:must => [], :may => []}
477
+ * Changed Schema2#class_attributes to return @{:must => [], :may => []}@
467
478
  * Fixed Base#must and Base#may to return with full SUPerclass requirements
468
479
 
469
- == 0.5.0
480
+ h2. 0.5.0
470
481
 
471
482
  * API CHANGE (as with all 0.x.0 changes) (towards ActiveRecord duck typing)
472
- - Base#ldapattribute now always returns an array
473
- - Base#ldapattribute(true) now returns a dup of an array, string, etc
474
- when appropriate (old default) - This is just for convenience
475
- - Base#ldapattribute returns the stored value, not just a .dup
476
- - Associations methods return objects by default instead of just names.
477
- Group.new('foo').members(false) will return names only.
478
- - Base.connect returns true as one might expect
483
+ ** Base#ldapattribute now always returns an array
484
+ ** Base#ldapattribute(true) now returns a dup of an array, string, etc
485
+ when appropriate (old default) - This is just for convenience
486
+ ** Base#ldapattribute returns the stored value, not just a .dup
487
+ ** Associations methods return objects by default instead of just names.
488
+ Group.new('foo').members(false) will return names only.
489
+ ** Base.connect returns true as one might expect
479
490
  * Value validation and changing (binary, etc) occur prior to write, and
480
491
  not immediately on attribute_method=(value).
481
492
  * Attribute method validity is now determined /on-the-fly/.
@@ -495,122 +506,130 @@
495
506
  This also makes it possible to "break" objects by removing the 'top'
496
507
  objectclass and therefore the #objectClass method...
497
508
 
498
- == 0.4.4
509
+ h2. 0.4.4
499
510
 
500
511
  * Fixed binary subtype forcing:
501
- - was setting data as subtype ;binary even when not required
512
+ ** was setting data as subtype ;binary even when not required
502
513
  * Added first set of unit tests.
503
- - These will be cleaned up in later releases as more tests are added.
514
+ ** These will be cleaned up in later releases as more tests are added.
504
515
  * Fixed subtype clobber non-subtype (unittest!)
505
- - cn and cn;lang-blah: the last loaded won
516
+ ** cn and cn;lang-blah: the last loaded won
506
517
  * Fixed multivalued subtypes from being shoved into a string (unittest!)
507
- - an error with attribute_input_value
518
+ ** an error with attribute_input_value
508
519
 
509
- == 0.4.3
520
+ h2. 0.4.3
510
521
 
511
522
  * Fixed write (add) bugs introduced with last change
512
- - only bug fixes until unittests are in place
523
+ ** only bug fixes until unittests are in place
513
524
 
514
- == 0.4.2
525
+ h2. 0.4.2
515
526
 
516
527
  * Added ruby-activeldap.gemspec
517
528
  * Integrated building a gem of 'ruby-activeldap' into Makefile.package
518
529
  * Added attr parsing cache to speed up repetitive calls: approx 13x speedup
519
- - 100 usermod-binary-add calls
520
-
521
- Without attr parsing cache:
522
- real 13m53.129s
523
- user 13m11.350s
524
- sys 0m7.030s
525
- With attr parsing cache:
526
- real 1m0.416s
527
- user 0m28.390s
528
- sys 0m2.380s
529
-
530
- == 0.4.1:
530
+ ** 100 usermod-binary-add calls
531
+
532
+ <pre>
533
+ !!!plain
534
+ Without attr parsing cache:
535
+ real 13m53.129s
536
+ user 13m11.350s
537
+ sys 0m7.030s
538
+ With attr parsing cache:
539
+ real 1m0.416s
540
+ user 0m28.390s
541
+ sys 0m2.380s
542
+ </pre>
543
+
544
+ h2. 0.4.1:
531
545
 
532
546
  * Schema2 was not correctly parsing objectClass entries.
533
- - This is fixed for now but must be revisited.
547
+ ** This is fixed for now but must be revisited.
534
548
 
535
- == 0.4.0
549
+ h2. 0.4.0
536
550
 
537
551
  * Added #<attribute>(arrays) argument which when true
538
552
  always returns arrays. e.g.
539
- irb> user.cn(true)
540
- => ['My Common Name']
553
+
554
+ <pre>
555
+ !!!plain
556
+ irb> user.cn(true)
557
+ => ['My Common Name']
558
+ </pre>
559
+
541
560
  This makes things easier for larger programming tasks.
542
561
  * Added subtype support:
543
- - Uses Hash objects to specify the subtype
544
- e.g. user.userCertificate = {'binary' => File.read('mycert.der')}
545
- - Added recursive type enforcement along with the subtype handling
546
- - This required overhauling the #write method.
547
- - Please report any problems ASAP! :^)
562
+ ** Uses Hash objects to specify the subtype
563
+ e.g. @user.userCertificate = {'binary' => File.read('mycert.der')}@
564
+ ** Added recursive type enforcement along with the subtype handling
565
+ ** This required overhauling the #write method.
566
+ *** Please report any problems ASAP! :^)
548
567
  * Added automagic binary support
549
- - subtype wrapping done automatically
550
- - relies on X-NOT-HUMAN-READABLE flag
568
+ ** subtype wrapping done automatically
569
+ ** relies on X-NOT-HUMAN-READABLE flag
551
570
  * Added LDAP::Schema2 which is an extension of Ruby/LDAP::Schema
552
- - made Schema#attr generic for easy type dereferencing
571
+ ** made Schema#attr generic for easy type dereferencing
553
572
  * Updated rdoc in activeldap.rb
554
573
  * Updated examples (poorly) to reflect new functionality
555
574
  * Added several private helper functions
556
575
 
557
- == 0.3.6
576
+ h2. 0.3.6
558
577
 
559
578
  * Fixed dn attribute value extraction on find and find_all
560
- - these may have grabbed the wrong value if a DN attr has
561
- multiple values.
579
+ ** these may have grabbed the wrong value if a DN attr has
580
+ multiple values.
562
581
  * Fixed Base.search to return all values as arrays and update
563
582
  multivalued ones correctly
564
583
  * Lowered the amount of default logging to FATAL only
565
584
 
566
- == 0.3.5
585
+ h2. 0.3.5
567
586
 
568
587
  * Moved to rubyforge.org!
569
588
 
570
- == 0.3.4
589
+ h2. 0.3.4
571
590
 
572
591
  * Changed license to Ruby's
573
592
 
574
- == 0.3.3
593
+ h2. 0.3.3
575
594
 
576
595
  * Changed Base.search to return an array instead of a hash of hashes
577
596
  * Change Base.search to take in a hash as its arguments
578
597
 
579
- == 0.3.2
598
+ h2. 0.3.2
580
599
 
581
600
  * Bug fix - fixed support for module'd extension classes (again!)
582
601
 
583
- == 0.3.1
602
+ h2. 0.3.1
584
603
 
585
604
  * Updated the documentation
586
605
  * Fixed ignoring of attrs argument in Base.search
587
606
  * Fixed mistake in groupls (using dnattr directly)
588
607
  * Fixed a mistake with overzealous dup'ing
589
608
 
590
- == 0.3.0
609
+ h2. 0.3.0
591
610
 
592
611
  * MORE API CHANGES (configuration.rb, etc)
593
612
  * Major overhaul to the internals!
594
- - removed @@BLAH[@klass] in lieu of defining
595
- class methods which contain the required values. This
596
- allows for clean inheritance of Base subclasses! Whew!
597
- - Added @@config to store the options currently in use
598
- after a Base.connect
599
- - Now cache passwords for doing reconnects
600
- - dnattr now accessible to the outside as a class method only
613
+ ** removed @@BLAH[@klass] in lieu of defining
614
+ class methods which contain the required values. This
615
+ allows for clean inheritance of Base subclasses! Whew!
616
+ ** Added @@config to store the options currently in use
617
+ after a Base.connect
618
+ ** Now cache passwords for doing reconnects
619
+ ** dnattr now accessible to the outside as a class method only
601
620
  * Added Base.search to wrap normal LDAP search for convenience.
602
- - This returns a hash of hashes with the results indexed first by
603
- full dn, then by attribute.
621
+ ** This returns a hash of hashes with the results indexed first by
622
+ full dn, then by attribute.
604
623
 
605
- == 0.2.0
624
+ h2. 0.2.0
606
625
 
607
626
  * API CHANGES:
608
- - Extension classes must be defined using map_to_ldap instead of setting
609
- random values in initialize
610
- - Base#find is now Base.find_all and is a class method
611
- - Base.find returns the first match a la Array#find
612
- - force_reload is gone in belongs_to and has_many created methods
613
- - hiding Base.new, Base.find, and Base.find_all from direct access
627
+ ** Extension classes must be defined using map_to_ldap instead of setting
628
+ random values in initialize
629
+ ** Base#find is now Base.find_all and is a class method
630
+ ** Base.find returns the first match a la Array#find
631
+ ** force_reload is gone in belongs_to and has_many created methods
632
+ ** hiding Base.new, Base.find, and Base.find_all from direct access
614
633
  * added uniq to setting objectClass to avoid stupid errors
615
634
  * fixed new object creation bug where attributes were added before the
616
635
  objectclass resulting in a violation (Base#write)
@@ -624,48 +643,48 @@
624
643
  * Base.connect(:try_sasl => true) should now work with GSSAPI if you are
625
644
  using OpenLDAP >= 2.1.29
626
645
 
627
- == 0.1.8
646
+ h2. 0.1.8
628
647
 
629
648
  * .dup all returned attribute values to avoid weirdness
630
649
  * .dup all assigned values to avoid weirdness
631
650
  * Changed default configuration.rb to use example.com
632
651
 
633
- == 0.1.7
652
+ h2. 0.1.7
634
653
 
635
654
  * Added support for non-unique DN attributes
636
655
  * Added authoritative DN retrieval with 'object.dn'
637
656
 
638
- == 0.1.6
657
+ h2. 0.1.6
639
658
 
640
659
  * Added Base.close method for clearing the existing connection (despite Ruby/LDAP's lack of .close)
641
660
 
642
- == 0.1.5
661
+ h2. 0.1.5
643
662
 
644
663
  * Fixed incorrect usage of @klass in .find (should .find be a class method?)
645
664
 
646
- == 0.1.4
665
+ h2. 0.1.4
647
666
 
648
667
  * Change WARN to INFO in associations.rb for has_many
649
668
 
650
- == 0.1.3
669
+ h2. 0.1.3
651
670
 
652
671
  * Fixed class name mangling
653
672
  * Added support for classes to take DNs as the initialization value
654
673
 
655
- == 0.1.2
674
+ h2. 0.1.2
656
675
 
657
676
  * Patch from Dick Davies: Try SSL before TLS
658
677
  * Log4r support
659
678
  * Better packaging (automated)
660
679
  * Work-around for SSL stupidity
661
- - SSLConn doesn't check if the port it connected to is really using SSL!
680
+ ** SSLConn doesn't check if the port it connected to is really using SSL!
662
681
 
663
- == 0.1.1
682
+ h2. 0.1.1
664
683
 
665
684
  * Dynamic table class creation
666
685
  * SASL/GSSAPI disabled by default - doesn't work consistently
667
686
 
668
- == 0.1.0
687
+ h2. 0.1.0
669
688
 
670
689
  * Added foreign_key to has_many
671
690
  * Added local_key to belongs_to
@@ -674,48 +693,48 @@
674
693
  * Packaged up with setup.rb
675
694
  * Added RDocs and better comments
676
695
 
677
- == 0.0.9
696
+ h2. 0.0.9
678
697
 
679
698
  * Separated extension classes from ActiveLDAP module
680
699
  * Cleaned up examples with new requires
681
700
 
682
- == 0.0.8
701
+ h2. 0.0.8
683
702
 
684
703
  * Added user and group scripting examples
685
- - usermod, userls, useradd, userdel
686
- - groupmod, groupls
704
+ ** usermod, userls, useradd, userdel
705
+ ** groupmod, groupls
687
706
 
688
- == 0.0.7
707
+ h2. 0.0.7
689
708
 
690
709
  * Cleaner authentication loop:
691
- - SASL (GSSAPI only), simple, anonymous
710
+ ** SASL (GSSAPI only), simple, anonymous
692
711
  * Added allow_anonymous option added (default: false)
693
712
 
694
- == 0.0.6
713
+ h2. 0.0.6
695
714
 
696
715
  * Write support cleaned up
697
716
  * Exception classes added
698
717
 
699
- == 0.0.5
718
+ h2. 0.0.5
700
719
 
701
720
  * LDAP write support added
702
721
 
703
- == 0.0.4
722
+ h2. 0.0.4
704
723
 
705
724
  * MUST and MAY data validation against schema using objectClasses
706
725
 
707
- == 0.0.3
726
+ h2. 0.0.3
708
727
 
709
728
  * LDAP attributes alias resolution and data mapping
710
729
 
711
- == 0.0.2
730
+ h2. 0.0.2
712
731
 
713
732
  * Associations: has_many and belongs_to Class methods added for Base
714
733
 
715
- == 0.0.1
734
+ h2. 0.0.1
716
735
 
717
736
  * Extension approach in place with example User and Group classes
718
737
 
719
- == 0.0.0
738
+ h2. 0.0.0
720
739
 
721
740
  * Basic LDAP read support in place with hard-coded OUs