og 0.20.0 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +796 -664
- data/INSTALL +24 -24
- data/README +39 -32
- data/Rakefile +41 -42
- data/benchmark/bench.rb +36 -36
- data/doc/AUTHORS +15 -12
- data/doc/LICENSE +3 -3
- data/doc/RELEASES +311 -243
- data/doc/config.txt +1 -1
- data/examples/mysql_to_psql.rb +15 -15
- data/examples/run.rb +92 -92
- data/install.rb +7 -17
- data/lib/og.rb +76 -75
- data/lib/og/collection.rb +203 -160
- data/lib/og/entity.rb +168 -169
- data/lib/og/errors.rb +5 -5
- data/lib/og/manager.rb +179 -178
- data/lib/og/mixin/hierarchical.rb +107 -107
- data/lib/og/mixin/optimistic_locking.rb +36 -36
- data/lib/og/mixin/orderable.rb +148 -148
- data/lib/og/mixin/timestamped.rb +8 -8
- data/lib/og/mixin/tree.rb +124 -124
- data/lib/og/relation.rb +237 -213
- data/lib/og/relation/belongs_to.rb +5 -5
- data/lib/og/relation/has_many.rb +60 -58
- data/lib/og/relation/joins_many.rb +93 -47
- data/lib/og/relation/refers_to.rb +25 -21
- data/lib/og/store.rb +210 -207
- data/lib/og/store/filesys.rb +79 -79
- data/lib/og/store/kirby.rb +263 -258
- data/lib/og/store/memory.rb +261 -261
- data/lib/og/store/mysql.rb +288 -284
- data/lib/og/store/psql.rb +261 -244
- data/lib/og/store/sql.rb +873 -720
- data/lib/og/store/sqlite.rb +177 -175
- data/lib/og/store/sqlserver.rb +204 -214
- data/lib/og/types.rb +1 -1
- data/lib/og/validation.rb +57 -57
- data/lib/vendor/mysql.rb +376 -376
- data/lib/vendor/mysql411.rb +10 -10
- data/test/og/mixin/tc_hierarchical.rb +59 -59
- data/test/og/mixin/tc_optimistic_locking.rb +40 -40
- data/test/og/mixin/tc_orderable.rb +67 -67
- data/test/og/mixin/tc_timestamped.rb +19 -19
- data/test/og/store/tc_filesys.rb +46 -46
- data/test/og/tc_inheritance.rb +81 -81
- data/test/og/tc_join.rb +67 -0
- data/test/og/tc_polymorphic.rb +49 -49
- data/test/og/tc_relation.rb +57 -30
- data/test/og/tc_select.rb +49 -0
- data/test/og/tc_store.rb +345 -337
- data/test/og/tc_types.rb +11 -11
- metadata +11 -18
data/doc/RELEASES
CHANGED
@@ -1,4 +1,73 @@
|
|
1
|
-
== Version 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
|
-
|
13
|
-
|
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
|
-
|
21
|
-
|
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
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
-
|
107
|
-
|
175
|
+
the Webrick server.
|
176
|
+
|
108
177
|
* New order macro in Og to set default ordering for each
|
109
|
-
|
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
|
-
|
132
|
-
|
200
|
+
Extra care was taken to make all features more orthogonal.
|
201
|
+
|
133
202
|
* Brand new relation mechanism. The 'enchanting' of entities
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
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
|
-
|
148
|
-
|
149
|
-
|
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
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
-
|
237
|
+
comments = Article.comments(:include => User)
|
169
238
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
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
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
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
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
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
|
-
|
197
|
-
|
198
|
-
|
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
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
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
|
-
|
280
|
+
updates:
|
212
281
|
|
213
|
-
|
214
|
-
|
215
|
-
|
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
|
-
|
219
|
-
|
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
|
-
|
223
|
-
|
224
|
-
|
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
|
-
|
296
|
+
clenup and minimize the code.
|
228
297
|
|
229
298
|
* Managed classes or Entities should include the EntityMixin
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
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
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
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
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
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
|
-
|
295
|
-
|
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
|
-
|
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
|
-
|
321
|
-
|
389
|
+
include NestedSets
|
390
|
+
end
|
322
391
|
|
323
|
-
|
392
|
+
or
|
324
393
|
|
325
|
-
|
326
|
-
|
327
|
-
|
394
|
+
class Comment
|
395
|
+
include Hierarchical, :method => :nested_sets
|
396
|
+
end
|
328
397
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
398
|
+
c.add_comment(child_comment)
|
399
|
+
c.full_children
|
400
|
+
c.direct_children
|
401
|
+
c.children
|
333
402
|
|
334
|
-
|
335
|
-
|
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
|
-
|
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
|
-
|
461
|
+
even easier (and portable) querying:
|
393
462
|
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
463
|
+
class Article
|
464
|
+
property :title, :body, String
|
465
|
+
property :hits, Fixnum
|
466
|
+
property :create_time, Time
|
467
|
+
end
|
399
468
|
|
400
|
-
|
469
|
+
you get the finders:
|
401
470
|
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
471
|
+
Article.find_by_title
|
472
|
+
Article.find_by_body
|
473
|
+
Article.find_by_hits
|
474
|
+
Article.find_by_create_time
|
406
475
|
|
407
|
-
|
408
|
-
|
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
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
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
|
-
|
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
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
508
|
+
class Article
|
509
|
+
property :title, String
|
510
|
+
property :body, String
|
511
|
+
has_many :comments, Comment
|
512
|
+
end
|
444
513
|
|
445
|
-
|
446
|
-
|
514
|
+
par = Article.properties_and_relations
|
515
|
+
=> [Property(:title), Property(:body), Og::HasMany(:comments)]
|
447
516
|
|
448
|
-
|
449
|
-
|
517
|
+
par[2].klass
|
518
|
+
=> Comment
|
450
519
|
|
451
|
-
|
452
|
-
|
520
|
+
par[2].meta[:linkback]
|
521
|
+
=> :article_oid
|
453
522
|
|
454
523
|
* Og Typemacros, here is an example:
|
455
524
|
|
456
|
-
|
457
|
-
|
458
|
-
|
525
|
+
def VarChar(size)
|
526
|
+
return String, :sql => "NOT NULL VARCHAR(#{size})"
|
527
|
+
end
|
459
528
|
|
460
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
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
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|