lib/fulmar/service/helper/common_helper.rb in fulmar-1.3.0 vs lib/fulmar/service/helper/common_helper.rb in fulmar-1.4.0

- old
+ new

@@ -15,11 +15,11 @@ def configuration (@_config_service ||= Fulmar::Domain::Service::ConfigurationService.instance) end - def composer(command, arguments = []) + def composer(command, arguments = Fulmar::Infrastructure::Service::ComposerService::DEFAULT_PARAMS) (storage['composer'] ||= Fulmar::Infrastructure::Service::ComposerService.new(local_shell)).execute(command, arguments) end def local_shell storage['local_shell'] ||= new_shell(configuration[:local_path]) @@ -40,15 +40,15 @@ def git storage['git'] ||= Fulmar::Infrastructure::Service::GitService.new configuration end def upload(filename) - Fulmar::Infrastructure::Service::CopyService.upload(local_shell, filename, configuration[:hostname], configuration[:remote_path]) + Fulmar::Infrastructure::Service::CopyService.upload(local_shell, filename, configuration.ssh_user_and_host, configuration[:remote_path]) end def download(filename) - Fulmar::Infrastructure::Service::CopyService.download(local_shell, configuration[:hostname], filename, configuration[:local_path]) + Fulmar::Infrastructure::Service::CopyService.download(local_shell, configuration.ssh_user_and_host, filename, configuration[:local_path]) end def new_shell(path, hostname = 'localhost') shell = Fulmar::Infrastructure::Service::ShellService.new(path, hostname) shell.strict = true @@ -62,18 +62,18 @@ @storage[configuration.environment] ||= {} @storage[configuration.environment][configuration.target] ||= {} end def info(text) - puts (ENV['TERM'] == 'xterm-256color' ? text.blue : "* Info: #{text}") + puts (ENV['TERM'] == 'xterm-256color' ? text.blue : "* Info: #{text}") if verbose end def warn(text) - puts (ENV['TERM'] == 'xterm-256color' ? text.magenta : "* Warning: #{text}") + STDERR.puts (ENV['TERM'] == 'xterm-256color' ? text.magenta : "* Warning: #{text}") end def error(text) - puts (ENV['TERM'] == 'xterm-256color' ? text.light_red : "* Error: #{text}") + STDERR.puts (ENV['TERM'] == 'xterm-256color' ? text.light_red : "* Error: #{text}") end end end end end