@@ -24,7 +24,7 @@ def initialize(configuration)
2424
2525 def create ( master_established = false )
2626 establish_master_connection unless master_established
27- connection . create_database configuration . database , configuration_hash . merge ( " collation" => default_collation )
27+ connection . create_database configuration . database , configuration_hash . merge ( collation : default_collation )
2828 establish_connection configuration
2929 rescue ActiveRecord ::StatementInvalid => e
3030 if /database .* already exists/i === e . message
@@ -54,14 +54,14 @@ def purge
5454 end
5555
5656 def structure_dump ( filename , extra_flags )
57- server_arg = "-S #{ Shellwords . escape ( configuration_hash [ ' host' ] ) } "
58- server_arg += ":#{ Shellwords . escape ( configuration_hash [ ' port' ] ) } " if configuration_hash [ " port" ]
57+ server_arg = "-S #{ Shellwords . escape ( configuration_hash [ : host] ) } "
58+ server_arg += ":#{ Shellwords . escape ( configuration_hash [ : port] ) } " if configuration_hash [ : port]
5959 command = [
6060 "defncopy-ttds" ,
6161 server_arg ,
62- "-D #{ Shellwords . escape ( configuration_hash [ ' database' ] ) } " ,
63- "-U #{ Shellwords . escape ( configuration_hash [ ' username' ] ) } " ,
64- "-P #{ Shellwords . escape ( configuration_hash [ ' password' ] ) } " ,
62+ "-D #{ Shellwords . escape ( configuration_hash [ : database] ) } " ,
63+ "-U #{ Shellwords . escape ( configuration_hash [ : username] ) } " ,
64+ "-P #{ Shellwords . escape ( configuration_hash [ : password] ) } " ,
6565 "-o #{ Shellwords . escape ( filename ) } " ,
6666 ]
6767 table_args = connection . tables . map { |t | Shellwords . escape ( t ) }
@@ -88,11 +88,11 @@ def structure_load(filename, extra_flags)
8888 attr_reader :configuration , :configuration_hash
8989
9090 def default_collation
91- configuration_hash [ " collation" ] || DEFAULT_COLLATION
91+ configuration_hash [ : collation] || DEFAULT_COLLATION
9292 end
9393
9494 def establish_master_connection
95- establish_connection configuration_hash . merge ( " database" => "master" )
95+ establish_connection configuration_hash . merge ( database : "master" )
9696 end
9797 end
9898
0 commit comments