docker_toolkit 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2aaee1de629d780dff025bc1585e21f0ef3bc1a99327e618baefe066a4749356
4
- data.tar.gz: f3a24a07f9858c3883168810e649f74b8477445f62a650ef51a352da298322a6
3
+ metadata.gz: 889beb1290640a67e2c3217d1457f0201eed96ce710834f4bf133d936c718cbc
4
+ data.tar.gz: facbfb3e12923f81bc40b2267e3951d61d4d6537baf82dca1ebbe3353fa1b3a9
5
5
  SHA512:
6
- metadata.gz: 15565d5e50a9eacb4eeca45ec377c2010e2e51ab41485eaf59056991ba79cab71ef036ab544498859198d4a301385eb5308586c29e0bf0704697299b02d4781e
7
- data.tar.gz: 2a83b314456780370a6a91005c00421b7cc436c80b2877a58f79cdd258ab6de85352fe45d80fb1c12d360b806b025b41b4e8ecdfc66e3cce09bb0fbe79240883
6
+ metadata.gz: f747c39e05d2ae0fbe18840a86b8effaf62a351215e0778438cc47f7cda9da3171e31225d05c24de837edefd1e92254cc2a9255d3f31d8bd7a6fcc4a37bfab4e
7
+ data.tar.gz: 57a0123e512fbd177c7ee17e30dbb1fefadb44486500858aff80434802c687e00e2af515c4e2984522af4ac8f0dba245fe3f43aa5ac5af48431993eb3262cc35
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- docker_toolkit (0.1.7)
4
+ docker_toolkit (0.1.8)
5
5
  diplomat
6
6
  dotenv
7
7
  json
@@ -1,5 +1,5 @@
1
1
  module DockerToolkit
2
2
 
3
- VERSION = '0.1.7'.freeze
3
+ VERSION = '0.1.8'.freeze
4
4
 
5
5
  end
@@ -25,6 +25,11 @@ module DockerToolkit
25
25
  end
26
26
 
27
27
  terminating.each do |meta|
28
+ begin
29
+ meta[:stdin].close
30
+ rescue StandardError
31
+ nil
32
+ end
28
33
  ::Process.kill 'TERM', meta[:process].pid
29
34
  end
30
35
 
@@ -77,12 +82,14 @@ module DockerToolkit
77
82
 
78
83
  process.io.stdout = wout
79
84
  process.io.stderr = werr
85
+ process.duplex = true
80
86
 
81
87
  meta = {
82
88
  cmd: cmd,
83
89
  process: process,
84
90
  stdout: rout,
85
- stderr: rerr
91
+ stderr: rerr,
92
+ stdin: process.io.stdin
86
93
  }
87
94
 
88
95
  @threads << Thread.new(meta[:stdout], STDOUT) do |io, out|
@@ -148,15 +155,20 @@ module DockerToolkit
148
155
 
149
156
  meta[:handled] = true
150
157
  begin
151
- meta[:stdout].close
152
- rescue StandardError
153
- IOError
154
- end
158
+ meta[:stdin].close
159
+ rescue StandardError
160
+ nil
161
+ end
155
162
  begin
156
- meta[:stderr].close
157
- rescue StandardError
158
- IOError
159
- end
163
+ meta[:stdout].close
164
+ rescue StandardError
165
+ nil
166
+ end
167
+ begin
168
+ meta[:stderr].close
169
+ rescue StandardError
170
+ nil
171
+ end
160
172
 
161
173
  if !@crashed && meta[:process].crashed?
162
174
  @crashed = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Godko Ivan