smart_proxy_remote_execution_ssh 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2f91ec259ca105bcc18a5cecf4342019f4023d44cbff5695998b5e57c25e325
4
- data.tar.gz: 51ccf299324d4adf10c07475dca2749d885c258913c8d9e7593d8b8149e6d18d
3
+ metadata.gz: 2515f08b67e5b567e50182d278d73d2db8466e7a12cb6e8000ad8e4f8ce6bf65
4
+ data.tar.gz: 686ba55bf862fc81f3154ebadbaafa3702416109e81641bdcb2442873c5a451b
5
5
  SHA512:
6
- metadata.gz: 74313e91e51ff5d58fce0bc880131b12984a750110a2d76c88875a6b824eec40a2ba9d7336dfda34df7c11d465ded62c14d4d33ba10cf4bed1b2e0309aff9a2b
7
- data.tar.gz: 92f85e971f10d9e45418e75d0325f3e548e65954160be9f86cb154adde6bc3a512b4e3a5429d162291704b49a50a5570fcdeb4b129f735b8f8f737938a0194d0
6
+ metadata.gz: 9f9e84c78cab2997b711ee559440ad9323c6c3605726f6360a94415ccda3f7a08db0450fba8fe5479e06b649a8e6e8e545be72f35751762c50bf8ef5bc32696e
7
+ data.tar.gz: 0705716e01985cd8b5a3aa2ffd4104f6d4ce0938dc8a0e9b105f65f149d62c1c030916250cf0f1c35ed51bfaceb36964d0b959e5e13f42c70fb0a42389a01a2e
@@ -164,6 +164,8 @@ module Proxy::RemoteExecution
164
164
  out_read, out_write = IO.pipe
165
165
  err_read, err_write = IO.pipe
166
166
 
167
+ # Force the script runner to initialize its logger
168
+ script_runner.logger
167
169
  pid = spawn(*script_runner.send(:get_args, command), :in => in_read, :out => out_write, :err => err_write)
168
170
  [in_read, out_write, err_write].each(&:close)
169
171
 
@@ -176,7 +178,7 @@ module Proxy::RemoteExecution
176
178
  inner_system_ssh_loop out_buf, err_buf, in_buf, pid
177
179
  end
178
180
 
179
- def inner_system_ssh_loop2(out_buf, err_buf, in_buf, pid)
181
+ def inner_system_ssh_loop(out_buf, err_buf, in_buf, pid)
180
182
  err_buf_raw = ''
181
183
  readers = [buf_socket, out_buf, err_buf]
182
184
  loop do
@@ -185,6 +187,9 @@ module Proxy::RemoteExecution
185
187
  (ready_readers || []).each { |reader| reader.close if reader.fill.zero? }
186
188
 
187
189
  proxy_data(out_buf, in_buf)
190
+ if buf_socket.closed?
191
+ script_runner.close_session
192
+ end
188
193
 
189
194
  if out_buf.closed?
190
195
  code = Process.wait2(pid).last.exitstatus
@@ -202,7 +207,7 @@ module Proxy::RemoteExecution
202
207
  rescue # rubocop:disable Style/RescueStandardError
203
208
  send_error(400, err_buf_raw) unless @started
204
209
  ensure
205
- [out_buff, err_buf, in_buf].each(&:close)
210
+ [out_buf, err_buf, in_buf].each(&:close)
206
211
  end
207
212
 
208
213
  def proxy_data(out_buf, in_buf)
@@ -1,7 +1,7 @@
1
1
  module Proxy
2
2
  module RemoteExecution
3
3
  module Ssh
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_remote_execution_ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-16 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler