Adding jdbcmysql support.
This commit is contained in:
parent
5b3740e0f2
commit
88e2ee034b
22
Gemfile
22
Gemfile
|
@ -9,10 +9,17 @@ end
|
|||
|
||||
group :test do
|
||||
# Database Adapters
|
||||
gem "mysql", "~> 2.8.1"
|
||||
gem "mysql2", "~> 0.2.4"
|
||||
gem "pg", "~> 0.9.0"
|
||||
gem "sqlite3-ruby", "~> 1.3.1"
|
||||
platforms :ruby do
|
||||
gem "mysql", "~> 2.8.1"
|
||||
gem "mysql2", "~> 0.2.4"
|
||||
gem "pg", "~> 0.9.0"
|
||||
gem "sqlite3-ruby", "~> 1.3.1"
|
||||
end
|
||||
|
||||
platforms :jruby do
|
||||
gem "jdbc-mysql"
|
||||
gem "activerecord-jdbcmysql-adapter"
|
||||
end
|
||||
|
||||
# Support libs
|
||||
gem "factory_girl", "~> 1.3.3"
|
||||
|
@ -20,7 +27,12 @@ group :test do
|
|||
|
||||
# Debugging
|
||||
platforms :mri_18 do
|
||||
gem "ruby-debug", "~> 0.9.3"
|
||||
gem "ruby-debug", "= 0.10.4"
|
||||
end
|
||||
|
||||
platforms :jruby do
|
||||
gem "ruby-debug-base", "= 0.10.4"
|
||||
gem "ruby-debug", "= 0.10.4"
|
||||
end
|
||||
|
||||
platforms :mri_19 do
|
||||
|
|
70
Gemfile.lock
70
Gemfile.lock
|
@ -1,43 +1,49 @@
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
activemodel (3.0.1)
|
||||
activesupport (= 3.0.1)
|
||||
activemodel (3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
builder (~> 2.1.2)
|
||||
i18n (~> 0.4.1)
|
||||
activerecord (3.0.1)
|
||||
activemodel (= 3.0.1)
|
||||
activesupport (= 3.0.1)
|
||||
arel (~> 1.0.0)
|
||||
i18n (~> 0.5.0)
|
||||
activerecord (3.0.6)
|
||||
activemodel (= 3.0.6)
|
||||
activesupport (= 3.0.6)
|
||||
arel (~> 2.0.2)
|
||||
tzinfo (~> 0.3.23)
|
||||
activesupport (3.0.1)
|
||||
activerecord-jdbc-adapter (1.1.1)
|
||||
activerecord-jdbcmysql-adapter (1.1.1)
|
||||
activerecord-jdbc-adapter (= 1.1.1)
|
||||
jdbc-mysql (~> 5.1.0)
|
||||
activesupport (3.0.6)
|
||||
archive-tar-minitar (0.5.2)
|
||||
arel (1.0.1)
|
||||
activesupport (~> 3.0.0)
|
||||
arel (2.0.9)
|
||||
builder (2.1.2)
|
||||
chronic (0.3.0)
|
||||
columnize (0.3.1)
|
||||
delorean (0.2.0)
|
||||
columnize (0.3.2)
|
||||
delorean (0.2.1)
|
||||
chronic
|
||||
factory_girl (1.3.3)
|
||||
gemcutter (0.6.1)
|
||||
git (1.2.5)
|
||||
i18n (0.4.2)
|
||||
jeweler (1.4.0)
|
||||
gemcutter (>= 0.1.0)
|
||||
i18n (0.5.0)
|
||||
jdbc-mysql (5.1.13)
|
||||
jeweler (1.5.2)
|
||||
bundler (~> 1.0.0)
|
||||
git (>= 1.2.5)
|
||||
rubyforge (>= 2.0.0)
|
||||
json_pure (1.4.6)
|
||||
linecache19 (0.5.11)
|
||||
rake
|
||||
linecache (0.43)
|
||||
linecache19 (0.5.12)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
mysql (2.8.1)
|
||||
mysql2 (0.2.6)
|
||||
mysql2 (0.2.7)
|
||||
pg (0.9.0)
|
||||
rake (0.8.7)
|
||||
ruby-debug (0.9.3)
|
||||
ruby-debug-base (= 0.9.3)
|
||||
ruby-debug-base (0.9.3)
|
||||
ruby-debug-base19 (0.11.24)
|
||||
ruby-debug (0.10.4)
|
||||
columnize (>= 0.1)
|
||||
ruby-debug-base (~> 0.10.4.0)
|
||||
ruby-debug-base (0.10.4)
|
||||
linecache (>= 0.3)
|
||||
ruby-debug-base (0.10.4-java)
|
||||
ruby-debug-base19 (0.11.25)
|
||||
columnize (>= 0.3.1)
|
||||
linecache19 (>= 0.5.11)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
|
@ -45,25 +51,29 @@ GEM
|
|||
columnize (>= 0.3.1)
|
||||
linecache19 (>= 0.5.11)
|
||||
ruby-debug-base19 (>= 0.11.19)
|
||||
ruby_core_source (0.1.4)
|
||||
ruby_core_source (0.1.5)
|
||||
archive-tar-minitar (>= 0.5.2)
|
||||
rubyforge (2.0.4)
|
||||
json_pure (>= 1.1.7)
|
||||
sqlite3-ruby (1.3.2)
|
||||
tzinfo (0.3.23)
|
||||
sqlite3 (1.3.3)
|
||||
sqlite3-ruby (1.3.3)
|
||||
sqlite3 (>= 1.3.3)
|
||||
tzinfo (0.3.26)
|
||||
|
||||
PLATFORMS
|
||||
java
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
activerecord (~> 3.0.0)
|
||||
activerecord-jdbcmysql-adapter
|
||||
delorean (~> 0.2.0)
|
||||
factory_girl (~> 1.3.3)
|
||||
jdbc-mysql
|
||||
jeweler (>= 1.4.0)
|
||||
mysql (~> 2.8.1)
|
||||
mysql2 (~> 0.2.4)
|
||||
pg (~> 0.9.0)
|
||||
rake
|
||||
ruby-debug (~> 0.9.3)
|
||||
ruby-debug (= 0.10.4)
|
||||
ruby-debug-base (= 0.10.4)
|
||||
ruby-debug19
|
||||
sqlite3-ruby (~> 1.3.1)
|
||||
|
|
2
Rakefile
2
Rakefile
|
@ -36,7 +36,7 @@ namespace :display do
|
|||
end
|
||||
task :default => ["display:notice"]
|
||||
|
||||
ADAPTERS = %w(mysql mysql2 postgresql sqlite3)
|
||||
ADAPTERS = %w(mysql mysql2 jdbcmysql postgresql sqlite3)
|
||||
ADAPTERS.each do |adapter|
|
||||
namespace :test do
|
||||
desc "Runs #{adapter} database tests."
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
require "active_record/connection_adapters/mysql_adapter"
|
||||
require "activerecord-import/adapters/mysql_adapter"
|
||||
|
||||
class ActiveRecord::ConnectionAdapters::MysqlAdapter
|
||||
include ActiveRecord::Import::MysqlAdapter::InstanceMethods
|
||||
end
|
1
test/adapters/jdbcmysql.rb
Normal file
1
test/adapters/jdbcmysql.rb
Normal file
|
@ -0,0 +1 @@
|
|||
ENV["ARE_DB"] = "jdbcmysql"
|
6
test/jdbcmysql/import_test.rb
Normal file
6
test/jdbcmysql/import_test.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
||||
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../support/mysql/assertions')
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../support/mysql/import_examples')
|
||||
|
||||
should_support_mysql_import_functionality
|
Loading…
Reference in a new issue