Skip to content

Loading…

Added support for MysqlAdapter to the Patches apply! method. #29

Open
wants to merge 2 commits into from

3 participants

@briandmcnabb

The activerecord-jdbcmysql-adapter gem utilizes the MysqlAdapter. This commit brings mysql support to JRuby.

@pyromaniac
Collaborator

Could you please add the adapter as travis env?

@jkrall

+1 ... could this get merged?

@pyromaniac
Collaborator

It doesn't work actually, if you could make it work - I'll merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 9, 2013
  1. @briandmcnabb
Commits on May 22, 2013
  1. @briandmcnabb

    Added call to ActiveRecord::Base to ensure the connection of jdbc-ada…

    briandmcnabb committed
    …pters. Added jdbc-mysql to .travis.yml
Showing with 3 additions and 0 deletions.
  1. +1 −0 .travis.yml
  2. +1 −0 lib/activeuuid/patches.rb
  3. +1 −0 lib/activeuuid/railtie.rb
View
1 .travis.yml
@@ -18,6 +18,7 @@ env:
- DB=sqlite3
- DB=mysql
- DB=postgresql
+ - DB=jdbc-mysql
matrix:
allow_failures:
View
1 lib/activeuuid/patches.rb
@@ -109,6 +109,7 @@ def self.apply!
ActiveRecord::ConnectionAdapters::Column.send :include, Column
ActiveRecord::ConnectionAdapters::PostgreSQLColumn.send :include, PostgreSQLColumn if defined? ActiveRecord::ConnectionAdapters::PostgreSQLColumn
+ ActiveRecord::ConnectionAdapters::MysqlAdapter.send :include, Quoting if defined? ActiveRecord::ConnectionAdapters::MysqlAdapter
ActiveRecord::ConnectionAdapters::Mysql2Adapter.send :include, Quoting if defined? ActiveRecord::ConnectionAdapters::Mysql2Adapter
ActiveRecord::ConnectionAdapters::SQLite3Adapter.send :include, Quoting if defined? ActiveRecord::ConnectionAdapters::SQLite3Adapter
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send :include, PostgreSQLQuoting if defined? ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
View
1 lib/activeuuid/railtie.rb
@@ -6,6 +6,7 @@ class Railtie < Rails::Railtie
railtie_name :activeuuid
config.to_prepare do
+ ActiveRecord::Base # Needed to apply jdbc-adapters
ActiveUUID::Patches.apply!
end
end
Something went wrong with that request. Please try again.