activerecord 2.3.12 → 2.3.14
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/Rakefile +1 -1
- data/lib/active_record/connection_adapters/mysql_adapter.rb +1 -1
- data/lib/active_record/connection_adapters/sqlite_adapter.rb +1 -1
- data/lib/active_record/validations.rb +0 -1
- data/lib/active_record/version.rb +1 -1
- data/test/cases/base_test.rb +17 -0
- metadata +8 -10
- data/test/fixtures/fixture_database.sqlite3 +0 -0
- data/test/fixtures/fixture_database_2.sqlite3 +0 -0
data/Rakefile
CHANGED
@@ -192,7 +192,7 @@ spec = Gem::Specification.new do |s|
|
|
192
192
|
s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
|
193
193
|
end
|
194
194
|
|
195
|
-
s.add_dependency('activesupport', '= 2.3.
|
195
|
+
s.add_dependency('activesupport', '= 2.3.14' + PKG_BUILD)
|
196
196
|
|
197
197
|
s.files.delete FIXTURES_ROOT + "/fixture_database.sqlite"
|
198
198
|
s.files.delete FIXTURES_ROOT + "/fixture_database_2.sqlite"
|
@@ -333,7 +333,6 @@ module ActiveRecord
|
|
333
333
|
end
|
334
334
|
|
335
335
|
def generate_message(attribute, message = :invalid, options = {})
|
336
|
-
ActiveSupport::Deprecation.warn("ActiveRecord::Errors#generate_message has been deprecated. Please use ActiveRecord::Error.new().to_s.")
|
337
336
|
Error.new(@base, attribute, message, options).to_s
|
338
337
|
end
|
339
338
|
end
|
data/test/cases/base_test.rb
CHANGED
@@ -79,6 +79,23 @@ end
|
|
79
79
|
class BasicsTest < ActiveRecord::TestCase
|
80
80
|
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts
|
81
81
|
|
82
|
+
def test_column_names_are_escaped
|
83
|
+
conn = ActiveRecord::Base.connection
|
84
|
+
classname = conn.class.name[/[^:]*$/]
|
85
|
+
badchar = {
|
86
|
+
'SQLite3Adapter' => '"',
|
87
|
+
'MysqlAdapter' => '`',
|
88
|
+
'Mysql2Adapter' => '`',
|
89
|
+
'PostgreSQLAdapter' => '"',
|
90
|
+
'OracleAdapter' => '"',
|
91
|
+
}.fetch(classname) {
|
92
|
+
raise "need a bad char for #{classname}"
|
93
|
+
}
|
94
|
+
|
95
|
+
quoted = conn.quote_column_name "foo#{badchar}bar"
|
96
|
+
assert_equal("#{badchar}foo#{badchar * 2}bar#{badchar}", quoted)
|
97
|
+
end
|
98
|
+
|
82
99
|
def test_table_exists
|
83
100
|
assert !NonExistentTable.table_exists?
|
84
101
|
assert Topic.table_exists?
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 14
|
10
|
+
version: 2.3.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heinemeier Hansson
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-16 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: activesupport
|
@@ -25,12 +25,12 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - "="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 31
|
29
29
|
segments:
|
30
30
|
- 2
|
31
31
|
- 3
|
32
|
-
-
|
33
|
-
version: 2.3.
|
32
|
+
- 14
|
33
|
+
version: 2.3.14
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
description: Implements the ActiveRecord pattern (Fowler, PoEAA) for ORM. It ties database tables and classes together for business objects, like Customer or Subscription, that can find, save, and destroy themselves without resorting to manual SQL.
|
@@ -238,8 +238,6 @@ files:
|
|
238
238
|
- test/fixtures/edges.yml
|
239
239
|
- test/fixtures/entrants.yml
|
240
240
|
- test/fixtures/faces.yml
|
241
|
-
- test/fixtures/fixture_database.sqlite3
|
242
|
-
- test/fixtures/fixture_database_2.sqlite3
|
243
241
|
- test/fixtures/fk_test_has_fk.yml
|
244
242
|
- test/fixtures/fk_test_has_pk.yml
|
245
243
|
- test/fixtures/funny_jokes.yml
|
@@ -428,7 +426,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
428
426
|
requirements: []
|
429
427
|
|
430
428
|
rubyforge_project: activerecord
|
431
|
-
rubygems_version: 1.8.
|
429
|
+
rubygems_version: 1.8.8
|
432
430
|
signing_key:
|
433
431
|
specification_version: 3
|
434
432
|
summary: Implements the ActiveRecord pattern for ORM.
|
Binary file
|
Binary file
|