lib/rbbt/util/misc/development.rb in rbbt-util-5.37.16 vs lib/rbbt/util/misc/development.rb in rbbt-util-5.38.0

- old
+ new

@@ -421,14 +421,21 @@ zip_file = file CMD.cmd("unzip '#{zip_file}' -d '#{dir}'") end end - def self.ssh_run(server, script = nil) + def self.ssh_run_old(server, script = nil) Log.debug "Run ssh script in #{server}:\n#{script}" #CMD.cmd("ssh '#{server}' 'shopt -s expand_aliases; bash -l -c \"ruby\"' ", :in => script, :log => true).read CMD.cmd("ssh '#{server}' ruby", :in => script, :log => true).read + end + + def self.ssh_run(server, script = nil) + require 'rbbt/util/ssh' + Log.debug "Run ssh script in #{server}:\n#{script}" + + SSHLine.ruby(server, script) end def self.ssh_connection(server, reset = false) @@ssh_connections ||= {} @@ssh_connections.delete server if reset