forking_test_runner 1.5.2 → 1.6.0

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: da329d4d34a62e5506ea5503521ee68d46b6d113a36e57d93e732feb9d5fdd52
4
- data.tar.gz: 0d264d60aba634760d5670dcdb050305ce3f68ffa8023528a788c66ff0012ff9
3
+ metadata.gz: 15dc01600948f014f33866de176d8d3991f5af044b7dc669a727a064522c8a99
4
+ data.tar.gz: 037b27bd86eab3c5a8a9095a5fb9a5a18b48fda7db9f5e2c505452ac6a931a70
5
5
  SHA512:
6
- metadata.gz: 1fd169253d7e50b752d9e866ec8180eb4009f38354f931ce8e6f764743f9c51627ac94949a131a079a6a760f9473fbafac370c40f514aabbb782c8acdfd7b3a4
7
- data.tar.gz: 9c67fa682ea9ea43f888b347ee6ec8a75c00a3d3ca2f4288b414b4fc17573a6fc877e825fc82775c7620a907d543607996d12174630fd7ecfb811d58ffe7aeca
6
+ metadata.gz: 53176ec4ca09268b4790bfbf438fbd40e1dd85344534cdb3655165114b20a82f355c4863b2e1fc4e18ac8eae5e6ee8aded5353af28d021176b1ba72829b47f0d
7
+ data.tar.gz: 5123b3023462d28fe1296b7b902d232f30ef9298104f957b316669c6ecce289f48f0ce1539b5fce3fb42f9c6001ccc2f8b08d01a5c1d278d35da31542597bc5c
@@ -252,8 +252,7 @@ module ForkingTestRunner
252
252
 
253
253
  child = fork do
254
254
  rpipe.close
255
- $stdout.reopen(wpipe)
256
-
255
+ preserve_tty { $stdout.reopen(wpipe) }
257
256
  yield
258
257
  end
259
258
 
@@ -270,6 +269,13 @@ module ForkingTestRunner
270
269
  buffer
271
270
  end
272
271
 
272
+ # not tested via CI
273
+ def preserve_tty
274
+ was_tty = $stdout.tty?
275
+ yield
276
+ def $stdout.tty?; true; end if was_tty
277
+ end
278
+
273
279
  def run_test(file)
274
280
  stdout = change_program_name_to file do
275
281
  fork_with_captured_stdout do
@@ -1,3 +1,3 @@
1
1
  module ForkingTestRunner
2
- VERSION = "1.5.2"
2
+ VERSION = "1.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forking_test_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-07 00:00:00.000000000 Z
11
+ date: 2019-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel_tests