lib/geordi/remote.rb in geordi-3.0.0 vs lib/geordi/remote.rb in geordi-3.0.1

- old
+ new

@@ -4,11 +4,10 @@ require 'highline/import' require 'pathname' module Geordi class Remote - include Geordi::Interaction REMOTE_DUMP_PATH = '~/dumps/dump_for_download.dump'.freeze def initialize(stage) @stage = stage @@ -41,15 +40,15 @@ destination_directory = File.join(@config.root, 'tmp') FileUtils.mkdir_p destination_directory destination_path = File.join(destination_directory, "#{@stage}.dump") relative_destination = Pathname.new(destination_path).relative_path_from Pathname.new(@config.root) - note "Downloading remote dump to #{relative_destination} ..." + Interaction.note "Downloading remote dump to #{relative_destination} ..." server = @config.primary_server Util.system! "scp -C #{@config.user(server)}@#{server}:#{REMOTE_DUMP_PATH} #{destination_path}" - success "Dumped the #{@stage} database to #{relative_destination}." + Interaction.success "Dumped the #{@stage} database to #{relative_destination}." destination_path end def console(options = {}) @@ -60,10 +59,10 @@ server = options[:select_server] ? select_server : @config.primary_server remote_command = "cd #{@config.remote_root} && #{@config.shell}" remote_command << " -c '#{options[:remote_command]}'" if options[:remote_command] - note 'Connecting to ' + server.to_s + Interaction.note 'Connecting to ' + server.to_s Util.system! 'ssh', "#{@config.user(server)}@#{server}", '-t', remote_command end end end