dorian-eval 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/dorian/eval.rb +13 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '038de198256b896cb637183032a92eb151d5e3e1790ec43a01d250409787557a'
4
- data.tar.gz: efaad5e5c13cd8556fc183a60f748f45583bb9fa230446f83fa858b72e1e3ed3
3
+ metadata.gz: 03ce9bea56bd1153aa27f1727d269bbd3481cce5cc6c7d5f804a398d21d37471
4
+ data.tar.gz: fa74231ab7834bd0ff38d39a56b260b81c9fb7529e310d554b80a5626118c878
5
5
  SHA512:
6
- metadata.gz: 9d68748405bb6a7921ce4fbeed66f029a8526f4e460ef7c84f8b7e9a5462e6c2c6c41e3c8aef5c32a0288d299c1e64af091c436dd7c1e9d1507befcf7e183f7d
7
- data.tar.gz: 645be168642cfacb0ed2b008d25157b511af395dd8dced06228cb061fd70b9b8feb58c4af21244344e3b7145d6bc4c02c47c720e70a30fb6225708a7c6254fdc
6
+ metadata.gz: 2046e1f57a92de02e8d55bb7014e02d523080314c592b711692832c1f0fa8f598ab8ee2e53dbb19bc8934bf765efa2875900bef3c5ef10dacc02f7c969f4d4bf
7
+ data.tar.gz: 50ad12f3197bbcd2e8f071fb71f01c2077bfcca9861d4192e7368269607394838e9e79466c63bd1d75be827011e38a0e5a46d5b3150b9dc66b432acad6701a89
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.3
1
+ 1.5.0
data/lib/dorian/eval.rb CHANGED
@@ -69,11 +69,21 @@ class Dorian
69
69
  out = ""
70
70
  err = ""
71
71
 
72
- while !read_out.eof? || !read_err.eof?
73
- out += gets(read_out, print: stdout?, method: :puts).to_s
74
- err += gets(read_err, color: :red, print: stderr?, method: :warn).to_s
72
+ thread_out = Thread.new do
73
+ until read_out.eof?
74
+ out += gets(read_out, print: stdout?, method: :puts).to_s
75
+ end
75
76
  end
76
77
 
78
+ thread_err = Thread.new do
79
+ until read_err.eof?
80
+ err += gets(read_err, color: :red, print: stderr?, method: :warn).to_s
81
+ end
82
+ end
83
+
84
+ thread_out.join
85
+ thread_err.join
86
+
77
87
  if returns?
78
88
  Return.new(stdout: out, stderr: err, returned: YAML.safe_load(out))
79
89
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorian-eval
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-05 00:00:00.000000000 Z
11
+ date: 2024-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yaml