Rubernate 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,42 @@
1
+ $:.unshift(File.expand_path('../..', __FILE__)) unless
2
+ $:.include?(File.expand_path('../..', __FILE__))
3
+
4
+ require 'rubernate/fixtures'
5
+
6
+ class C1
7
+ class C2; end
8
+ module M1
9
+ class C3 < C2; end
10
+ end
11
+ end
12
+
13
+ module M2
14
+ class C1 < ::C1; end
15
+ end
16
+
17
+ class UtilsTest < Test::Unit::TestCase
18
+
19
+ def setup
20
+ @classes = [C1, C1::C2, C1::M1::C3, M2::C1]
21
+ end
22
+
23
+ def test_find_class
24
+ assert_nil Module.find_class('C2')
25
+ assert_nil Module.find_class('M2::C2')
26
+
27
+ assert_equal C1, Module.find_class('C1')
28
+ assert_equal C1::C2, Module.find_class('C1::C2')
29
+ assert_equal C1::M1::C3, Module.find_class('C1::M1::C3')
30
+ assert_equal M2::C1, Module.find_class('M2::C1')
31
+ end
32
+
33
+ def test_find_all
34
+ result = []
35
+ Module.find_all {|klass| result << klass if @classes.index klass}
36
+ assert @classes.to_set, result.to_set
37
+ end
38
+
39
+ def test_derived
40
+ assert_equal ['M2::C1'], C1.subclasses
41
+ end
42
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: Rubernate
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.1.0
7
+ date: 2006-03-06 00:00:00 +03:00
8
+ summary: Object-oriented storage for Ruby objects based on relational database model
9
+ require_paths:
10
+ - lib
11
+ email: andrey_ryabov@bk.ru
12
+ homepage: http://rubernate.rubyforge.org
13
+ rubyforge_project:
14
+ description:
15
+ autorequire: rubernate
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors:
29
+ - Andrey Ryabov
30
+ files:
31
+ - db/mysql.sql
32
+ - db/oracle.sql
33
+ - lib/rubernate
34
+ - lib/rubernate.rb
35
+ - lib/rubernate/callbacks.rb
36
+ - lib/rubernate/entity.rb
37
+ - lib/rubernate/impl
38
+ - lib/rubernate/mixins.rb
39
+ - lib/rubernate/peer.rb
40
+ - lib/rubernate/queries.rb
41
+ - lib/rubernate/runtime.rb
42
+ - lib/rubernate/impl/dbigeneric.rb
43
+ - lib/rubernate/impl/dbimysql.rb
44
+ - lib/rubernate/impl/dbioracle.rb
45
+ - lib/rubernate/impl/memory.rb
46
+ - tests/all_tests.rb
47
+ - tests/config.rb
48
+ - tests/README
49
+ - tests/rubernate
50
+ - tests/rubernate/callbacks_test.rb
51
+ - tests/rubernate/fixtures.rb
52
+ - tests/rubernate/impl
53
+ - tests/rubernate/queries_test.rb
54
+ - tests/rubernate/rubernate_test.rb
55
+ - tests/rubernate/utils_test.rb
56
+ - tests/rubernate/impl/dbigeneric_stub.rb
57
+ - tests/rubernate/impl/dbimysql_test.rb
58
+ - tests/rubernate/impl/dbioracle_test.rb
59
+ - tests/rubernate/impl/memory_test.rb
60
+ - README
61
+ test_files:
62
+ - tests/all_tests.rb
63
+ rdoc_options: []
64
+
65
+ extra_rdoc_files:
66
+ - README
67
+ executables: []
68
+
69
+ extensions: []
70
+
71
+ requirements: []
72
+
73
+ dependencies: []
74
+