lib/geordi/commands/drop_databases.rb in geordi-3.0.0 vs lib/geordi/commands/drop_databases.rb in geordi-3.0.1
- old
+ new
@@ -26,21 +26,21 @@
option :mysql, banner: 'PORT_OR_SOCKET',
desc: 'Use MySQL/MariaDB port or socket'
def drop_databases
require 'geordi/db_cleaner'
- raise '-P and -M are mutually exclusive' if options.postgres_only && options.mysql_only
+ Interaction.fail '-P and -M are mutually exclusive' if options.postgres_only && options.mysql_only
mysql_flags = nil
postgres_flags = nil
unless options.mysql.nil?
begin
mysql_port = Integer(options.mysql)
mysql_flags = "--port=#{mysql_port} --protocol=TCP"
rescue AttributeError
unless File.exist? options.mysql
- raise "Path #{options.mysql} is not a valid MySQL socket"
+ Interaction.fail "Path #{options.mysql} is not a valid MySQL socket"
end
mysql_flags = "--socket=#{options.mysql}"
end
end
@@ -52,7 +52,7 @@
'postgres' => postgres_flags }
cleaner = DBCleaner.new(extra_flags)
cleaner.clean_mysql unless options.postgres_only
cleaner.clean_postgres unless options.mysql_only
- success 'Done.'
+ Interaction.success 'Done.'
end