vete 1.0.3 → 1.0.4
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 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47c29a5b0f4ba59dbec76ce9db29421b38c6ac0a5988c69618d6358ed2f9c734
|
4
|
+
data.tar.gz: 4e48c009025a3a1220a8d60b4bf21013c08a19774d0fb8a4ab7d8e89f6e1c612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b629bc286b28c43bbab39b4f37ba3f9cdbc116d5283940200093fd86e5bd56ae1735910e2e805aa487a1a9cdd4030b67b480a0a32833723b1891e3cf104618b
|
7
|
+
data.tar.gz: de593f3ebf64ee5f8013c7a6031ed54c2edf7065f20eea8fb3c202ca32286fac561e9921c15df6903da81e0227bf19cb2343fd95f6c3736ba2ba7f57242d0911
|
data/lib/vete.rb
CHANGED
@@ -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 = "1.0.
|
22
|
+
@version = "1.0.4"
|
23
23
|
@banner = "usage: #{program_name} [options] [filename]"
|
24
24
|
|
25
25
|
on "-b", "--bar <width>" , "Progress bar width, in characters", Integer
|
@@ -110,12 +110,12 @@ def bg(rgb=nil); rgb ? "\e[48;2;#{hex(rgb)}m" : "\e[49m"; end
|
|
110
110
|
|
111
111
|
def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
112
112
|
|
113
|
-
# outer box
|
113
|
+
# outer box # # ╰╯╭╮─└┘┌┐
|
114
114
|
unless info
|
115
115
|
print [
|
116
116
|
clear,
|
117
|
-
go(2 + @work, @len + 3) + "
|
118
|
-
go(1 , @len + 3) + "
|
117
|
+
go(2 + @work, @len + 3) + "╰" + "─" * (@wide + 2) + "╯\n",
|
118
|
+
go(1 , @len + 3) + "╭" + "─" * (@wide + 2) + "╮\n",
|
119
119
|
].join
|
120
120
|
@work.times {|i| print " %*d │ %*s │\n" % [@len, i + 1, @wide, ""] }
|
121
121
|
return
|
@@ -127,7 +127,7 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
|
127
127
|
info.each do |slot, this|
|
128
128
|
tpct = this.to_f / most
|
129
129
|
cols = ppct * tpct * @wide
|
130
|
-
print go(slot + 1, @len + 5) + bg("5383ec") + @char * cols
|
130
|
+
print go(slot + 1, @len + 5) + bg("5383ec") + @char * cols + bg
|
131
131
|
end
|
132
132
|
|
133
133
|
# summary bar
|
@@ -145,10 +145,7 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil)
|
|
145
145
|
bg("5383ec") + " %.1f%% " % [ppct * 100], # blue (done + died)
|
146
146
|
done > 0 ? (bg + " " + bg("58a65c") + " #{done}/#{jobs} done ") : nil,
|
147
147
|
died > 0 ? (bg + " " + bg("d85140") + " #{died} died ") : nil,
|
148
|
-
].join
|
149
|
-
|
150
|
-
# clear colors
|
151
|
-
print fg + bg
|
148
|
+
].join + fg + bg
|
152
149
|
end
|
153
150
|
|
154
151
|
# ==[ Let 'er rip! ]==========================================================
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby CLI to spawn processes to get work done
|
14
14
|
email: steve.shreeve@gmail.com
|