rbbt-util 5.13.27 → 5.13.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c5b4e97dff70829b6c281c60b2ab9ef251448997
4
- data.tar.gz: 7ed1a51ccbaad554e8240cdfc155eefcd0113637
3
+ metadata.gz: 7ce0e6973095090f400a387ed87caebb92709f5f
4
+ data.tar.gz: f950e625f890d418286ebea3c1b6341001f5ab6b
5
5
  SHA512:
6
- metadata.gz: f91cf30ebefac18ff92fd44950744d83e083a50a85e4451104f7b664bee9a1863ed8c43c95d9f0a9863e4b2ff61e92f5eb963816eff2ae25be0b6cc3f8fa7752
7
- data.tar.gz: 08e361e740c52d30de3711cc142b87ebd2692e357edd3fccca917b2973b7d25dbb16a4a3d5a4db2f02180bd028b413499a775d89f27fc69069366c0a663230b0
6
+ metadata.gz: 716762403d10d35f2cce69b3d00a0d9877a671e4cdaefb79b57b8779dc6a39d97c750967a0a8dc686b1eb2e1ecbaa5a1a60d5e733edaeeafdae89eb383a4d54a
7
+ data.tar.gz: 669d729262610ed60f7bff13212c994447d587593b8b7ff66e0f2fe28515d348f2f42219f398ae92871356d596c6505cc5e9da46c03407d6bdfef39c08f26889
@@ -91,4 +91,25 @@ module SOPT
91
91
  #{input_doc(inputs, input_types, input_descriptions, input_defaults, input_shortcuts)}
92
92
  EOF
93
93
  end
94
+
95
+ def self.doc
96
+ doc = <<-EOF
97
+ #{Log.color :magenta}#{command}(1) -- #{summary}
98
+ #{"=" * (command.length + summary.length + 7)}#{Log.color :reset}
99
+
100
+ EOF
101
+
102
+ if synopsys and not synopsys.empty?
103
+ doc << Log.color(:magenta, "## SYNOPSYS") << "\n\n"
104
+ doc << Log.color(:blue, synopsys) << "\n\n"
105
+ end
106
+
107
+ if description and not description.empty?
108
+ doc << Log.color(:magenta, "## DESCRIPTION") << "\n\n"
109
+ doc << Misc.format_paragraph(description)
110
+ end
111
+
112
+ doc << Log.color(:magenta, "## OPTIONS") << "\n\n"
113
+ doc << input_doc(inputs, input_types, input_descriptions, input_defaults, input_shortcuts)
114
+ end
94
115
  end
@@ -26,7 +26,11 @@ def pid_msg(pid)
26
26
  else
27
27
  :red
28
28
  end
29
- Log.color(color, pid || "missing")
29
+ if pid.nil?
30
+ Log.color(:yellow, "missing")
31
+ else
32
+ Log.color(color, pid)
33
+ end
30
34
  end
31
35
 
32
36
  def status_msg(status)
@@ -56,6 +60,7 @@ puts
56
60
  if locks.any?
57
61
  puts Log.color(:magenta, "Locks:")
58
62
  locks.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |lock|
63
+ next unless File.exists?(lock)
59
64
  pid, ppid, time = Rbbt.load_lock(lock)
60
65
  time = File.exists?(lock) ? File.ctime(lock) : Time.now
61
66
  puts " " << lock + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)}; ppid: #{ppid}; pid: #{pid_msg pid}")
@@ -66,6 +71,7 @@ end
66
71
  if persists.any?
67
72
  puts Log.color(:magenta, "Persist:")
68
73
  persists.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |persist|
74
+ next unless File.exists?(persist)
69
75
  time = File.exists?(persist) ? File.ctime(persist) : Time.now
70
76
  puts " " << persist + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)})")
71
77
  end
@@ -75,6 +81,7 @@ end
75
81
  if sensiblewrites.any?
76
82
  puts Log.color(:magenta, "Writing:")
77
83
  sensiblewrites.sort_by{|f| File.exists?(f) ? File.ctime(f) : Time.now}.each do |sensiblewrite|
84
+ next unless File.exists?(sensiblewrite)
78
85
  pid, ppid, time = Rbbt.load_lock(sensiblewrite + '.lock')
79
86
  time = File.exists?(sensiblewrite) ? File.ctime(sensiblewrite) : Time.now
80
87
  puts " " << sensiblewrite + Log.color(:blue, " -- time: #{Misc.format_seconds(Time.now - time)}; ppid: #{ppid}; pid: #{pid_msg pid}")
@@ -100,7 +107,7 @@ jobs.each do |workflow, tasks|
100
107
  end
101
108
  end
102
109
  next if uncomplete and other.empty?
103
- puts "* " << Log.color(:magenta, workflow) << "#" << Log.color(:yellow, task) << ": " << Log.color(:green, "done") << " " << done.length.to_s
110
+ puts "* " << Log.color(:magenta, workflow) << "#" << Log.color(:cyan, task) << ": " << Log.color(:blue, done.length.to_s) << " done"
104
111
  other.each do |status, list|
105
112
  files_txt = list.collect{|f,p| p.nil? ? f : (f + " (#{pid_msg p})") }
106
113
  puts " " << status_msg(status) << ": " << (files_txt * ", ")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.13.27
4
+ version: 5.13.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez