og 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ProjectInfo +58 -0
- data/README +5 -4
- data/Rakefile +2 -2
- data/doc/AUTHORS +10 -7
- data/doc/RELEASES +108 -0
- data/lib/og.rb +1 -3
- data/lib/og/collection.rb +4 -4
- data/lib/og/entity.rb +96 -27
- data/lib/og/evolution.rb +78 -0
- data/lib/og/manager.rb +29 -32
- data/lib/og/mixin/hierarchical.rb +1 -1
- data/lib/og/mixin/optimistic_locking.rb +5 -8
- data/lib/og/mixin/orderable.rb +15 -2
- data/lib/og/mixin/schema_inheritance_base.rb +12 -0
- data/lib/og/mixin/taggable.rb +29 -25
- data/lib/og/mixin/timestamped.rb +4 -2
- data/lib/og/mixin/tree.rb +0 -1
- data/lib/og/relation.rb +161 -116
- data/lib/og/relation/all.rb +6 -0
- data/lib/og/relation/belongs_to.rb +4 -1
- data/lib/og/relation/has_many.rb +6 -5
- data/lib/og/relation/joins_many.rb +13 -12
- data/lib/og/relation/refers_to.rb +3 -3
- data/lib/og/store.rb +9 -9
- data/lib/og/store/{filesys.rb → alpha/filesys.rb} +0 -0
- data/lib/og/store/alpha/kirby.rb +284 -0
- data/lib/og/store/{memory.rb → alpha/memory.rb} +2 -0
- data/lib/og/store/{sqlserver.rb → alpha/sqlserver.rb} +6 -6
- data/lib/og/store/kirby.rb +145 -162
- data/lib/og/store/mysql.rb +58 -27
- data/lib/og/store/psql.rb +15 -13
- data/lib/og/store/sql.rb +136 -135
- data/lib/og/store/sqlite.rb +13 -12
- data/lib/og/validation.rb +2 -2
- data/lib/vendor/kbserver.rb +20 -0
- data/lib/vendor/kirbybase.rb +2790 -1601
- data/test/og/CONFIG.rb +79 -0
- data/test/og/mixin/tc_hierarchical.rb +1 -1
- data/test/og/mixin/tc_optimistic_locking.rb +1 -3
- data/test/og/mixin/tc_orderable.rb +42 -1
- data/test/og/mixin/tc_taggable.rb +1 -1
- data/test/og/mixin/tc_timestamped.rb +1 -1
- data/test/og/store/tc_filesys.rb +1 -2
- data/test/og/tc_delete_all.rb +45 -0
- data/test/og/tc_inheritance.rb +10 -38
- data/test/og/tc_join.rb +2 -11
- data/test/og/tc_multiple.rb +3 -16
- data/test/og/tc_override.rb +3 -3
- data/test/og/tc_polymorphic.rb +3 -13
- data/test/og/tc_relation.rb +8 -6
- data/test/og/tc_reverse.rb +2 -11
- data/test/og/tc_select.rb +2 -15
- data/test/og/tc_store.rb +4 -63
- data/test/og/tc_types.rb +1 -2
- metadata +80 -77
data/test/og/tc_reverse.rb
CHANGED
@@ -1,22 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$DBG = true
|
1
|
+
require File.join(File.dirname(__FILE__), 'CONFIG.rb')
|
4
2
|
|
5
3
|
require 'test/unit'
|
6
|
-
|
7
4
|
require 'og'
|
8
5
|
|
9
6
|
# 'testreverse' is a legacy database schema. Og's advanced
|
10
7
|
# reverse engineering features allows us to map any schema
|
11
8
|
# to our objects.
|
12
9
|
|
13
|
-
$og = Og.setup(
|
14
|
-
:destroy => true,
|
15
|
-
:store => :mysql,
|
16
|
-
:name => 'testreverse',
|
17
|
-
:user => 'root',
|
18
|
-
:password => 'navelrulez'
|
19
|
-
)
|
10
|
+
$og = Og.setup($og_config)
|
20
11
|
|
21
12
|
# create a 'legacy' schema.
|
22
13
|
|
data/test/og/tc_select.rb
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$DBG = true
|
4
|
-
|
1
|
+
require File.join(File.dirname(__FILE__), 'CONFIG.rb')
|
5
2
|
require 'test/unit'
|
6
|
-
|
7
3
|
require 'og'
|
8
4
|
|
9
5
|
class TC_Query < Test::Unit::TestCase # :nodoc: all
|
@@ -24,16 +20,7 @@ class TC_Query < Test::Unit::TestCase # :nodoc: all
|
|
24
20
|
end
|
25
21
|
|
26
22
|
def setup
|
27
|
-
@og = Og.setup(
|
28
|
-
:destroy => true,
|
29
|
-
:store => :mysql,
|
30
|
-
# :store => :sqlite,
|
31
|
-
# :store => :psql,
|
32
|
-
# :user => 'postgres',
|
33
|
-
:user => 'root',
|
34
|
-
:password => 'navelrulez',
|
35
|
-
:name => 'test'
|
36
|
-
)
|
23
|
+
@og = Og.setup($og_config)
|
37
24
|
end
|
38
25
|
|
39
26
|
def test_all
|
data/test/og/tc_store.rb
CHANGED
@@ -1,9 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
$DBG = true
|
1
|
+
require File.join(File.dirname(__FILE__), 'CONFIG.rb')
|
4
2
|
|
5
3
|
require 'test/unit'
|
6
|
-
|
7
4
|
require 'og'
|
8
5
|
|
9
6
|
class TCOgStore < Test::Unit::TestCase # :nodoc: all
|
@@ -77,67 +74,11 @@ class TCOgStore < Test::Unit::TestCase # :nodoc: all
|
|
77
74
|
@og = nil
|
78
75
|
end
|
79
76
|
|
80
|
-
|
81
|
-
|
82
|
-
@og = Og.setup(
|
83
|
-
:destroy => true,
|
84
|
-
:store => :kirby,
|
85
|
-
:name => 'test',
|
86
|
-
:embedded => true
|
87
|
-
)
|
77
|
+
def test_og
|
78
|
+
@og = Og.setup($og_config)
|
88
79
|
features_test
|
89
80
|
# conversions_test
|
90
81
|
end
|
91
|
-
=end
|
92
|
-
=begin
|
93
|
-
def test_psql
|
94
|
-
@og = Og.setup(
|
95
|
-
:destroy => true,
|
96
|
-
:store => :psql,
|
97
|
-
:name => 'test',
|
98
|
-
:min_messages => 'ERROR',
|
99
|
-
:user => 'postgres',
|
100
|
-
:password => 'navelrulez'
|
101
|
-
)
|
102
|
-
features_test
|
103
|
-
conversions_test
|
104
|
-
end
|
105
|
-
=end
|
106
|
-
=begin
|
107
|
-
def test_mysql
|
108
|
-
@og = Og.setup(
|
109
|
-
:destroy => true,
|
110
|
-
:store => :mysql,
|
111
|
-
:name => 'test',
|
112
|
-
:user => 'root',
|
113
|
-
:table_type => 'InnoDB',
|
114
|
-
:password => 'navelrulez'
|
115
|
-
)
|
116
|
-
features_test
|
117
|
-
# conversions_test
|
118
|
-
end
|
119
|
-
=end
|
120
|
-
#=begin
|
121
|
-
def test_sqlite
|
122
|
-
@og = Og.setup(
|
123
|
-
:destroy => true,
|
124
|
-
:store => :sqlite,
|
125
|
-
:name => 'test'
|
126
|
-
)
|
127
|
-
features_test
|
128
|
-
conversions_test
|
129
|
-
end
|
130
|
-
#=end
|
131
|
-
=begin
|
132
|
-
def test_memory
|
133
|
-
@og = Og.setup(
|
134
|
-
:store => :memory,
|
135
|
-
:name => :test,
|
136
|
-
:destroy => true
|
137
|
-
)
|
138
|
-
features_test
|
139
|
-
end
|
140
|
-
=end
|
141
82
|
|
142
83
|
def features_test
|
143
84
|
u = User.create('gmosx')
|
@@ -351,7 +292,7 @@ class TCOgStore < Test::Unit::TestCase # :nodoc: all
|
|
351
292
|
a = Article.create
|
352
293
|
a.owner = nil
|
353
294
|
|
354
|
-
assert_equal 1, $schema_after
|
295
|
+
# assert_equal 1, $schema_after
|
355
296
|
end
|
356
297
|
|
357
298
|
def conversions_test
|
data/test/og/tc_types.rb
CHANGED
metadata
CHANGED
@@ -1,126 +1,129 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.10
|
3
3
|
specification_version: 1
|
4
4
|
name: og
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2005-
|
8
|
-
summary:
|
6
|
+
version: 0.24.0
|
7
|
+
date: 2005-10-28
|
8
|
+
summary: State of the art object-relational mapping system.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: gm@navel.gr
|
12
12
|
homepage: http://www.nitrohq.com
|
13
13
|
rubyforge_project: nitro
|
14
|
-
description:
|
15
|
-
autorequire:
|
14
|
+
description:
|
15
|
+
autorequire:
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
|
-
has_rdoc:
|
18
|
+
has_rdoc: false
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
21
|
-
|
22
|
-
- "
|
22
|
+
- ">"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
24
|
+
version: 0.0.0
|
25
25
|
version:
|
26
26
|
platform: ruby
|
27
|
-
signing_key:
|
28
|
-
cert_chain:
|
29
27
|
authors:
|
30
28
|
- George Moschovitis
|
31
29
|
files:
|
32
|
-
-
|
33
|
-
-
|
30
|
+
- benchmark
|
31
|
+
- doc
|
32
|
+
- examples
|
34
33
|
- INSTALL
|
35
34
|
- install.rb
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
35
|
+
- lib
|
36
|
+
- ProjectInfo
|
37
|
+
- Rakefile
|
38
|
+
- README
|
39
|
+
- test
|
40
40
|
- benchmark/bench.rb
|
41
|
-
-
|
42
|
-
-
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- doc/config.txt
|
46
|
-
- doc/RELEASES
|
47
|
-
- doc/LICENSE
|
41
|
+
- benchmark/sqlite-no-prepare.1.txt
|
42
|
+
- benchmark/sqlite-no-prepare.2.txt
|
43
|
+
- benchmark/sqlite-prepare.1.txt
|
44
|
+
- benchmark/sqlite-prepare.2.txt
|
48
45
|
- doc/AUTHORS
|
49
46
|
- doc/CHANGELOG.1
|
47
|
+
- doc/config.txt
|
48
|
+
- doc/LICENSE
|
49
|
+
- doc/RELEASES
|
50
|
+
- doc/tutorial.txt
|
51
|
+
- examples/mysql_to_psql.rb
|
52
|
+
- examples/README
|
53
|
+
- examples/run.rb
|
50
54
|
- lib/og
|
51
|
-
- lib/vendor
|
52
55
|
- lib/og.rb
|
56
|
+
- lib/vendor
|
57
|
+
- lib/og/collection.rb
|
58
|
+
- lib/og/entity.rb
|
59
|
+
- lib/og/errors.rb
|
60
|
+
- lib/og/evolution.rb
|
61
|
+
- lib/og/manager.rb
|
53
62
|
- lib/og/mixin
|
54
63
|
- lib/og/relation
|
64
|
+
- lib/og/relation.rb
|
55
65
|
- lib/og/store
|
66
|
+
- lib/og/store.rb
|
56
67
|
- lib/og/test
|
57
|
-
- lib/og/validation.rb
|
58
|
-
- lib/og/types.rb
|
59
68
|
- lib/og/test.rb
|
60
|
-
- lib/og/
|
61
|
-
- lib/og/
|
62
|
-
- lib/og/manager.rb
|
63
|
-
- lib/og/errors.rb
|
64
|
-
- lib/og/entity.rb
|
65
|
-
- lib/og/collection.rb
|
66
|
-
- lib/og/mixin/tree.rb
|
67
|
-
- lib/og/mixin/timestamped.rb
|
68
|
-
- lib/og/mixin/orderable.rb
|
69
|
-
- lib/og/mixin/optimistic_locking.rb
|
69
|
+
- lib/og/types.rb
|
70
|
+
- lib/og/validation.rb
|
70
71
|
- lib/og/mixin/hierarchical.rb
|
71
|
-
- lib/og/mixin/
|
72
|
+
- lib/og/mixin/optimistic_locking.rb
|
73
|
+
- lib/og/mixin/orderable.rb
|
72
74
|
- lib/og/mixin/revisable.rb
|
73
|
-
- lib/og/
|
74
|
-
- lib/og/
|
75
|
-
- lib/og/
|
76
|
-
- lib/og/
|
77
|
-
- lib/og/relation/
|
75
|
+
- lib/og/mixin/schema_inheritance_base.rb
|
76
|
+
- lib/og/mixin/taggable.rb
|
77
|
+
- lib/og/mixin/timestamped.rb
|
78
|
+
- lib/og/mixin/tree.rb
|
79
|
+
- lib/og/relation/all.rb
|
78
80
|
- lib/og/relation/belongs_to.rb
|
79
|
-
- lib/og/
|
80
|
-
- lib/og/
|
81
|
-
- lib/og/
|
82
|
-
- lib/og/
|
83
|
-
- lib/og/
|
84
|
-
- lib/og/store/
|
81
|
+
- lib/og/relation/has_many.rb
|
82
|
+
- lib/og/relation/has_one.rb
|
83
|
+
- lib/og/relation/joins_many.rb
|
84
|
+
- lib/og/relation/many_to_many.rb
|
85
|
+
- lib/og/relation/refers_to.rb
|
86
|
+
- lib/og/store/alpha
|
85
87
|
- lib/og/store/kirby.rb
|
86
|
-
- lib/og/store/
|
87
|
-
- lib/og/
|
88
|
+
- lib/og/store/mysql.rb
|
89
|
+
- lib/og/store/psql.rb
|
90
|
+
- lib/og/store/sql.rb
|
91
|
+
- lib/og/store/sqlite.rb
|
92
|
+
- lib/og/store/alpha/filesys.rb
|
93
|
+
- lib/og/store/alpha/kirby.rb
|
94
|
+
- lib/og/store/alpha/memory.rb
|
95
|
+
- lib/og/store/alpha/sqlserver.rb
|
88
96
|
- lib/og/test/assertions.rb
|
89
|
-
- lib/
|
90
|
-
- lib/vendor/
|
97
|
+
- lib/og/test/testcase.rb
|
98
|
+
- lib/vendor/kbserver.rb
|
91
99
|
- lib/vendor/kirbybase.rb
|
100
|
+
- lib/vendor/mysql.rb
|
101
|
+
- lib/vendor/mysql411.rb
|
92
102
|
- lib/vendor/README
|
93
103
|
- test/og
|
104
|
+
- test/og/CONFIG.rb
|
94
105
|
- test/og/mixin
|
95
106
|
- test/og/store
|
96
|
-
- test/og/
|
97
|
-
- test/og/tc_store.rb
|
98
|
-
- test/og/tc_select.rb
|
99
|
-
- test/og/tc_reverse.rb
|
100
|
-
- test/og/tc_relation.rb
|
101
|
-
- test/og/tc_polymorphic.rb
|
102
|
-
- test/og/tc_override.rb
|
103
|
-
- test/og/tc_multiple.rb
|
104
|
-
- test/og/tc_join.rb
|
107
|
+
- test/og/tc_delete_all.rb
|
105
108
|
- test/og/tc_inheritance.rb
|
106
|
-
- test/og/
|
107
|
-
- test/og/
|
108
|
-
- test/og/
|
109
|
+
- test/og/tc_join.rb
|
110
|
+
- test/og/tc_multiple.rb
|
111
|
+
- test/og/tc_override.rb
|
112
|
+
- test/og/tc_polymorphic.rb
|
113
|
+
- test/og/tc_relation.rb
|
114
|
+
- test/og/tc_reverse.rb
|
115
|
+
- test/og/tc_select.rb
|
116
|
+
- test/og/tc_store.rb
|
117
|
+
- test/og/tc_types.rb
|
109
118
|
- test/og/mixin/tc_hierarchical.rb
|
119
|
+
- test/og/mixin/tc_optimistic_locking.rb
|
120
|
+
- test/og/mixin/tc_orderable.rb
|
110
121
|
- test/og/mixin/tc_taggable.rb
|
122
|
+
- test/og/mixin/tc_timestamped.rb
|
111
123
|
- test/og/store/tc_filesys.rb
|
112
124
|
test_files: []
|
113
|
-
rdoc_options:
|
114
|
-
|
115
|
-
- README
|
116
|
-
- "--title"
|
117
|
-
- Og Documentation
|
118
|
-
- "--all"
|
119
|
-
- "--inline-source"
|
120
|
-
extra_rdoc_files:
|
121
|
-
- README
|
122
|
-
- INSTALL
|
123
|
-
- doc/tutorial.txt
|
125
|
+
rdoc_options: []
|
126
|
+
extra_rdoc_files: []
|
124
127
|
executables: []
|
125
128
|
extensions: []
|
126
129
|
requirements: []
|
@@ -133,5 +136,5 @@ dependencies:
|
|
133
136
|
-
|
134
137
|
- "="
|
135
138
|
- !ruby/object:Gem::Version
|
136
|
-
version: 0.
|
139
|
+
version: 0.24.0
|
137
140
|
version:
|