og 0.20.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/CHANGELOG +796 -664
  2. data/INSTALL +24 -24
  3. data/README +39 -32
  4. data/Rakefile +41 -42
  5. data/benchmark/bench.rb +36 -36
  6. data/doc/AUTHORS +15 -12
  7. data/doc/LICENSE +3 -3
  8. data/doc/RELEASES +311 -243
  9. data/doc/config.txt +1 -1
  10. data/examples/mysql_to_psql.rb +15 -15
  11. data/examples/run.rb +92 -92
  12. data/install.rb +7 -17
  13. data/lib/og.rb +76 -75
  14. data/lib/og/collection.rb +203 -160
  15. data/lib/og/entity.rb +168 -169
  16. data/lib/og/errors.rb +5 -5
  17. data/lib/og/manager.rb +179 -178
  18. data/lib/og/mixin/hierarchical.rb +107 -107
  19. data/lib/og/mixin/optimistic_locking.rb +36 -36
  20. data/lib/og/mixin/orderable.rb +148 -148
  21. data/lib/og/mixin/timestamped.rb +8 -8
  22. data/lib/og/mixin/tree.rb +124 -124
  23. data/lib/og/relation.rb +237 -213
  24. data/lib/og/relation/belongs_to.rb +5 -5
  25. data/lib/og/relation/has_many.rb +60 -58
  26. data/lib/og/relation/joins_many.rb +93 -47
  27. data/lib/og/relation/refers_to.rb +25 -21
  28. data/lib/og/store.rb +210 -207
  29. data/lib/og/store/filesys.rb +79 -79
  30. data/lib/og/store/kirby.rb +263 -258
  31. data/lib/og/store/memory.rb +261 -261
  32. data/lib/og/store/mysql.rb +288 -284
  33. data/lib/og/store/psql.rb +261 -244
  34. data/lib/og/store/sql.rb +873 -720
  35. data/lib/og/store/sqlite.rb +177 -175
  36. data/lib/og/store/sqlserver.rb +204 -214
  37. data/lib/og/types.rb +1 -1
  38. data/lib/og/validation.rb +57 -57
  39. data/lib/vendor/mysql.rb +376 -376
  40. data/lib/vendor/mysql411.rb +10 -10
  41. data/test/og/mixin/tc_hierarchical.rb +59 -59
  42. data/test/og/mixin/tc_optimistic_locking.rb +40 -40
  43. data/test/og/mixin/tc_orderable.rb +67 -67
  44. data/test/og/mixin/tc_timestamped.rb +19 -19
  45. data/test/og/store/tc_filesys.rb +46 -46
  46. data/test/og/tc_inheritance.rb +81 -81
  47. data/test/og/tc_join.rb +67 -0
  48. data/test/og/tc_polymorphic.rb +49 -49
  49. data/test/og/tc_relation.rb +57 -30
  50. data/test/og/tc_select.rb +49 -0
  51. data/test/og/tc_store.rb +345 -337
  52. data/test/og/tc_types.rb +11 -11
  53. metadata +11 -18
@@ -1,4 +1,73 @@
1
- == Version 0.20.0
1
+ == Version 0.21.0
2
+
3
+ Some great new features and a lot of fixes. Many patches were
4
+ contributed by the community to make this is a release you
5
+ will love!
6
+
7
+ Some notable changes:
8
+
9
+ * Og dynamic queries. You can inject caclulated or join attributes
10
+ to your objects. Here is an example:
11
+
12
+ class Item
13
+ property :quantity, Fixnum
14
+ property :unit_price, Float
15
+
16
+ def initialize(quantity, unit_price)
17
+ @quantity = quantity
18
+ @unit_price = unit_price
19
+ end
20
+ end
21
+
22
+ Item.create 2, 3.0
23
+ item = Item.find_one :select => 'quantity*unit_price as total_price'
24
+ item.total_price # => 6.0
25
+
26
+ Please note that total_price is a dynamically injected
27
+ attribute. Now you can combine SQL's powerful query features
28
+ with the simplicity and elegance of Og.
29
+
30
+ * Og customized join tables allows you to use any Ruby object
31
+ as the join relation between other objects. Here comes an
32
+ example:
33
+
34
+ class Category
35
+ property :title, String
36
+ end
37
+
38
+ class Article
39
+ property :title, String
40
+ end
41
+
42
+ class ArticleToCategory
43
+ property :rate, Float
44
+ has_one Article
45
+ has_one Category
46
+ end
47
+
48
+ c1 = Category.create
49
+ c2 = Category.create
50
+
51
+ a = Article.create
52
+ a.categories.add(c1, :rate => 2.3)
53
+ a.categories.add(c2, :rate => 1.2)
54
+
55
+ for c in a.categories
56
+ p a.category_join_data(c).rate
57
+ end
58
+
59
+ * Og collections size() is now optimized.
60
+
61
+ * Og join code support refactoring. The new code is easier to read,
62
+ more customizable and generates more efficient code by default.
63
+
64
+ * Updated the documentation.
65
+
66
+ * Fixed all reported or discovered bugs, many smaller
67
+ improvements.
68
+
69
+
70
+ == Version 0.20.0 was released on 12-07-2005.
2
71
 
3
72
  A bug fix release.
4
73
 
@@ -9,16 +78,16 @@ Some notable changes:
9
78
  * Fixed Mysql store reconnect bug.
10
79
 
11
80
  * Og falls back to pure ruby adapters for Mysql and Postgres, to
12
- make it easier to run out of the box. Please, don't forget to
13
- switch to the natively compiled adapters for production sites.
81
+ make it easier to run out of the box. Please, don't forget to
82
+ switch to the natively compiled adapters for production sites.
14
83
 
15
84
  * :uniq keyword
16
85
 
17
86
  * fix for self join.
18
87
 
19
88
  * Many, many, many bug fixes and small improvements. This release
20
- fixes all reported bugs in the spirit of out zero-bug tolerance
21
- philosophy.
89
+ fixes all reported bugs in the spirit of out zero-bug tolerance
90
+ philosophy.
22
91
 
23
92
 
24
93
  == Version 0.19.0 was released on 31/05/2005.
@@ -30,60 +99,60 @@ fixes.
30
99
  Some notable changes:
31
100
 
32
101
  * Og polymorphic relations. A groundbreaking feature made possible
33
- by Og's unique design and Ruby's power. Let's use an example
34
- to explain the concept:
35
-
36
- class Comment
37
- ...
38
- belongs_to Object # polymorphic marker
39
- end
40
-
41
- class User
42
- ...
43
- has_many Comment
44
- end
45
-
46
- class Article
47
- ...
48
- has_many Comment
49
- end
50
-
51
- u = User.new
52
- u.comments << User::Comment('Hello')
53
-
54
- a = Article.new
55
- a.comments << Article::Comment('Wow!')
56
-
57
- User::Comment and Article::Comment where automatically created
58
- by Og and are serialized in different tables (also automatically
59
- created by Og). This is the next step in DRY!
102
+ by Og's unique design and Ruby's power. Let's use an example
103
+ to explain the concept:
104
+
105
+ class Comment
106
+ ...
107
+ belongs_to Object # polymorphic marker
108
+ end
109
+
110
+ class User
111
+ ...
112
+ has_many Comment
113
+ end
114
+
115
+ class Article
116
+ ...
117
+ has_many Comment
118
+ end
119
+
120
+ u = User.new
121
+ u.comments << User::Comment('Hello')
122
+
123
+ a = Article.new
124
+ a.comments << Article::Comment('Wow!')
125
+
126
+ User::Comment and Article::Comment where automatically created
127
+ by Og and are serialized in different tables (also automatically
128
+ created by Og). This is the next step in DRY!
60
129
 
61
130
  * Og now supports inheritance using the well known Single Table
62
- Inheritance pattern. Thanks to Og's advanced design the pattern
63
- is fully encapsulated:
64
-
65
- class Document
66
- ...
67
- schema_inheritance
68
- end
69
-
70
- class Article < Document
71
- ..
72
- end
73
-
74
- class Photo < Document
75
- ..
76
- end
77
-
78
- Document.all # => includes Articles and Photos
79
- Article.all # => only Articles
80
-
81
- User.documents # => Articles and Photos
82
- User.documents(:type => Photo) # => only photos.
83
-
84
- Btw, this feature is orthogonal to the polymorphic relations
85
- feature just described, giving the developer great
86
- flexibility.
131
+ Inheritance pattern. Thanks to Og's advanced design the pattern
132
+ is fully encapsulated:
133
+
134
+ class Document
135
+ ...
136
+ schema_inheritance
137
+ end
138
+
139
+ class Article < Document
140
+ ..
141
+ end
142
+
143
+ class Photo < Document
144
+ ..
145
+ end
146
+
147
+ Document.all # => includes Articles and Photos
148
+ Article.all # => only Articles
149
+
150
+ User.documents # => Articles and Photos
151
+ User.documents(:type => Photo) # => only photos.
152
+
153
+ Btw, this feature is orthogonal to the polymorphic relations
154
+ feature just described, giving the developer great
155
+ flexibility.
87
156
 
88
157
  * Integrated an SQLite3 patch by Ghislain Mary.
89
158
 
@@ -103,15 +172,15 @@ patches.
103
172
  Some notable changes:
104
173
 
105
174
  * Thread safe mode was added again in Og. This works nice with
106
- the Webrick server.
107
-
175
+ the Webrick server.
176
+
108
177
  * New order macro in Og to set default ordering for each
109
- entity. The has_many collections respect the order setting.
178
+ entity. The has_many collections respect the order setting.
110
179
 
111
180
  * Fixes in the SQLite adapter.
112
181
 
113
182
  * No warnings in the Posrgres adapter.
114
-
183
+
115
184
  * Cleaned up some source files.
116
185
 
117
186
 
@@ -128,139 +197,139 @@ that made this version possible.
128
197
  Most notable additions:
129
198
 
130
199
  * Extremely clean source code. Better names are used thorougout.
131
- Extra care was taken to make all features more orthogonal.
132
-
200
+ Extra care was taken to make all features more orthogonal.
201
+
133
202
  * Brand new relation mechanism. The 'enchanting' of entities
134
- (managed classes) happens in multiple passes to be more
135
- flexible. Totaly separated graph/metadata creation and serialization
136
- code generation. The Graph metadata can be used for advanced
137
- scaffolding, testing and more.
203
+ (managed classes) happens in multiple passes to be more
204
+ flexible. Totaly separated graph/metadata creation and serialization
205
+ code generation. The Graph metadata can be used for advanced
206
+ scaffolding, testing and more.
138
207
 
139
208
  * Support for fully customizable primary keys. You are no longer
140
- forced to use xxx_oid primary keys. Appart from the extra
141
- flexibility this feature provides this is an essential step
142
- towards the planed 'reverse engineering' mode that will allow the
143
- use of existing schemas with Og.
144
-
209
+ forced to use xxx_oid primary keys. Appart from the extra
210
+ flexibility this feature provides this is an essential step
211
+ towards the planed 'reverse engineering' mode that will allow the
212
+ use of existing schemas with Og.
213
+
145
214
  * More elegant inspection mechanism. Example:
146
215
 
147
- Article.relation(:user) # => Og::BelongsTo(...)
148
- Article.relations # => [...]
149
- Article.properties # => [...]
216
+ Article.relation(:user) # => Og::BelongsTo(...)
217
+ Article.relations # => [...]
218
+ Article.properties # => [...]
150
219
 
151
220
  * Joins_many relation, as an alias for one way, join table relations.
152
221
 
153
222
  * Support for 'active' collections. Active collection are
154
- synchronized with the backend Store and provide a more elegant
155
- interface and the opportunity for 'session' caching:
156
-
157
- article.comments << Comment.new
158
-
159
- instead of
160
-
161
- article.add_comment(Comment.new) # this is also allowed though.
162
-
163
- p article.comments
164
- p article.comments.size # the results of the first query is cached
223
+ synchronized with the backend Store and provide a more elegant
224
+ interface and the opportunity for 'session' caching:
225
+
226
+ article.comments << Comment.new
227
+
228
+ instead of
229
+
230
+ article.add_comment(Comment.new) # this is also allowed though.
231
+
232
+ p article.comments
233
+ p article.comments.size # the results of the first query is cached
165
234
 
166
235
  * Eager relations.
167
236
 
168
- comments = Article.comments(:include => User)
237
+ comments = Article.comments(:include => User)
169
238
 
170
- for comment in comments
171
- p comment.user.name
172
- end
173
-
174
- Elegantly solves the N+1 query problem by using one join
175
- query.
239
+ for comment in comments
240
+ p comment.user.name
241
+ end
242
+
243
+ Elegantly solves the N+1 query problem by using one join
244
+ query.
176
245
 
177
246
  * No need for forward references when defining relations. Now,
178
- the following code magically works:
179
-
180
- class User
181
- has_many Comment # works even though Comment is not defined!
182
- end
183
-
184
- class Comment
185
- belongs_to User
186
- end
187
-
247
+ the following code magically works:
248
+
249
+ class User
250
+ has_many Comment # works even though Comment is not defined!
251
+ end
252
+
253
+ class Comment
254
+ belongs_to User
255
+ end
256
+
188
257
  * Use inflection where possible to infer missing configuration
189
- options. For example
190
-
191
- class Article
192
- belongs_to User # infects relation name :user
193
- ...
194
-
258
+ options. For example
259
+
260
+ class Article
261
+ belongs_to User # infects relation name :user
262
+ ...
263
+
195
264
  * New, lean and mean Store interface. The code needed to teach
196
- Og how to serialize objects to backend store is dramatically
197
- reduced. The new interface is SQL agnostic, so non SQL-RDBM's
198
- stores are possible.
199
-
265
+ Og how to serialize objects to backend store is dramatically
266
+ reduced. The new interface is SQL agnostic, so non SQL-RDBM's
267
+ stores are possible.
268
+
200
269
  * SQL agnostic querying interface, compatible with non-sql
201
- Stores. Here is an example:
202
-
203
- Article.find(
204
- :condition => 'hits > 2 AND rate > 3',
205
- :order => 'title',
206
- :offset => 30,
207
- :limit => 10
208
- )
270
+ Stores. Here is an example:
271
+
272
+ Article.find(
273
+ :condition => 'hits > 2 AND rate > 3',
274
+ :order => 'title',
275
+ :offset => 30,
276
+ :limit => 10
277
+ )
209
278
 
210
279
  * More elegant (and non-sql store compatible) way for selective
211
- updates:
280
+ updates:
212
281
 
213
- article.title = 'Changed'
214
- article.hits += 1
215
- article.update(:title, :hits)
282
+ article.title = 'Changed'
283
+ article.hits += 1
284
+ article.update(:title, :hits)
216
285
 
217
286
  * New, in-memory store that support all features. This is a pure
218
- ruby solution useful for experimentation. It will also serve
219
- as the base for the forthcoming madeleine Store implementation.
287
+ ruby solution useful for experimentation. It will also serve
288
+ as the base for the forthcoming madeleine Store implementation.
220
289
 
221
290
  * Allow for multiple stores in one application. A great example,
222
- mysql_to_psql is provided. This example uses Og's powerfull
223
- features to automatically convert a Mysql database to a
224
- PostgreSQL database. Database migration was never easier.
225
-
291
+ mysql_to_psql is provided. This example uses Og's powerfull
292
+ features to automatically convert a Mysql database to a
293
+ PostgreSQL database. Database migration was never easier.
294
+
226
295
  * Uses the excellent Facets utility collection to further
227
- clenup and minimize the code.
296
+ clenup and minimize the code.
228
297
 
229
298
  * Managed classes or Entities should include the EntityMixin
230
- or extend the Entity class. Example:
231
-
232
- class Article < Entity
233
- ..
234
- end
235
-
236
- class Article
237
- include EntityMixin
238
- end
239
-
240
- This is done to avoid the Module module like in earlier
241
- versions of Og. However, Og is can infer the need to include
242
- the Managed mixin in typical cases:
243
-
244
- class Article
245
- property :title, String
246
- # when a property is defined Og automatically converts the
247
- # class to an Entity
248
- end
249
-
250
- class Article < AnExistingManagedEntity
251
- # also includes the mixin
252
- ...
253
-
254
- class Article
255
- include AModuleThatDefinesProperties
256
- ...
299
+ or extend the Entity class. Example:
300
+
301
+ class Article < Entity
302
+ ..
303
+ end
304
+
305
+ class Article
306
+ include EntityMixin
307
+ end
308
+
309
+ This is done to avoid the Module module like in earlier
310
+ versions of Og. However, Og is can infer the need to include
311
+ the Managed mixin in typical cases:
312
+
313
+ class Article
314
+ property :title, String
315
+ # when a property is defined Og automatically converts the
316
+ # class to an Entity
317
+ end
318
+
319
+ class Article < AnExistingManagedEntity
320
+ # also includes the mixin
321
+ ...
322
+
323
+ class Article
324
+ include AModuleThatDefinesProperties
325
+ ...
257
326
 
258
327
  * Improved support for og_delete interception.
259
328
 
260
329
  * Support for nested transactions.
261
-
330
+
262
331
  * Many, many smaller features and changes.
263
-
332
+
264
333
  Check out the file test/og/tc_store.rb for a demonstration of
265
334
  the new features. The stores for Oracle and SqlServer are not
266
335
  converted yet.
@@ -274,28 +343,28 @@ new features and a major cleanup of the source code.
274
343
  Most notable additions:
275
344
 
276
345
  * Aspect Oriented Programming support. This new system
277
- is used to reimplement features such as Controller filters,
278
- Og callbacks and Og observers. By using this unified
279
- system you can now add Observers to controllers and use
280
- a metalanguage for wraping Og object callbacks:
281
-
282
- class Controller
283
- pre :force_login, :where => :prepend
284
- wrap Benchmark, :on => :index
285
- post :taraa, :on => login
286
- end
346
+ is used to reimplement features such as Controller filters,
347
+ Og callbacks and Og observers. By using this unified
348
+ system you can now add Observers to controllers and use
349
+ a metalanguage for wraping Og object callbacks:
350
+
351
+ class Controller
352
+ pre :force_login, :where => :prepend
353
+ wrap Benchmark, :on => :index
354
+ post :taraa, :on => login
355
+ end
287
356
 
288
- module Timestamped
289
- pre :on => :og_insert { |this| this.create_time = Time.now }
290
- pre :on => :og_update { |this| this.update_time = Time.now }
291
- pre :on => [:og_insert, :og_update] { |this| this.create_time = Time.now }
292
- end
357
+ module Timestamped
358
+ pre :on => :og_insert { |this| this.create_time = Time.now }
359
+ pre :on => :og_update { |this| this.update_time = Time.now }
360
+ pre :on => [:og_insert, :og_update] { |this| this.create_time = Time.now }
361
+ end
293
362
 
294
- This feature will be used extensivelly in future versions
295
- to improve logging, the shaders and more.
363
+ This feature will be used extensivelly in future versions
364
+ to improve logging, the shaders and more.
296
365
 
297
366
  * Major cleanup of the source. Converted the N namespace to
298
- Nitro.
367
+ Nitro.
299
368
 
300
369
  * Add Og Timestamped mixin.
301
370
 
@@ -317,28 +386,28 @@ Most notable additions:
317
386
  * NestedSets mixin:
318
387
 
319
388
  class Comment
320
- include NestedSets
321
- end
389
+ include NestedSets
390
+ end
322
391
 
323
- or
392
+ or
324
393
 
325
- class Comment
326
- include Hierarchical, :method => :nested_sets
327
- end
394
+ class Comment
395
+ include Hierarchical, :method => :nested_sets
396
+ end
328
397
 
329
- c.add_comment(child_comment)
330
- c.full_children
331
- c.direct_children
332
- c.children
398
+ c.add_comment(child_comment)
399
+ c.full_children
400
+ c.direct_children
401
+ c.children
333
402
 
334
- this is a reimplementation of the SqlTraversable mixin
335
- available in older versions.
403
+ this is a reimplementation of the SqlTraversable mixin
404
+ available in older versions.
336
405
 
337
406
  * New implementation of Orderable mixin:
338
407
 
339
408
  class Comment
340
409
  property :body, String
341
- belongs_to :article, Article
410
+ belongs_to :article, Article
342
411
  include Orderable, :scope => article
343
412
  end
344
413
 
@@ -389,33 +458,33 @@ fixed aswell.
389
458
  Most notable additions:
390
459
 
391
460
  * Og automatically generates finders for all properties, for
392
- even easier (and portable) querying:
461
+ even easier (and portable) querying:
393
462
 
394
- class Article
395
- property :title, :body, String
396
- property :hits, Fixnum
397
- property :create_time, Time
398
- end
463
+ class Article
464
+ property :title, :body, String
465
+ property :hits, Fixnum
466
+ property :create_time, Time
467
+ end
399
468
 
400
- you get the finders:
469
+ you get the finders:
401
470
 
402
- Article.find_by_title
403
- Article.find_by_body
404
- Article.find_by_hits
405
- Article.find_by_create_time
471
+ Article.find_by_title
472
+ Article.find_by_body
473
+ Article.find_by_hits
474
+ Article.find_by_create_time
406
475
 
407
- The finders take into account the unique constrain, to return
408
- an array or just an object as needed.
476
+ The finders take into account the unique constrain, to return
477
+ an array or just an object as needed.
409
478
 
410
479
  * Og introduces lifecycle observers to avoid 'poluting' the model
411
- objects with excess functionality. You can use every object
412
- as observer (duck typing) or extend from an AR style Observer
413
- class. The observer callbacks are precompiled in the lifecycle
414
- methods only if defined, so the perfomance is not affected
415
- in the general case.
480
+ objects with excess functionality. You can use every object
481
+ as observer (duck typing) or extend from an AR style Observer
482
+ class. The observer callbacks are precompiled in the lifecycle
483
+ methods only if defined, so the perfomance is not affected
484
+ in the general case.
416
485
 
417
486
  * Fixed Og bug: multiple many_to_many relations with the
418
- same target class.
487
+ same target class.
419
488
 
420
489
  * further code cleanup, improved examples and more.
421
490
 
@@ -429,35 +498,35 @@ improvements to make programming even more enjoyable. Many
429
498
  thanks to Matt Bowen for his help with this release.
430
499
 
431
500
  Most notable additions:
432
-
501
+
433
502
  * Documentation (doc/og_tutorial.txt, doc/og_config.txt)
434
503
 
435
504
  * Og Oracle adapter.
436
505
 
437
506
  * Og provides advanced metadata for the managed objects
438
507
 
439
- class Article
440
- property :title, String
441
- property :body, String
442
- has_many :comments, Comment
443
- end
508
+ class Article
509
+ property :title, String
510
+ property :body, String
511
+ has_many :comments, Comment
512
+ end
444
513
 
445
- par = Article.properties_and_relations
446
- => [Property(:title), Property(:body), Og::HasMany(:comments)]
514
+ par = Article.properties_and_relations
515
+ => [Property(:title), Property(:body), Og::HasMany(:comments)]
447
516
 
448
- par[2].klass
449
- => Comment
517
+ par[2].klass
518
+ => Comment
450
519
 
451
- par[2].meta[:linkback]
452
- => :article_oid
520
+ par[2].meta[:linkback]
521
+ => :article_oid
453
522
 
454
523
  * Og Typemacros, here is an example:
455
524
 
456
- def VarChar(size)
457
- return String, :sql => "NOT NULL VARCHAR(#{size})"
458
- end
525
+ def VarChar(size)
526
+ return String, :sql => "NOT NULL VARCHAR(#{size})"
527
+ end
459
528
 
460
- property :title, VarChar(30)
529
+ property :title, VarChar(30)
461
530
 
462
531
  * Option for faster startup, skip schema check.
463
532
 
@@ -478,7 +547,7 @@ Most notable additions:
478
547
  adapter subsystem.
479
548
 
480
549
  * New SQLite3 Og adapter, improvements in MySQL and PostgreSQL
481
- adapters (needs version 1.1.0 of Sqlite3-Ruby).
550
+ adapters (needs version 1.1.0 of Sqlite3-Ruby).
482
551
 
483
552
  * Better GemSpec for easier installation by RubyGems.
484
553
 
@@ -498,7 +567,7 @@ A maintenance release.
498
567
  Most notable additions:
499
568
 
500
569
  * Og metalanguage relations insert metadata into
501
- the target class, useful for advanced scaffolders.
570
+ the target class, useful for advanced scaffolders.
502
571
 
503
572
  * Og refer_to meta-language command.
504
573
 
@@ -520,29 +589,29 @@ Most notable additions:
520
589
 
521
590
  * New automatic validation system:
522
591
 
523
- class User
524
- prop_accessor :name, :password, String
525
- validate_confirmation :password
526
- validate_length :name, :range => 2..12
527
- end
592
+ class User
593
+ prop_accessor :name, :password, String
594
+ validate_confirmation :password
595
+ validate_length :name, :range => 2..12
596
+ end
528
597
 
529
- u = User.new(...)
530
- unless u.valid?
531
- p u.errors.on(:name)
532
- p u.errors[:password]
533
- end
598
+ u = User.new(...)
599
+ unless u.valid?
600
+ p u.errors.on(:name)
601
+ p u.errors[:password]
602
+ end
534
603
 
535
604
  * No global variables in Og.
536
605
 
537
606
  * Recoded Og to allow for future support of multiple databases
538
- (even on different RDBMS systems) on a single application.
607
+ (even on different RDBMS systems) on a single application.
539
608
 
540
609
  * cleaned up backend code.
541
610
 
542
611
  * More unit tests.
543
612
 
544
613
  * Supports Ruby 1.8.2
545
-
614
+
546
615
 
547
616
  == Version 0.7 was released on 27/12/2004.
548
617
 
@@ -555,7 +624,7 @@ Most notable additions:
555
624
  * Totaly recoded prop_accessor mechanism, avoids polution of the Module
556
625
  class.
557
626
  * prop_accessors for Modules, allows synthesizing of managed objects
558
- from Mixins.
627
+ from Mixins.
559
628
  * new automatically generated methods in Og.
560
629
  * MockDatabase leverages the FlexMock object for easier unit testing.
561
630
 
@@ -593,4 +662,3 @@ Comments from the Ruby community are critical in order to fix possible
593
662
  bugs and improve the API. Suggestions for missing features are also
594
663
  welcome. This version only supports the Postgres Database.
595
664
 
596
-