threaded_runner 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/threaded_runner.rb +1 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b2cfdb190eddbbb0055c24792b5772d9d319a64
4
- data.tar.gz: 37d75e64ce85eb48ad2a3390cd446e17b25e07a2
3
+ metadata.gz: 058b1d32f08b2813fdd0eb0b0953940e9857b3c4
4
+ data.tar.gz: d2e64fc5f152a657d3ddb5516a2e38c93530a721
5
5
  SHA512:
6
- metadata.gz: 81174a49de1c5af02bd33ab08fc08d13ae26bbbf1363e7d88d263354e4e85ca2a8960d09a8656ce479848129bbd5ae9474b90f9d40716a27876af3803d417c60
7
- data.tar.gz: 9eb5ca3470dd5c6aee19481caabacefd1eceefe74c28e4d89c37232661bba0522695193fb019f2b98e2fc0cadbc2d2b7b4c44cb594356fa38be37afe8d832964
6
+ metadata.gz: 572928577569b8931ace793e375a988ddad4da896fb1c799f691ca1694b4dfffaa347ffcc2dfe1e14d3870effff74fbed6b18efa08cd9e2c507256f231c2cfab
7
+ data.tar.gz: 2b13635078353482f69a6f8cca37da76368fafd06570e749fede2ce5d0a3c571759785cd52b2a98d306969c1438a455089f691af65ac33cf160bbb47264701bc
@@ -1,15 +1,12 @@
1
1
  class ThreadedRunner
2
- def initialize(cmd, wdir='.')
2
+ def initialize(cmd)
3
3
  @cmd = cmd
4
- @wdir = wdir
5
4
  end
6
5
 
7
6
  attr_reader :thread
8
7
 
9
8
  def start(wait_for=nil)
10
- pwd = Dir.pwd
11
9
  @thread = Thread.new do
12
- Dir.chdir(@wdir)
13
10
  IO.popen(@cmd) do |f|
14
11
  @pid = f.pid
15
12
  f.each_line do |line|
@@ -22,7 +19,6 @@ class ThreadedRunner
22
19
  end
23
20
  end
24
21
  end
25
- Dir.chdir(pwd)
26
22
  nil
27
23
  wait_for(wait_for) if wait_for
28
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: threaded_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Fairbairn