og 0.23.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/ProjectInfo +58 -0
  2. data/README +5 -4
  3. data/Rakefile +2 -2
  4. data/doc/AUTHORS +10 -7
  5. data/doc/RELEASES +108 -0
  6. data/lib/og.rb +1 -3
  7. data/lib/og/collection.rb +4 -4
  8. data/lib/og/entity.rb +96 -27
  9. data/lib/og/evolution.rb +78 -0
  10. data/lib/og/manager.rb +29 -32
  11. data/lib/og/mixin/hierarchical.rb +1 -1
  12. data/lib/og/mixin/optimistic_locking.rb +5 -8
  13. data/lib/og/mixin/orderable.rb +15 -2
  14. data/lib/og/mixin/schema_inheritance_base.rb +12 -0
  15. data/lib/og/mixin/taggable.rb +29 -25
  16. data/lib/og/mixin/timestamped.rb +4 -2
  17. data/lib/og/mixin/tree.rb +0 -1
  18. data/lib/og/relation.rb +161 -116
  19. data/lib/og/relation/all.rb +6 -0
  20. data/lib/og/relation/belongs_to.rb +4 -1
  21. data/lib/og/relation/has_many.rb +6 -5
  22. data/lib/og/relation/joins_many.rb +13 -12
  23. data/lib/og/relation/refers_to.rb +3 -3
  24. data/lib/og/store.rb +9 -9
  25. data/lib/og/store/{filesys.rb → alpha/filesys.rb} +0 -0
  26. data/lib/og/store/alpha/kirby.rb +284 -0
  27. data/lib/og/store/{memory.rb → alpha/memory.rb} +2 -0
  28. data/lib/og/store/{sqlserver.rb → alpha/sqlserver.rb} +6 -6
  29. data/lib/og/store/kirby.rb +145 -162
  30. data/lib/og/store/mysql.rb +58 -27
  31. data/lib/og/store/psql.rb +15 -13
  32. data/lib/og/store/sql.rb +136 -135
  33. data/lib/og/store/sqlite.rb +13 -12
  34. data/lib/og/validation.rb +2 -2
  35. data/lib/vendor/kbserver.rb +20 -0
  36. data/lib/vendor/kirbybase.rb +2790 -1601
  37. data/test/og/CONFIG.rb +79 -0
  38. data/test/og/mixin/tc_hierarchical.rb +1 -1
  39. data/test/og/mixin/tc_optimistic_locking.rb +1 -3
  40. data/test/og/mixin/tc_orderable.rb +42 -1
  41. data/test/og/mixin/tc_taggable.rb +1 -1
  42. data/test/og/mixin/tc_timestamped.rb +1 -1
  43. data/test/og/store/tc_filesys.rb +1 -2
  44. data/test/og/tc_delete_all.rb +45 -0
  45. data/test/og/tc_inheritance.rb +10 -38
  46. data/test/og/tc_join.rb +2 -11
  47. data/test/og/tc_multiple.rb +3 -16
  48. data/test/og/tc_override.rb +3 -3
  49. data/test/og/tc_polymorphic.rb +3 -13
  50. data/test/og/tc_relation.rb +8 -6
  51. data/test/og/tc_reverse.rb +2 -11
  52. data/test/og/tc_select.rb +2 -15
  53. data/test/og/tc_store.rb +4 -63
  54. data/test/og/tc_types.rb +1 -2
  55. metadata +80 -77
@@ -1,22 +1,13 @@
1
- $:.unshift File.join(File.dirname(__FILE__), 'lib')
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
 
@@ -1,9 +1,5 @@
1
- $:.unshift File.join(File.dirname(__FILE__), 'lib')
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
@@ -1,9 +1,6 @@
1
- $:.unshift File.join(File.dirname(__FILE__), 'lib')
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
- =begin
81
- def test_kirby
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
@@ -1,7 +1,6 @@
1
- $:.unshift File.join(File.dirname(__FILE__), 'lib')
1
+ require File.join(File.dirname(__FILE__), 'CONFIG.rb')
2
2
 
3
3
  require 'test/unit'
4
-
5
4
  require 'og'
6
5
 
7
6
  class TestCaseOgTypes < Test::Unit::TestCase # :nodoc: all
metadata CHANGED
@@ -1,126 +1,129 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.11
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.23.0
7
- date: 2005-08-31 00:00:00 +03:00
8
- summary: Og (ObjectGraph)
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: An efficient and transparent Object-Relational mapping library
15
- autorequire: og
14
+ description:
15
+ autorequire:
16
16
  default_executable:
17
17
  bindir: bin
18
- has_rdoc: true
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: 1.8.2
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
- - Rakefile
33
- - README
30
+ - benchmark
31
+ - doc
32
+ - examples
34
33
  - INSTALL
35
34
  - install.rb
36
- - benchmark/sqlite-prepare.2.txt
37
- - benchmark/sqlite-prepare.1.txt
38
- - benchmark/sqlite-no-prepare.2.txt
39
- - benchmark/sqlite-no-prepare.1.txt
35
+ - lib
36
+ - ProjectInfo
37
+ - Rakefile
38
+ - README
39
+ - test
40
40
  - benchmark/bench.rb
41
- - examples/run.rb
42
- - examples/mysql_to_psql.rb
43
- - examples/README
44
- - doc/tutorial.txt
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/store.rb
61
- - lib/og/relation.rb
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/taggable.rb
72
+ - lib/og/mixin/optimistic_locking.rb
73
+ - lib/og/mixin/orderable.rb
72
74
  - lib/og/mixin/revisable.rb
73
- - lib/og/relation/refers_to.rb
74
- - lib/og/relation/many_to_many.rb
75
- - lib/og/relation/joins_many.rb
76
- - lib/og/relation/has_one.rb
77
- - lib/og/relation/has_many.rb
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/store/sqlserver.rb
80
- - lib/og/store/sqlite.rb
81
- - lib/og/store/sql.rb
82
- - lib/og/store/psql.rb
83
- - lib/og/store/mysql.rb
84
- - lib/og/store/memory.rb
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/filesys.rb
87
- - lib/og/test/testcase.rb
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/vendor/mysql411.rb
90
- - lib/vendor/mysql.rb
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/tc_types.rb
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/mixin/tc_timestamped.rb
107
- - test/og/mixin/tc_orderable.rb
108
- - test/og/mixin/tc_optimistic_locking.rb
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
- - "--main"
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.23.0
139
+ version: 0.24.0
137
140
  version: