Browse files

Adding jdbcmysql support.

  • Loading branch information...
1 parent 5b3740e commit 88e2ee034b94dbc8a07342a41710b73fb1503ab6 Jason committed with Apr 6, 2011
View
22 Gemfile
@@ -9,18 +9,30 @@ 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"
gem "delorean", "~> 0.2.0"
# 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
View
70 Gemfile.lock
@@ -1,69 +1,79 @@
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)
ruby-debug19 (0.11.6)
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)
View
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."
View
6 lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb
@@ -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
View
1 test/adapters/jdbcmysql.rb
@@ -0,0 +1 @@
+ENV["ARE_DB"] = "jdbcmysql"
View
6 test/jdbcmysql/import_test.rb
@@ -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

0 comments on commit 88e2ee0

Please sign in to comment.