vete 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vete.rb +6 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b811e6c42a16fc7bcb8359b469f1ead827bac8727e54224cd0891d014c0ad491
4
- data.tar.gz: 0fc1990ae2a825c40790e31485819ac4bf92c10623abf696e279c30a4b7a7097
3
+ metadata.gz: 47c29a5b0f4ba59dbec76ce9db29421b38c6ac0a5988c69618d6358ed2f9c734
4
+ data.tar.gz: 4e48c009025a3a1220a8d60b4bf21013c08a19774d0fb8a4ab7d8e89f6e1c612
5
5
  SHA512:
6
- metadata.gz: 396ec4711449a42af83c911e8fa306c30949c70630ad97e1b37cd617ce0be0900b39814125c49a671f377b8af314e26abfd9aa8ea79c790bd449e07d5e764f7a
7
- data.tar.gz: d4a829a061f96ac6cb0bc9eda2e4de38cff5babeb5692fc7e1355802af851344d11d0293f14114b6c41b8deccf00f8966fbb250d35bb3d669dffa43dc5edebad
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.3"
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) + "" + "─" * (@wide + 2) + "┘\n",
118
- go(1 , @len + 3) + "" + "─" * (@wide + 2) + "┐\n",
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 # fg("fff")
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.3
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-01 00:00:00.000000000 Z
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