lib/flydata/compatibility_check.rb in flydata-0.5.5 vs lib/flydata/compatibility_check.rb in flydata-0.5.6
- old
+ new
@@ -1,7 +1,8 @@
require 'mysql2'
require 'flydata/command_loggable'
+require 'flydata-core/mysql/config'
require 'flydata-core/mysql/command_generator'
require 'flydata-core/mysql/compatibility_checker'
require 'flydata-core/errors'
module Flydata
@@ -70,11 +71,10 @@
class MysqlCompatibilityCheck < CompatibilityCheck
def initialize(dp_hash, de_hash, options={})
super
- @db_opts = [:host, :port, :username, :password, :database, :ssl_ca].inject({}) {|h, sym| h[sym] = de_hash[sym.to_s]; h}
- @db_opts[:sslca] = @db_opts[:ssl_ca] # for mysql2 gem
+ @db_opts = FlydataCore::Mysql::Config.build_mysql_db_opts(de_hash)
@dump_dir = options[:dump_dir] || nil
@backup_dir = options[:backup_dir] || nil
@tables = de_hash['tables']
end