vete 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vete.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebef08e0bd4e613f05c177ca2ed9aebff1c9374f6cc89bd09424592bc82d1df4
|
4
|
+
data.tar.gz: fa9226523af0c7ee7e2f2c64a3a0e618ccfcb1b1fd6bf82b4af0406c5b3d115a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 387161f8cff69edcaec6a35a7e08dfa9fc9266f411e69bd48d764db10f3a37d2690f0b3a5c1018b48b4edb6adc83daa25cd96326d9565a981a5a411ea62aff92
|
7
|
+
data.tar.gz: b192c68b8dfa2d3c53607a2ecfb50308c1ef86a623322b2c5285ed34b848a8fae409ddb90c6a7d618e59bb1b61cbafd19fa72328e17aa8810a4084d63e6d4a20
|
data/lib/vete.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# vete - Ruby CLI to spawn processes to get work done
|
3
3
|
#
|
4
4
|
# Author: Steve Shreeve (steve.shreeve@gmail.com)
|
5
|
-
# Date: Mar
|
5
|
+
# Date: Mar 22, 2023
|
6
6
|
# ============================================================================
|
7
7
|
|
8
8
|
STDOUT.sync = true
|
@@ -19,7 +19,7 @@ trap("INT" ) { print clear + go; abort "\n" }
|
|
19
19
|
trap("WINCH") { print clear or draw if @pid == Process.pid }
|
20
20
|
|
21
21
|
OptionParser.new.instance_eval do
|
22
|
-
@version = "0.6.
|
22
|
+
@version = "0.6.1"
|
23
23
|
@banner = "usage: #{program_name} [options]"
|
24
24
|
|
25
25
|
on "-b", "--bar <width>" , "Progress bar width, in characters", Integer
|
@@ -132,10 +132,10 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
|
132
132
|
print [
|
133
133
|
go(@work + 3, @len + 5),
|
134
134
|
fg("fff"),
|
135
|
-
bg("58a65c") + @char * ( gcol )
|
136
|
-
bg("f1bf42") + @char * ( ycol)
|
135
|
+
bg("58a65c") + @char * ( gcol ), # green (done)
|
136
|
+
bg("f1bf42") + @char * ( ycol), # yellow (live)
|
137
137
|
bg("d85140") + " " * (@wide - gcol - ycol).ceil, # red (rest)
|
138
|
-
go(@work + 3, @len + 5 + @wide + 3)
|
138
|
+
go(@work + 3, @len + 5 + @wide + 3),
|
139
139
|
bg("5383ec") + " %.1f%% " % [ppct * 100], # blue (done + died)
|
140
140
|
done > 0 ? (bg + " " + bg("58a65c") + " #{done} done ") : nil,
|
141
141
|
died > 0 ? (bg + " " + bg("d85140") + " #{died} died ") : nil,
|
@@ -197,7 +197,7 @@ begin
|
|
197
197
|
end
|
198
198
|
end
|
199
199
|
while @que.size != @work
|
200
|
-
sleep
|
200
|
+
sleep 0.3
|
201
201
|
draw(live, done, died, jobs, info.dup)
|
202
202
|
end
|
203
203
|
end.join
|