activerecord 1.15.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of activerecord might be problematic. Click here for more details.
- data/CHANGELOG +2454 -34
- data/README +1 -1
- data/RUNNING_UNIT_TESTS +3 -34
- data/Rakefile +98 -77
- data/install.rb +1 -1
- data/lib/active_record.rb +13 -22
- data/lib/active_record/aggregations.rb +38 -49
- data/lib/active_record/associations.rb +452 -333
- data/lib/active_record/associations/association_collection.rb +66 -20
- data/lib/active_record/associations/association_proxy.rb +9 -8
- data/lib/active_record/associations/has_and_belongs_to_many_association.rb +46 -51
- data/lib/active_record/associations/has_many_association.rb +21 -57
- data/lib/active_record/associations/has_many_through_association.rb +38 -18
- data/lib/active_record/associations/has_one_association.rb +30 -14
- data/lib/active_record/attribute_methods.rb +253 -0
- data/lib/active_record/base.rb +719 -494
- data/lib/active_record/calculations.rb +62 -63
- data/lib/active_record/callbacks.rb +57 -83
- data/lib/active_record/connection_adapters/abstract/connection_specification.rb +38 -9
- data/lib/active_record/connection_adapters/abstract/database_statements.rb +56 -15
- data/lib/active_record/connection_adapters/abstract/query_cache.rb +87 -0
- data/lib/active_record/connection_adapters/abstract/quoting.rb +23 -12
- data/lib/active_record/connection_adapters/abstract/schema_definitions.rb +191 -62
- data/lib/active_record/connection_adapters/abstract/schema_statements.rb +37 -34
- data/lib/active_record/connection_adapters/abstract_adapter.rb +28 -17
- data/lib/active_record/connection_adapters/mysql_adapter.rb +119 -37
- data/lib/active_record/connection_adapters/postgresql_adapter.rb +473 -210
- data/lib/active_record/connection_adapters/sqlite3_adapter.rb +34 -0
- data/lib/active_record/connection_adapters/sqlite_adapter.rb +91 -107
- data/lib/active_record/fixtures.rb +503 -113
- data/lib/active_record/locking/optimistic.rb +72 -34
- data/lib/active_record/migration.rb +80 -57
- data/lib/active_record/observer.rb +13 -10
- data/lib/active_record/query_cache.rb +16 -57
- data/lib/active_record/reflection.rb +35 -38
- data/lib/active_record/schema.rb +5 -5
- data/lib/active_record/schema_dumper.rb +35 -13
- data/lib/active_record/serialization.rb +98 -0
- data/lib/active_record/serializers/json_serializer.rb +71 -0
- data/lib/active_record/{xml_serialization.rb → serializers/xml_serializer.rb} +90 -83
- data/lib/active_record/timestamp.rb +20 -21
- data/lib/active_record/transactions.rb +39 -43
- data/lib/active_record/validations.rb +256 -107
- data/lib/active_record/version.rb +3 -3
- data/lib/activerecord.rb +1 -0
- data/test/aaa_create_tables_test.rb +15 -2
- data/test/abstract_unit.rb +24 -17
- data/test/active_schema_test_mysql.rb +20 -8
- data/test/adapter_test.rb +23 -5
- data/test/adapter_test_sqlserver.rb +15 -1
- data/test/aggregations_test.rb +16 -1
- data/test/all.sh +2 -2
- data/test/associations/ar_joins_test.rb +0 -0
- data/test/associations/callbacks_test.rb +51 -30
- data/test/associations/cascaded_eager_loading_test.rb +1 -29
- data/test/associations/eager_singularization_test.rb +145 -0
- data/test/associations/eager_test.rb +42 -6
- data/test/associations/extension_test.rb +6 -1
- data/test/associations/inner_join_association_test.rb +88 -0
- data/test/associations/join_model_test.rb +47 -16
- data/test/associations_test.rb +449 -226
- data/test/attribute_methods_test.rb +97 -0
- data/test/base_test.rb +251 -105
- data/test/binary_test.rb +22 -27
- data/test/calculations_test.rb +37 -5
- data/test/callbacks_test.rb +23 -0
- data/test/connection_test_firebird.rb +2 -2
- data/test/connection_test_mysql.rb +30 -0
- data/test/connections/native_mysql/connection.rb +3 -0
- data/test/connections/native_sqlite/connection.rb +5 -14
- data/test/connections/native_sqlite3/connection.rb +5 -14
- data/test/connections/native_sqlite3/in_memory_connection.rb +1 -1
- data/test/{copy_table_sqlite.rb → copy_table_test_sqlite.rb} +8 -3
- data/test/datatype_test_postgresql.rb +178 -27
- data/test/{empty_date_time_test.rb → date_time_test.rb} +13 -1
- data/test/defaults_test.rb +8 -1
- data/test/deprecated_finder_test.rb +7 -128
- data/test/finder_test.rb +192 -54
- data/test/fixtures/all/developers.yml +0 -0
- data/test/fixtures/all/people.csv +0 -0
- data/test/fixtures/all/tasks.yml +0 -0
- data/test/fixtures/author.rb +12 -5
- data/test/fixtures/binaries.yml +130 -435
- data/test/fixtures/category.rb +6 -0
- data/test/fixtures/company.rb +8 -1
- data/test/fixtures/computer.rb +1 -0
- data/test/fixtures/contact.rb +16 -0
- data/test/fixtures/customer.rb +2 -2
- data/test/fixtures/db_definitions/db2.drop.sql +1 -0
- data/test/fixtures/db_definitions/db2.sql +4 -0
- data/test/fixtures/db_definitions/firebird.drop.sql +3 -1
- data/test/fixtures/db_definitions/firebird.sql +6 -0
- data/test/fixtures/db_definitions/frontbase.drop.sql +1 -0
- data/test/fixtures/db_definitions/frontbase.sql +5 -0
- data/test/fixtures/db_definitions/openbase.sql +41 -25
- data/test/fixtures/db_definitions/oracle.drop.sql +2 -0
- data/test/fixtures/db_definitions/oracle.sql +5 -0
- data/test/fixtures/db_definitions/postgresql.drop.sql +7 -0
- data/test/fixtures/db_definitions/postgresql.sql +87 -58
- data/test/fixtures/db_definitions/postgresql2.sql +1 -2
- data/test/fixtures/db_definitions/schema.rb +280 -0
- data/test/fixtures/db_definitions/schema2.rb +11 -0
- data/test/fixtures/db_definitions/sqlite.drop.sql +1 -0
- data/test/fixtures/db_definitions/sqlite.sql +4 -0
- data/test/fixtures/db_definitions/sybase.drop.sql +1 -0
- data/test/fixtures/db_definitions/sybase.sql +4 -0
- data/test/fixtures/developer.rb +10 -0
- data/test/fixtures/example.log +1 -0
- data/test/fixtures/flowers.jpg +0 -0
- data/test/fixtures/item.rb +7 -0
- data/test/fixtures/items.yml +4 -0
- data/test/fixtures/joke.rb +0 -3
- data/test/fixtures/matey.rb +4 -0
- data/test/fixtures/mateys.yml +4 -0
- data/test/fixtures/minimalistic.rb +2 -0
- data/test/fixtures/minimalistics.yml +2 -0
- data/test/fixtures/mixins.yml +2 -100
- data/test/fixtures/parrot.rb +13 -0
- data/test/fixtures/parrots.yml +27 -0
- data/test/fixtures/parrots_pirates.yml +7 -0
- data/test/fixtures/pirate.rb +5 -0
- data/test/fixtures/pirates.yml +9 -0
- data/test/fixtures/post.rb +1 -0
- data/test/fixtures/project.rb +3 -2
- data/test/fixtures/reserved_words/distinct.yml +5 -0
- data/test/fixtures/reserved_words/distincts_selects.yml +11 -0
- data/test/fixtures/reserved_words/group.yml +14 -0
- data/test/fixtures/reserved_words/select.yml +8 -0
- data/test/fixtures/reserved_words/values.yml +7 -0
- data/test/fixtures/ship.rb +3 -0
- data/test/fixtures/ships.yml +5 -0
- data/test/fixtures/tagging.rb +4 -0
- data/test/fixtures/taggings.yml +8 -1
- data/test/fixtures/topic.rb +13 -1
- data/test/fixtures/treasure.rb +4 -0
- data/test/fixtures/treasures.yml +10 -0
- data/test/fixtures_test.rb +205 -24
- data/test/inheritance_test.rb +7 -1
- data/test/json_serialization_test.rb +180 -0
- data/test/lifecycle_test.rb +1 -1
- data/test/locking_test.rb +85 -2
- data/test/migration_test.rb +206 -40
- data/test/mixin_test.rb +13 -515
- data/test/pk_test.rb +3 -6
- data/test/query_cache_test.rb +104 -0
- data/test/reflection_test.rb +16 -0
- data/test/reserved_word_test_mysql.rb +177 -0
- data/test/schema_dumper_test.rb +38 -3
- data/test/serialization_test.rb +47 -0
- data/test/transactions_test.rb +74 -23
- data/test/unconnected_test.rb +1 -1
- data/test/validations_test.rb +322 -32
- data/test/xml_serialization_test.rb +121 -44
- metadata +48 -41
- data/examples/associations.rb +0 -87
- data/examples/shared_setup.rb +0 -15
- data/examples/validation.rb +0 -85
- data/lib/active_record/acts/list.rb +0 -256
- data/lib/active_record/acts/nested_set.rb +0 -211
- data/lib/active_record/acts/tree.rb +0 -96
- data/lib/active_record/connection_adapters/db2_adapter.rb +0 -228
- data/lib/active_record/connection_adapters/firebird_adapter.rb +0 -728
- data/lib/active_record/connection_adapters/frontbase_adapter.rb +0 -861
- data/lib/active_record/connection_adapters/openbase_adapter.rb +0 -350
- data/lib/active_record/connection_adapters/oracle_adapter.rb +0 -690
- data/lib/active_record/connection_adapters/sqlserver_adapter.rb +0 -591
- data/lib/active_record/connection_adapters/sybase_adapter.rb +0 -662
- data/lib/active_record/deprecated_associations.rb +0 -104
- data/lib/active_record/deprecated_finders.rb +0 -44
- data/lib/active_record/vendor/simple.rb +0 -693
- data/lib/active_record/wrappers/yaml_wrapper.rb +0 -15
- data/lib/active_record/wrappings.rb +0 -58
- data/test/connections/native_sqlserver/connection.rb +0 -23
- data/test/connections/native_sqlserver_odbc/connection.rb +0 -25
- data/test/deprecated_associations_test.rb +0 -396
- data/test/fixtures/db_definitions/mysql.drop.sql +0 -32
- data/test/fixtures/db_definitions/mysql.sql +0 -234
- data/test/fixtures/db_definitions/mysql2.drop.sql +0 -2
- data/test/fixtures/db_definitions/mysql2.sql +0 -5
- data/test/fixtures/db_definitions/sqlserver.drop.sql +0 -34
- data/test/fixtures/db_definitions/sqlserver.sql +0 -243
- data/test/fixtures/db_definitions/sqlserver2.drop.sql +0 -2
- data/test/fixtures/db_definitions/sqlserver2.sql +0 -5
- data/test/fixtures/mixin.rb +0 -63
- data/test/mixin_nested_set_test.rb +0 -196
@@ -1,20 +1,9 @@
|
|
1
1
|
require 'abstract_unit'
|
2
|
+
require 'fixtures/contact'
|
2
3
|
require 'fixtures/post'
|
3
4
|
require 'fixtures/author'
|
4
|
-
|
5
|
-
|
6
|
-
# mock out self.columns so no pesky db is needed for these tests
|
7
|
-
def self.columns() @columns ||= []; end
|
8
|
-
def self.column(name, sql_type = nil, default = nil, null = true)
|
9
|
-
columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null)
|
10
|
-
end
|
11
|
-
|
12
|
-
column :name, :string
|
13
|
-
column :age, :integer
|
14
|
-
column :avatar, :binary
|
15
|
-
column :created_at, :datetime
|
16
|
-
column :awesome, :boolean
|
17
|
-
end
|
5
|
+
require 'fixtures/tagging'
|
6
|
+
require 'fixtures/comment'
|
18
7
|
|
19
8
|
class XmlSerializationTest < Test::Unit::TestCase
|
20
9
|
def test_should_serialize_default_root
|
@@ -22,19 +11,19 @@ class XmlSerializationTest < Test::Unit::TestCase
|
|
22
11
|
assert_match %r{^<contact>}, @xml
|
23
12
|
assert_match %r{</contact>$}, @xml
|
24
13
|
end
|
25
|
-
|
14
|
+
|
26
15
|
def test_should_serialize_default_root_with_namespace
|
27
16
|
@xml = Contact.new.to_xml :namespace=>"http://xml.rubyonrails.org/contact"
|
28
17
|
assert_match %r{^<contact xmlns="http://xml.rubyonrails.org/contact">}, @xml
|
29
18
|
assert_match %r{</contact>$}, @xml
|
30
19
|
end
|
31
|
-
|
20
|
+
|
32
21
|
def test_should_serialize_custom_root
|
33
22
|
@xml = Contact.new.to_xml :root => 'xml_contact'
|
34
23
|
assert_match %r{^<xml-contact>}, @xml
|
35
24
|
assert_match %r{</xml-contact>$}, @xml
|
36
25
|
end
|
37
|
-
|
26
|
+
|
38
27
|
def test_should_allow_undasherized_tags
|
39
28
|
@xml = Contact.new.to_xml :root => 'xml_contact', :dasherize => false
|
40
29
|
assert_match %r{^<xml_contact>}, @xml
|
@@ -42,45 +31,45 @@ class XmlSerializationTest < Test::Unit::TestCase
|
|
42
31
|
assert_match %r{<created_at}, @xml
|
43
32
|
end
|
44
33
|
|
45
|
-
def
|
46
|
-
@xml = Contact.new.to_xml
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
@xml = Contact.new.to_xml :except => [:age, :name]
|
52
|
-
assert_no_match %r{<name}, @xml
|
53
|
-
assert_no_match %r{<age}, @xml
|
54
|
-
assert_match %r{<created-at}, @xml
|
34
|
+
def test_should_include_yielded_additions
|
35
|
+
@xml = Contact.new.to_xml do |xml|
|
36
|
+
xml.creator "David"
|
37
|
+
end
|
38
|
+
|
39
|
+
assert_match %r{<creator>David</creator>}, @xml
|
55
40
|
end
|
56
41
|
end
|
57
42
|
|
58
43
|
class DefaultXmlSerializationTest < Test::Unit::TestCase
|
59
44
|
def setup
|
60
|
-
@xml = Contact.new(:name => 'aaron stack', :age => 25, :avatar => 'binarydata', :created_at => Time.utc(2006, 8, 1), :awesome => false).to_xml
|
45
|
+
@xml = Contact.new(:name => 'aaron stack', :age => 25, :avatar => 'binarydata', :created_at => Time.utc(2006, 8, 1), :awesome => false, :preferences => { :gem => 'ruby' }).to_xml
|
61
46
|
end
|
62
47
|
|
63
48
|
def test_should_serialize_string
|
64
49
|
assert_match %r{<name>aaron stack</name>}, @xml
|
65
50
|
end
|
66
|
-
|
51
|
+
|
67
52
|
def test_should_serialize_integer
|
68
53
|
assert_match %r{<age type="integer">25</age>}, @xml
|
69
54
|
end
|
70
|
-
|
55
|
+
|
71
56
|
def test_should_serialize_binary
|
72
57
|
assert_match %r{YmluYXJ5ZGF0YQ==\n</avatar>}, @xml
|
73
58
|
assert_match %r{<avatar(.*)(type="binary")}, @xml
|
74
59
|
assert_match %r{<avatar(.*)(encoding="base64")}, @xml
|
75
60
|
end
|
76
|
-
|
61
|
+
|
77
62
|
def test_should_serialize_datetime
|
78
63
|
assert_match %r{<created-at type=\"datetime\">2006-08-01T00:00:00Z</created-at>}, @xml
|
79
64
|
end
|
80
|
-
|
65
|
+
|
81
66
|
def test_should_serialize_boolean
|
82
67
|
assert_match %r{<awesome type=\"boolean\">false</awesome>}, @xml
|
83
68
|
end
|
69
|
+
|
70
|
+
def test_should_serialize_yaml
|
71
|
+
assert_match %r{<preferences type=\"yaml\">--- \n:gem: ruby\n</preferences>}, @xml
|
72
|
+
end
|
84
73
|
end
|
85
74
|
|
86
75
|
class NilXmlSerializationTest < Test::Unit::TestCase
|
@@ -89,32 +78,51 @@ class NilXmlSerializationTest < Test::Unit::TestCase
|
|
89
78
|
end
|
90
79
|
|
91
80
|
def test_should_serialize_string
|
92
|
-
assert_match %r{<name></name>}, @xml
|
81
|
+
assert_match %r{<name nil="true"></name>}, @xml
|
93
82
|
end
|
94
|
-
|
83
|
+
|
95
84
|
def test_should_serialize_integer
|
96
|
-
|
85
|
+
assert %r{<age (.*)></age>}.match(@xml)
|
86
|
+
attributes = $1
|
87
|
+
assert_match %r{nil="true"}, attributes
|
88
|
+
assert_match %r{type="integer"}, attributes
|
97
89
|
end
|
98
|
-
|
90
|
+
|
99
91
|
def test_should_serialize_binary
|
100
|
-
|
101
|
-
|
102
|
-
assert_match %r{
|
92
|
+
assert %r{<avatar (.*)></avatar>}.match(@xml)
|
93
|
+
attributes = $1
|
94
|
+
assert_match %r{type="binary"}, attributes
|
95
|
+
assert_match %r{encoding="base64"}, attributes
|
96
|
+
assert_match %r{nil="true"}, attributes
|
103
97
|
end
|
104
|
-
|
98
|
+
|
105
99
|
def test_should_serialize_datetime
|
106
|
-
|
100
|
+
assert %r{<created-at (.*)></created-at>}.match(@xml)
|
101
|
+
attributes = $1
|
102
|
+
assert_match %r{nil="true"}, attributes
|
103
|
+
assert_match %r{type="datetime"}, attributes
|
107
104
|
end
|
108
|
-
|
105
|
+
|
109
106
|
def test_should_serialize_boolean
|
110
|
-
|
107
|
+
assert %r{<awesome (.*)></awesome>}.match(@xml)
|
108
|
+
attributes = $1
|
109
|
+
assert_match %r{type="boolean"}, attributes
|
110
|
+
assert_match %r{nil="true"}, attributes
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_should_serialize_yaml
|
114
|
+
assert %r{<preferences(.*)></preferences>}.match(@xml)
|
115
|
+
attributes = $1
|
116
|
+
assert_match %r{type="yaml"}, attributes
|
117
|
+
assert_match %r{nil="true"}, attributes
|
111
118
|
end
|
112
119
|
end
|
113
120
|
|
114
121
|
class DatabaseConnectedXmlSerializationTest < Test::Unit::TestCase
|
115
122
|
fixtures :authors, :posts
|
116
123
|
# to_xml used to mess with the hash the user provided which
|
117
|
-
# caused the builder to be reused
|
124
|
+
# caused the builder to be reused. This meant the document kept
|
125
|
+
# getting appended to.
|
118
126
|
def test_passing_hash_shouldnt_reuse_builder
|
119
127
|
options = {:include=>:posts}
|
120
128
|
david = authors(:david)
|
@@ -122,4 +130,73 @@ class DatabaseConnectedXmlSerializationTest < Test::Unit::TestCase
|
|
122
130
|
second_xml_size = david.to_xml(options).size
|
123
131
|
assert_equal first_xml_size, second_xml_size
|
124
132
|
end
|
133
|
+
|
134
|
+
def test_include_uses_association_name
|
135
|
+
xml = authors(:david).to_xml :include=>:hello_posts, :indent => 0
|
136
|
+
assert_match %r{<hello-posts type="array">}, xml
|
137
|
+
assert_match %r{<hello-post type="Post">}, xml
|
138
|
+
assert_match %r{<hello-post type="StiPost">}, xml
|
139
|
+
end
|
140
|
+
|
141
|
+
def test_methods_are_called_on_object
|
142
|
+
xml = authors(:david).to_xml :methods => :label, :indent => 0
|
143
|
+
assert_match %r{<label>.*</label>}, xml
|
144
|
+
end
|
145
|
+
|
146
|
+
def test_should_not_call_methods_on_associations_that_dont_respond
|
147
|
+
xml = authors(:david).to_xml :include=>:hello_posts, :methods => :label, :indent => 2
|
148
|
+
assert !authors(:david).hello_posts.first.respond_to?(:label)
|
149
|
+
assert_match %r{^ <label>.*</label>}, xml
|
150
|
+
assert_no_match %r{^ <label>}, xml
|
151
|
+
end
|
152
|
+
|
153
|
+
def test_procs_are_called_on_object
|
154
|
+
proc = Proc.new { |options| options[:builder].tag!('nationality', 'Danish') }
|
155
|
+
xml = authors(:david).to_xml(:procs => [ proc ])
|
156
|
+
assert_match %r{<nationality>Danish</nationality>}, xml
|
157
|
+
end
|
158
|
+
|
159
|
+
def test_top_level_procs_arent_applied_to_associations
|
160
|
+
author_proc = Proc.new { |options| options[:builder].tag!('nationality', 'Danish') }
|
161
|
+
xml = authors(:david).to_xml(:procs => [ author_proc ], :include => :posts, :indent => 2)
|
162
|
+
|
163
|
+
assert_match %r{^ <nationality>Danish</nationality>}, xml
|
164
|
+
assert_no_match %r{^ {6}<nationality>Danish</nationality>}, xml
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_procs_on_included_associations_are_called
|
168
|
+
posts_proc = Proc.new { |options| options[:builder].tag!('copyright', 'DHH') }
|
169
|
+
xml = authors(:david).to_xml(
|
170
|
+
:indent => 2,
|
171
|
+
:include => {
|
172
|
+
:posts => { :procs => [ posts_proc ] }
|
173
|
+
}
|
174
|
+
)
|
175
|
+
|
176
|
+
assert_no_match %r{^ <copyright>DHH</copyright>}, xml
|
177
|
+
assert_match %r{^ {6}<copyright>DHH</copyright>}, xml
|
178
|
+
end
|
179
|
+
|
180
|
+
def test_should_include_empty_has_many_as_empty_array
|
181
|
+
authors(:david).posts.delete_all
|
182
|
+
xml = authors(:david).to_xml :include=>:posts, :indent => 2
|
183
|
+
|
184
|
+
assert_equal [], Hash.from_xml(xml)['author']['posts']
|
185
|
+
assert_match %r{^ <posts type="array"/>}, xml
|
186
|
+
end
|
187
|
+
|
188
|
+
def test_should_has_many_array_elements_should_include_type_when_different_from_guessed_value
|
189
|
+
xml = authors(:david).to_xml :include=>:posts_with_comments, :indent => 2
|
190
|
+
|
191
|
+
assert Hash.from_xml(xml)
|
192
|
+
assert_match %r{^ <posts-with-comments type="array">}, xml
|
193
|
+
assert_match %r{^ <posts-with-comment type="Post">}, xml
|
194
|
+
assert_match %r{^ <posts-with-comment type="StiPost">}, xml
|
195
|
+
|
196
|
+
types = Hash.from_xml(xml)['author']['posts_with_comments'].collect {|t| t['type'] }
|
197
|
+
assert types.include?('SpecialPost')
|
198
|
+
assert types.include?('Post')
|
199
|
+
assert types.include?('StiPost')
|
200
|
+
end
|
201
|
+
|
125
202
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: activerecord
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version:
|
7
|
-
date: 2007-
|
6
|
+
version: 2.0.0
|
7
|
+
date: 2007-12-06 00:00:00 -06:00
|
8
8
|
summary: Implements the ActiveRecord pattern for ORM.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -35,10 +35,6 @@ files:
|
|
35
35
|
- RUNNING_UNIT_TESTS
|
36
36
|
- CHANGELOG
|
37
37
|
- lib/active_record
|
38
|
-
- lib/active_record/acts
|
39
|
-
- lib/active_record/acts/list.rb
|
40
|
-
- lib/active_record/acts/nested_set.rb
|
41
|
-
- lib/active_record/acts/tree.rb
|
42
38
|
- lib/active_record/aggregations.rb
|
43
39
|
- lib/active_record/associations
|
44
40
|
- lib/active_record/associations/association_collection.rb
|
@@ -58,22 +54,15 @@ files:
|
|
58
54
|
- lib/active_record/connection_adapters/abstract
|
59
55
|
- lib/active_record/connection_adapters/abstract/connection_specification.rb
|
60
56
|
- lib/active_record/connection_adapters/abstract/database_statements.rb
|
57
|
+
- lib/active_record/connection_adapters/abstract/query_cache.rb
|
61
58
|
- lib/active_record/connection_adapters/abstract/quoting.rb
|
62
59
|
- lib/active_record/connection_adapters/abstract/schema_definitions.rb
|
63
60
|
- lib/active_record/connection_adapters/abstract/schema_statements.rb
|
64
61
|
- lib/active_record/connection_adapters/abstract_adapter.rb
|
65
|
-
- lib/active_record/connection_adapters/db2_adapter.rb
|
66
|
-
- lib/active_record/connection_adapters/firebird_adapter.rb
|
67
|
-
- lib/active_record/connection_adapters/frontbase_adapter.rb
|
68
62
|
- lib/active_record/connection_adapters/mysql_adapter.rb
|
69
|
-
- lib/active_record/connection_adapters/openbase_adapter.rb
|
70
|
-
- lib/active_record/connection_adapters/oracle_adapter.rb
|
71
63
|
- lib/active_record/connection_adapters/postgresql_adapter.rb
|
64
|
+
- lib/active_record/connection_adapters/sqlite3_adapter.rb
|
72
65
|
- lib/active_record/connection_adapters/sqlite_adapter.rb
|
73
|
-
- lib/active_record/connection_adapters/sqlserver_adapter.rb
|
74
|
-
- lib/active_record/connection_adapters/sybase_adapter.rb
|
75
|
-
- lib/active_record/deprecated_associations.rb
|
76
|
-
- lib/active_record/deprecated_finders.rb
|
77
66
|
- lib/active_record/fixtures.rb
|
78
67
|
- lib/active_record/locking
|
79
68
|
- lib/active_record/locking/optimistic.rb
|
@@ -84,19 +73,19 @@ files:
|
|
84
73
|
- lib/active_record/reflection.rb
|
85
74
|
- lib/active_record/schema.rb
|
86
75
|
- lib/active_record/schema_dumper.rb
|
76
|
+
- lib/active_record/serialization.rb
|
77
|
+
- lib/active_record/serializers
|
78
|
+
- lib/active_record/serializers/json_serializer.rb
|
79
|
+
- lib/active_record/serializers/xml_serializer.rb
|
87
80
|
- lib/active_record/timestamp.rb
|
88
81
|
- lib/active_record/transactions.rb
|
89
82
|
- lib/active_record/validations.rb
|
90
83
|
- lib/active_record/vendor
|
91
84
|
- lib/active_record/vendor/db2.rb
|
92
85
|
- lib/active_record/vendor/mysql.rb
|
93
|
-
- lib/active_record/vendor/simple.rb
|
94
86
|
- lib/active_record/version.rb
|
95
|
-
- lib/active_record/wrappers
|
96
|
-
- lib/active_record/wrappers/yaml_wrapper.rb
|
97
|
-
- lib/active_record/wrappings.rb
|
98
|
-
- lib/active_record/xml_serialization.rb
|
99
87
|
- lib/active_record.rb
|
88
|
+
- lib/activerecord.rb
|
100
89
|
- test/aaa_create_tables_test.rb
|
101
90
|
- test/abstract_unit.rb
|
102
91
|
- test/active_schema_test_mysql.rb
|
@@ -107,10 +96,13 @@ files:
|
|
107
96
|
- test/ar_schema_test.rb
|
108
97
|
- test/association_inheritance_reload.rb
|
109
98
|
- test/associations
|
99
|
+
- test/associations/ar_joins_test.rb
|
110
100
|
- test/associations/callbacks_test.rb
|
111
101
|
- test/associations/cascaded_eager_loading_test.rb
|
102
|
+
- test/associations/eager_singularization_test.rb
|
112
103
|
- test/associations/eager_test.rb
|
113
104
|
- test/associations/extension_test.rb
|
105
|
+
- test/associations/inner_join_association_test.rb
|
114
106
|
- test/associations/join_model_test.rb
|
115
107
|
- test/associations_test.rb
|
116
108
|
- test/attribute_methods_test.rb
|
@@ -121,6 +113,7 @@ files:
|
|
121
113
|
- test/class_inheritable_attributes_test.rb
|
122
114
|
- test/column_alias_test.rb
|
123
115
|
- test/connection_test_firebird.rb
|
116
|
+
- test/connection_test_mysql.rb
|
124
117
|
- test/connections
|
125
118
|
- test/connections/native_db2
|
126
119
|
- test/connections/native_db2/connection.rb
|
@@ -141,22 +134,21 @@ files:
|
|
141
134
|
- test/connections/native_sqlite3
|
142
135
|
- test/connections/native_sqlite3/connection.rb
|
143
136
|
- test/connections/native_sqlite3/in_memory_connection.rb
|
144
|
-
- test/connections/native_sqlserver
|
145
|
-
- test/connections/native_sqlserver/connection.rb
|
146
|
-
- test/connections/native_sqlserver_odbc
|
147
|
-
- test/connections/native_sqlserver_odbc/connection.rb
|
148
137
|
- test/connections/native_sybase
|
149
138
|
- test/connections/native_sybase/connection.rb
|
150
|
-
- test/
|
139
|
+
- test/copy_table_test_sqlite.rb
|
151
140
|
- test/datatype_test_postgresql.rb
|
141
|
+
- test/date_time_test.rb
|
152
142
|
- test/default_test_firebird.rb
|
153
143
|
- test/defaults_test.rb
|
154
|
-
- test/deprecated_associations_test.rb
|
155
144
|
- test/deprecated_finder_test.rb
|
156
|
-
- test/empty_date_time_test.rb
|
157
145
|
- test/finder_test.rb
|
158
146
|
- test/fixtures
|
159
147
|
- test/fixtures/accounts.yml
|
148
|
+
- test/fixtures/all
|
149
|
+
- test/fixtures/all/developers.yml
|
150
|
+
- test/fixtures/all/people.csv
|
151
|
+
- test/fixtures/all/tasks.yml
|
160
152
|
- test/fixtures/author.rb
|
161
153
|
- test/fixtures/author_favorites.yml
|
162
154
|
- test/fixtures/authors.yml
|
@@ -190,6 +182,7 @@ files:
|
|
190
182
|
- test/fixtures/company_in_module.rb
|
191
183
|
- test/fixtures/computer.rb
|
192
184
|
- test/fixtures/computers.yml
|
185
|
+
- test/fixtures/contact.rb
|
193
186
|
- test/fixtures/course.rb
|
194
187
|
- test/fixtures/courses.yml
|
195
188
|
- test/fixtures/customer.rb
|
@@ -207,10 +200,6 @@ files:
|
|
207
200
|
- test/fixtures/db_definitions/frontbase.sql
|
208
201
|
- test/fixtures/db_definitions/frontbase2.drop.sql
|
209
202
|
- test/fixtures/db_definitions/frontbase2.sql
|
210
|
-
- test/fixtures/db_definitions/mysql.drop.sql
|
211
|
-
- test/fixtures/db_definitions/mysql.sql
|
212
|
-
- test/fixtures/db_definitions/mysql2.drop.sql
|
213
|
-
- test/fixtures/db_definitions/mysql2.sql
|
214
203
|
- test/fixtures/db_definitions/openbase.drop.sql
|
215
204
|
- test/fixtures/db_definitions/openbase.sql
|
216
205
|
- test/fixtures/db_definitions/openbase2.drop.sql
|
@@ -224,14 +213,11 @@ files:
|
|
224
213
|
- test/fixtures/db_definitions/postgresql2.drop.sql
|
225
214
|
- test/fixtures/db_definitions/postgresql2.sql
|
226
215
|
- test/fixtures/db_definitions/schema.rb
|
216
|
+
- test/fixtures/db_definitions/schema2.rb
|
227
217
|
- test/fixtures/db_definitions/sqlite.drop.sql
|
228
218
|
- test/fixtures/db_definitions/sqlite.sql
|
229
219
|
- test/fixtures/db_definitions/sqlite2.drop.sql
|
230
220
|
- test/fixtures/db_definitions/sqlite2.sql
|
231
|
-
- test/fixtures/db_definitions/sqlserver.drop.sql
|
232
|
-
- test/fixtures/db_definitions/sqlserver.sql
|
233
|
-
- test/fixtures/db_definitions/sqlserver2.drop.sql
|
234
|
-
- test/fixtures/db_definitions/sqlserver2.sql
|
235
221
|
- test/fixtures/db_definitions/sybase.drop.sql
|
236
222
|
- test/fixtures/db_definitions/sybase.sql
|
237
223
|
- test/fixtures/db_definitions/sybase2.drop.sql
|
@@ -248,14 +234,19 @@ files:
|
|
248
234
|
- test/fixtures/edges.yml
|
249
235
|
- test/fixtures/entrant.rb
|
250
236
|
- test/fixtures/entrants.yml
|
237
|
+
- test/fixtures/example.log
|
251
238
|
- test/fixtures/fk_test_has_fk.yml
|
252
239
|
- test/fixtures/fk_test_has_pk.yml
|
253
240
|
- test/fixtures/flowers.jpg
|
254
241
|
- test/fixtures/funny_jokes.yml
|
242
|
+
- test/fixtures/item.rb
|
243
|
+
- test/fixtures/items.yml
|
255
244
|
- test/fixtures/joke.rb
|
256
245
|
- test/fixtures/keyboard.rb
|
257
246
|
- test/fixtures/legacy_thing.rb
|
258
247
|
- test/fixtures/legacy_things.yml
|
248
|
+
- test/fixtures/matey.rb
|
249
|
+
- test/fixtures/mateys.yml
|
259
250
|
- test/fixtures/migrations
|
260
251
|
- test/fixtures/migrations/1_people_have_last_names.rb
|
261
252
|
- test/fixtures/migrations/2_we_need_reminders.rb
|
@@ -272,9 +263,10 @@ files:
|
|
272
263
|
- test/fixtures/migrations_with_missing_versions/1_people_have_last_names.rb
|
273
264
|
- test/fixtures/migrations_with_missing_versions/3_we_need_reminders.rb
|
274
265
|
- test/fixtures/migrations_with_missing_versions/4_innocent_jointable.rb
|
266
|
+
- test/fixtures/minimalistic.rb
|
267
|
+
- test/fixtures/minimalistics.yml
|
275
268
|
- test/fixtures/mixed_case_monkey.rb
|
276
269
|
- test/fixtures/mixed_case_monkeys.yml
|
277
|
-
- test/fixtures/mixin.rb
|
278
270
|
- test/fixtures/mixins.yml
|
279
271
|
- test/fixtures/movie.rb
|
280
272
|
- test/fixtures/movies.yml
|
@@ -286,8 +278,13 @@ files:
|
|
286
278
|
- test/fixtures/naked/yml/companies.yml
|
287
279
|
- test/fixtures/naked/yml/courses.yml
|
288
280
|
- test/fixtures/order.rb
|
281
|
+
- test/fixtures/parrot.rb
|
282
|
+
- test/fixtures/parrots.yml
|
283
|
+
- test/fixtures/parrots_pirates.yml
|
289
284
|
- test/fixtures/people.yml
|
290
285
|
- test/fixtures/person.rb
|
286
|
+
- test/fixtures/pirate.rb
|
287
|
+
- test/fixtures/pirates.yml
|
291
288
|
- test/fixtures/post.rb
|
292
289
|
- test/fixtures/posts.yml
|
293
290
|
- test/fixtures/project.rb
|
@@ -295,6 +292,14 @@ files:
|
|
295
292
|
- test/fixtures/reader.rb
|
296
293
|
- test/fixtures/readers.yml
|
297
294
|
- test/fixtures/reply.rb
|
295
|
+
- test/fixtures/reserved_words
|
296
|
+
- test/fixtures/reserved_words/distinct.yml
|
297
|
+
- test/fixtures/reserved_words/distincts_selects.yml
|
298
|
+
- test/fixtures/reserved_words/group.yml
|
299
|
+
- test/fixtures/reserved_words/select.yml
|
300
|
+
- test/fixtures/reserved_words/values.yml
|
301
|
+
- test/fixtures/ship.rb
|
302
|
+
- test/fixtures/ships.yml
|
298
303
|
- test/fixtures/subject.rb
|
299
304
|
- test/fixtures/subscriber.rb
|
300
305
|
- test/fixtures/subscribers
|
@@ -308,25 +313,30 @@ files:
|
|
308
313
|
- test/fixtures/tasks.yml
|
309
314
|
- test/fixtures/topic.rb
|
310
315
|
- test/fixtures/topics.yml
|
316
|
+
- test/fixtures/treasure.rb
|
317
|
+
- test/fixtures/treasures.yml
|
311
318
|
- test/fixtures/vertex.rb
|
312
319
|
- test/fixtures/vertices.yml
|
313
320
|
- test/fixtures_test.rb
|
314
321
|
- test/inheritance_test.rb
|
322
|
+
- test/json_serialization_test.rb
|
315
323
|
- test/lifecycle_test.rb
|
316
324
|
- test/locking_test.rb
|
317
325
|
- test/method_scoping_test.rb
|
318
326
|
- test/migration_test.rb
|
319
327
|
- test/migration_test_firebird.rb
|
320
|
-
- test/mixin_nested_set_test.rb
|
321
328
|
- test/mixin_test.rb
|
322
329
|
- test/modules_test.rb
|
323
330
|
- test/multiple_db_test.rb
|
324
331
|
- test/pk_test.rb
|
332
|
+
- test/query_cache_test.rb
|
325
333
|
- test/readonly_test.rb
|
326
334
|
- test/reflection_test.rb
|
335
|
+
- test/reserved_word_test_mysql.rb
|
327
336
|
- test/schema_authorization_test_postgresql.rb
|
328
337
|
- test/schema_dumper_test.rb
|
329
338
|
- test/schema_test_postgresql.rb
|
339
|
+
- test/serialization_test.rb
|
330
340
|
- test/synonym_test_oracle.rb
|
331
341
|
- test/table_name_test_sqlserver.rb
|
332
342
|
- test/threaded_connections_test.rb
|
@@ -335,9 +345,6 @@ files:
|
|
335
345
|
- test/validations_test.rb
|
336
346
|
- test/xml_serialization_test.rb
|
337
347
|
- examples/associations.png
|
338
|
-
- examples/associations.rb
|
339
|
-
- examples/shared_setup.rb
|
340
|
-
- examples/validation.rb
|
341
348
|
test_files: []
|
342
349
|
|
343
350
|
rdoc_options:
|
@@ -359,5 +366,5 @@ dependencies:
|
|
359
366
|
requirements:
|
360
367
|
- - "="
|
361
368
|
- !ruby/object:Gem::Version
|
362
|
-
version:
|
369
|
+
version: 2.0.0
|
363
370
|
version:
|