Merge branch 'master' into pre_count_on_sequel
This commit is contained in:
commit
4b8742259e
89
Gemfile.lock
89
Gemfile.lock
|
@ -44,95 +44,6 @@ GEM
|
||||||
couchrest (1.2.0)
|
couchrest (1.2.0)
|
||||||
mime-types (~> 1.15)
|
mime-types (~> 1.15)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
multi_json (~> 1.0)
|
|
||||||
rest-client (~> 1.6.1)
|
rest-client (~> 1.6.1)
|
||||||
cucumber (1.2.1)
|
cucumber (1.2.1)
|
||||||
builder (>= 2.1.2)
|
builder (>= 2.1.2)
|
||||||
|
|
|
@ -3,7 +3,9 @@ require 'active_record/base'
|
||||||
require 'active_record/connection_adapters/abstract_adapter'
|
require 'active_record/connection_adapters/abstract_adapter'
|
||||||
|
|
||||||
#Load available connection adapters
|
#Load available connection adapters
|
||||||
%w( abstract_mysql_adapter postgresql_adapter sqlite3_adapter ).each do |known_adapter|
|
%w(
|
||||||
|
abstract_mysql_adapter postgresql_adapter sqlite3_adapter mysql_adapter mysql2_adapter
|
||||||
|
).each do |known_adapter|
|
||||||
begin
|
begin
|
||||||
require "active_record/connection_adapters/#{known_adapter}"
|
require "active_record/connection_adapters/#{known_adapter}"
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
@ -185,6 +187,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
AbstractMysqlAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(AbstractMysqlAdapter)
|
AbstractMysqlAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(AbstractMysqlAdapter)
|
||||||
Mysql2Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(Mysql2Adapter)
|
Mysql2Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(Mysql2Adapter)
|
||||||
|
MysqlAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::AbstractMysqlAdapter } if defined?(MysqlAdapter)
|
||||||
SQLiteAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLiteAdapter)
|
SQLiteAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLiteAdapter)
|
||||||
SQLite3Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLite3Adapter)
|
SQLite3Adapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::SQLiteAdapter } if defined?(SQLite3Adapter)
|
||||||
PostgreSQLAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::PostgreSQLAdapter } if defined?(PostgreSQLAdapter)
|
PostgreSQLAdapter.class_eval { include ::DatabaseCleaner::ConnectionAdapters::PostgreSQLAdapter } if defined?(PostgreSQLAdapter)
|
||||||
|
|
|
@ -6,10 +6,9 @@ require 'database_cleaner/active_record/truncation/shared_fast_truncation'
|
||||||
|
|
||||||
module ActiveRecord
|
module ActiveRecord
|
||||||
module ConnectionAdapters
|
module ConnectionAdapters
|
||||||
describe do
|
describe do
|
||||||
before(:all) { active_record_mysql2_setup }
|
before(:all) { active_record_mysql2_setup }
|
||||||
|
|
||||||
let(:adapter) { Mysql2Adapter }
|
|
||||||
let(:connection) { active_record_mysql2_connection }
|
let(:connection) { active_record_mysql2_connection }
|
||||||
|
|
||||||
describe "#truncate_table" do
|
describe "#truncate_table" do
|
||||||
|
@ -31,7 +30,6 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "an adapter with pre-count truncation" do
|
it_behaves_like "an adapter with pre-count truncation" do
|
||||||
let(:adapter) { Mysql2Adapter }
|
|
||||||
let(:connection) { active_record_mysql2_connection }
|
let(:connection) { active_record_mysql2_connection }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,10 +6,9 @@ require 'database_cleaner/active_record/truncation/shared_fast_truncation'
|
||||||
|
|
||||||
module ActiveRecord
|
module ActiveRecord
|
||||||
module ConnectionAdapters
|
module ConnectionAdapters
|
||||||
describe do
|
describe do
|
||||||
before(:all) { active_record_mysql_setup }
|
before(:all) { active_record_mysql_setup }
|
||||||
|
|
||||||
let(:adapter) { MysqlAdapter }
|
|
||||||
let(:connection) { active_record_mysql_connection }
|
let(:connection) { active_record_mysql_connection }
|
||||||
|
|
||||||
describe "#truncate_table" do
|
describe "#truncate_table" do
|
||||||
|
@ -29,9 +28,8 @@ module ActiveRecord
|
||||||
User.create.id.should eq 1
|
User.create.id.should eq 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "an adapter with pre-count truncation" do
|
it_behaves_like "an adapter with pre-count truncation" do
|
||||||
let(:adapter) { MysqlAdapter }
|
|
||||||
let(:connection) { active_record_mysql_connection }
|
let(:connection) { active_record_mysql_connection }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,8 +9,6 @@ module ActiveRecord
|
||||||
describe do
|
describe do
|
||||||
before(:all) { active_record_pg_setup }
|
before(:all) { active_record_pg_setup }
|
||||||
|
|
||||||
let(:adapter) { PostgreSQLAdapter }
|
|
||||||
|
|
||||||
let(:connection) do
|
let(:connection) do
|
||||||
active_record_pg_connection
|
active_record_pg_connection
|
||||||
end
|
end
|
||||||
|
@ -38,7 +36,6 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like "an adapter with pre-count truncation" do
|
it_behaves_like "an adapter with pre-count truncation" do
|
||||||
let(:adapter) { PostgreSQLAdapter }
|
|
||||||
let(:connection) { active_record_pg_connection }
|
let(:connection) { active_record_pg_connection }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,6 @@ module ActiveRecord
|
||||||
describe do
|
describe do
|
||||||
before(:all) { active_record_sqlite3_setup }
|
before(:all) { active_record_sqlite3_setup }
|
||||||
|
|
||||||
let(:adapter) { SQLite3Adapter }
|
|
||||||
|
|
||||||
let(:connection) do
|
let(:connection) do
|
||||||
active_record_sqlite3_connection
|
active_record_sqlite3_connection
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue