dorian-eval 1.4.2 → 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 +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d7a272daa6fb5f6fb24e3befe68aeb8d998f98c04ec2e836123000eb64451bd
4
- data.tar.gz: '0955b048336373365f83d14a5b9e9ac7ba5e4feb46ae9fe3af1f26cbd7df4e5a'
3
+ metadata.gz: 03ce9bea56bd1153aa27f1727d269bbd3481cce5cc6c7d5f804a398d21d37471
4
+ data.tar.gz: fa74231ab7834bd0ff38d39a56b260b81c9fb7529e310d554b80a5626118c878
5
5
  SHA512:
6
- metadata.gz: 6dfb7752e53f551933c41e7ca4957701f1d68378100487b1bf8257896212d7d2fbe9d645e3606ac3ad0fad1f6a529a72a6f2b7915e0d4bf992987aa88691c541
7
- data.tar.gz: 83f1f5e00173244d0f08922d963ba84cb563b8bf9e6524b855af001b7bee6059ef56c6da46e6ca0f3ad6083b4fd22dbc1cdf721bdba8427390bf9043fc5c625d
6
+ metadata.gz: 2046e1f57a92de02e8d55bb7014e02d523080314c592b711692832c1f0fa8f598ab8ee2e53dbb19bc8934bf765efa2875900bef3c5ef10dacc02f7c969f4d4bf
7
+ data.tar.gz: 50ad12f3197bbcd2e8f071fb71f01c2077bfcca9861d4192e7368269607394838e9e79466c63bd1d75be827011e38a0e5a46d5b3150b9dc66b432acad6701a89
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.2
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.2
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
@@ -48,7 +48,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
48
48
  requirements:
49
49
  - - ">="
50
50
  - !ruby/object:Gem::Version
51
- version: '3'
51
+ version: 3.3.0
52
52
  required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="