raykit 0.0.384 → 0.0.387

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: f1a931c2fa0127f406b9783cd4688340759d581f321f8a02ff82bdfe613eb223
4
- data.tar.gz: 3c7521121a2f58e04f03475e388e827b672b611d7121f6062f46663cce0fd457
3
+ metadata.gz: 9a80020a05d9f3956475e1fb248254ec2555f055311c476aec08fd1b7fc64d60
4
+ data.tar.gz: c584d553c7d2a14572671a00856b863e5209a20eec2b16f27230437b3ca0785e
5
5
  SHA512:
6
- metadata.gz: '068863574bd1efb73b17ddd3207a5ed52b0fa45a30b8f28f12f17f0e2a6c2551251e947bd0a4d77bb66a6ecd5378d8a8fc2010aeac8f14b6db8ed6ea2bbfb36a'
7
- data.tar.gz: 100815badb3e5537224cacc0091f8b51033bb5d280240c4b2fb05ffc977536b0b2db603bf762aeb7bca6a10080f5040bfac45f828c7be5ab12bc607c16d5747c
6
+ metadata.gz: b667b122ba6f9e42d9ec5b269ca4cb96585fc7ff161cabcf821284a58a5b72b0ccc844e6f70ca9a357e4b380b9038f6f594a5ec73bd817713d7bcc0d421f2be1
7
+ data.tar.gz: 57d45c0c24b2687429b97fd2ec9ca1ec2505bc853868709fe57adffeb33187ff0a9d7fbdb94047be7379ab4f022d30a39ffd74bff38c12c780d8f390d6ff9208
@@ -63,6 +63,7 @@ module Raykit
63
63
  @output, @error, process_status = Open3.capture3(@command)
64
64
  @exitstatus = process_status.exitstatus
65
65
  else
66
+ # =================================================
66
67
  #puts "@timeout is #{@timeout}"
67
68
  Open3.popen3(@command, chdir: @directory) do |_stdin, stdout, stderr, thread|
68
69
  tick = 1
@@ -76,6 +77,12 @@ module Raykit
76
77
  rescue IO::WaitReadable
77
78
  rescue EOFError
78
79
  @exitstatus = thread.value.exitstatus
80
+ until stdout.eof?
81
+ @output << stdout.read_nonblock(BUFFER_SIZE)
82
+ end
83
+ until stderr.eof?
84
+ @error << stderr.read_nonblock(BUFFER_SIZE)
85
+ end
79
86
  break
80
87
  end
81
88
  end
@@ -92,6 +99,8 @@ module Raykit
92
99
  @exitstatus = thread.value.exitstatus
93
100
  end
94
101
  end
102
+
103
+ # =================================================
95
104
  end
96
105
  @elapsed = timer.elapsed
97
106
  if @logging_enabled
@@ -187,7 +196,7 @@ module Raykit
187
196
  symbol = Rainbow(error.encode("utf-8")).red if @exitstatus != 0
188
197
  cmd = "#{Rainbow(SECRETS.hide(@command)).yellow}"
189
198
  if show_directory
190
- puts "#{symbol} #{cmd} " + Rainbow("#{elapsed_str}").cyan #(#{@directory},#{elapsed_str})"
199
+ puts "#{symbol} #{cmd} " + Rainbow("#{elapsed_str}").cyan
191
200
  puts Rainbow(" #{@directory}").cyan
192
201
  else
193
202
  puts "#{symbol} #{Rainbow(SECRETS.hide(@command)).yellow} (#{elapsed_str})"
@@ -202,6 +211,7 @@ module Raykit
202
211
  end
203
212
 
204
213
  def details
214
+ puts " exit_code: " + @exitstatus.to_s
205
215
  if @output.length > 0
206
216
  @output.lines.each do |line|
207
217
  puts " " + line
@@ -294,8 +294,9 @@ module Raykit
294
294
  if !cmd.exitstatus.nil? && cmd.exitstatus.zero?
295
295
  else
296
296
  # display error details
297
- puts cmd.output
298
- $stderr.puts cmd.error
297
+ cmd.details
298
+ #puts cmd.output
299
+ #$stderr.puts cmd.error
299
300
  if quit_on_failure
300
301
  abort
301
302
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.384
4
+ version: 0.0.387
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler