spud 0.1.11 → 0.1.12

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/shell.rb +6 -13
  3. data/lib/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45e9d5fe088b27da7daa463b322faee4c62096e7bcb7108d9ac7972996bc36bf
4
- data.tar.gz: 4ba4b30084f2814f74ca64417f1f6b0576ddea34bd623876ec2c015c0b349f91
3
+ metadata.gz: 39cd004710861eaf1008af5cce1413d40f1793cb2cb19e14cd42096a016c26e8
4
+ data.tar.gz: ccda590d1da78b017eb9bc84572fbb9142d65002288b1fb4e7e3e283333ace96
5
5
  SHA512:
6
- metadata.gz: f1d2d7fafbc75ec7c0f7350bacfabd0c258a637d2bceadba2dab2c24ee64d2a46d590aa4e1e1c7e4722b3668c5e1e5c94049b5c775a9f3e4617f7c32b0c46095
7
- data.tar.gz: 76519c8fe4c6aad10699f6fb2a54645603a3e0bef474d4f60b3ad457e3d2c91bb45ebafe1a66f42431279dc32f89a7d52eaa7f8811bf0a0a24ee1f65cda43556
6
+ metadata.gz: 12df1e0ac36dbd4dc129278e3700009ce8fc5337e03bbc977e4cf3b5e59a2e1beb45296fd63d3fd13ad615864a46e72a0ef9881b52ff364f17c9ebae9ec9405d
7
+ data.tar.gz: 340795859c4e47e198b03ce1409b91de37e67b180d02dff86728124e45e6356e34a7472f85e4ca37eb1bb7b949372e44b59c3f1bdc513e2ef6e0070fc19518fe
@@ -9,26 +9,19 @@ module Spud
9
9
  @status = nil
10
10
  output = StringIO.new
11
11
 
12
- Open3.popen3(cmd) do |_, stdout, _, thread|
13
- @pid = thread.pid
14
-
15
- begin
16
- while line = stdout.gets
17
- puts line unless silent
18
- output.puts line
19
- end
20
- rescue Interrupt
21
- exit
22
- end
12
+ _, stdout, _, @thread = Open3.popen3(cmd)
13
+ while line = stdout.gets
14
+ puts line
15
+ output.puts line
23
16
  end
24
17
 
25
18
  @status = $?
26
- puts status: @status
27
19
  super(output.string)
28
20
  end
29
21
 
30
22
  def kill!
31
- Process.kill('HUP', @pid)
23
+ thread.kill
24
+ thread.join
32
25
  end
33
26
  end
34
27
  end
@@ -1,3 +1,3 @@
1
1
  module Spud
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Booth