Adding jdbcmysql support.
This commit is contained in:
parent
5b3740e0f2
commit
88e2ee034b
22
Gemfile
22
Gemfile
|
@ -9,10 +9,17 @@ end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# Database Adapters
|
# Database Adapters
|
||||||
gem "mysql", "~> 2.8.1"
|
platforms :ruby do
|
||||||
gem "mysql2", "~> 0.2.4"
|
gem "mysql", "~> 2.8.1"
|
||||||
gem "pg", "~> 0.9.0"
|
gem "mysql2", "~> 0.2.4"
|
||||||
gem "sqlite3-ruby", "~> 1.3.1"
|
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
|
# Support libs
|
||||||
gem "factory_girl", "~> 1.3.3"
|
gem "factory_girl", "~> 1.3.3"
|
||||||
|
@ -20,7 +27,12 @@ group :test do
|
||||||
|
|
||||||
# Debugging
|
# Debugging
|
||||||
platforms :mri_18 do
|
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
|
end
|
||||||
|
|
||||||
platforms :mri_19 do
|
platforms :mri_19 do
|
||||||
|
|
70
Gemfile.lock
70
Gemfile.lock
|
@ -1,43 +1,49 @@
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activemodel (3.0.1)
|
activemodel (3.0.6)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.6)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
i18n (~> 0.4.1)
|
i18n (~> 0.5.0)
|
||||||
activerecord (3.0.1)
|
activerecord (3.0.6)
|
||||||
activemodel (= 3.0.1)
|
activemodel (= 3.0.6)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.6)
|
||||||
arel (~> 1.0.0)
|
arel (~> 2.0.2)
|
||||||
tzinfo (~> 0.3.23)
|
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)
|
archive-tar-minitar (0.5.2)
|
||||||
arel (1.0.1)
|
arel (2.0.9)
|
||||||
activesupport (~> 3.0.0)
|
|
||||||
builder (2.1.2)
|
builder (2.1.2)
|
||||||
chronic (0.3.0)
|
chronic (0.3.0)
|
||||||
columnize (0.3.1)
|
columnize (0.3.2)
|
||||||
delorean (0.2.0)
|
delorean (0.2.1)
|
||||||
chronic
|
chronic
|
||||||
factory_girl (1.3.3)
|
factory_girl (1.3.3)
|
||||||
gemcutter (0.6.1)
|
|
||||||
git (1.2.5)
|
git (1.2.5)
|
||||||
i18n (0.4.2)
|
i18n (0.5.0)
|
||||||
jeweler (1.4.0)
|
jdbc-mysql (5.1.13)
|
||||||
gemcutter (>= 0.1.0)
|
jeweler (1.5.2)
|
||||||
|
bundler (~> 1.0.0)
|
||||||
git (>= 1.2.5)
|
git (>= 1.2.5)
|
||||||
rubyforge (>= 2.0.0)
|
rake
|
||||||
json_pure (1.4.6)
|
linecache (0.43)
|
||||||
linecache19 (0.5.11)
|
linecache19 (0.5.12)
|
||||||
ruby_core_source (>= 0.1.4)
|
ruby_core_source (>= 0.1.4)
|
||||||
mysql (2.8.1)
|
mysql (2.8.1)
|
||||||
mysql2 (0.2.6)
|
mysql2 (0.2.7)
|
||||||
pg (0.9.0)
|
pg (0.9.0)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
ruby-debug (0.9.3)
|
ruby-debug (0.10.4)
|
||||||
ruby-debug-base (= 0.9.3)
|
columnize (>= 0.1)
|
||||||
ruby-debug-base (0.9.3)
|
ruby-debug-base (~> 0.10.4.0)
|
||||||
ruby-debug-base19 (0.11.24)
|
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)
|
columnize (>= 0.3.1)
|
||||||
linecache19 (>= 0.5.11)
|
linecache19 (>= 0.5.11)
|
||||||
ruby_core_source (>= 0.1.4)
|
ruby_core_source (>= 0.1.4)
|
||||||
|
@ -45,25 +51,29 @@ GEM
|
||||||
columnize (>= 0.3.1)
|
columnize (>= 0.3.1)
|
||||||
linecache19 (>= 0.5.11)
|
linecache19 (>= 0.5.11)
|
||||||
ruby-debug-base19 (>= 0.11.19)
|
ruby-debug-base19 (>= 0.11.19)
|
||||||
ruby_core_source (0.1.4)
|
ruby_core_source (0.1.5)
|
||||||
archive-tar-minitar (>= 0.5.2)
|
archive-tar-minitar (>= 0.5.2)
|
||||||
rubyforge (2.0.4)
|
sqlite3 (1.3.3)
|
||||||
json_pure (>= 1.1.7)
|
sqlite3-ruby (1.3.3)
|
||||||
sqlite3-ruby (1.3.2)
|
sqlite3 (>= 1.3.3)
|
||||||
tzinfo (0.3.23)
|
tzinfo (0.3.26)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
java
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
activerecord (~> 3.0.0)
|
activerecord (~> 3.0.0)
|
||||||
|
activerecord-jdbcmysql-adapter
|
||||||
delorean (~> 0.2.0)
|
delorean (~> 0.2.0)
|
||||||
factory_girl (~> 1.3.3)
|
factory_girl (~> 1.3.3)
|
||||||
|
jdbc-mysql
|
||||||
jeweler (>= 1.4.0)
|
jeweler (>= 1.4.0)
|
||||||
mysql (~> 2.8.1)
|
mysql (~> 2.8.1)
|
||||||
mysql2 (~> 0.2.4)
|
mysql2 (~> 0.2.4)
|
||||||
pg (~> 0.9.0)
|
pg (~> 0.9.0)
|
||||||
rake
|
rake
|
||||||
ruby-debug (~> 0.9.3)
|
ruby-debug (= 0.10.4)
|
||||||
|
ruby-debug-base (= 0.10.4)
|
||||||
ruby-debug19
|
ruby-debug19
|
||||||
sqlite3-ruby (~> 1.3.1)
|
sqlite3-ruby (~> 1.3.1)
|
||||||
|
|
2
Rakefile
2
Rakefile
|
@ -36,7 +36,7 @@ namespace :display do
|
||||||
end
|
end
|
||||||
task :default => ["display:notice"]
|
task :default => ["display:notice"]
|
||||||
|
|
||||||
ADAPTERS = %w(mysql mysql2 postgresql sqlite3)
|
ADAPTERS = %w(mysql mysql2 jdbcmysql postgresql sqlite3)
|
||||||
ADAPTERS.each do |adapter|
|
ADAPTERS.each do |adapter|
|
||||||
namespace :test do
|
namespace :test do
|
||||||
desc "Runs #{adapter} database tests."
|
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