Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes

  • Loading branch information...
commit e29315e1e9b2529c72aad21468fd3f0a6e9868c7 1 parent 1829ad5
@nofxx authored
View
2  lib/rtui.rb
@@ -5,5 +5,5 @@
module Rtui
- VERSION = '0.1.1'
+ VERSION = '0.1.8'
end
View
8 lib/rtui/progress.rb
@@ -134,7 +134,11 @@ def inspect
private
def fmt_subject
- " " + @subject + ( " " * (@terminal_width - @subject.length))
+ @subject ||= ""
+ blank = @terminal_width - @subject.length
+ out = " " + @subject
+ out << " " * blank if blank > 0
+ out[0, @terminal_width - 5]
end
def fmt_bar
@@ -195,7 +199,7 @@ def bytes
convert_bytes(@current)
end
- def format_time (t)
+ def format_time t
t = t.to_i
sec = t % 60
min = (t / 60) % 60
View
4 rtui.gemspec
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{rtui}
- s.version = "0.1.1"
+ s.version = "0.1.8"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Marcos Piccinini"]
- s.date = %q{2008-12-20}
+ s.date = %q{2008-12-21}
s.description = %q{Set of tools for TUI Eye Candy}
s.email = ["x@nofxx.com"]
s.extra_rdoc_files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc"]
View
1  spec/rtui/progress_spec.rb
@@ -64,6 +64,7 @@ def do_make_progress_bar (title, total)
pbar = Rtui::Progress.new("test(inc)", total,
:components => [:spinner, :percentage, :subject, :stat])
total.times { |i| sleep(0.1); pbar.subject = "inter #{i} times!!!"; pbar.inc }
+ pbar.subject = "finish it"
pbar.finish
end
#
Please sign in to comment.
Something went wrong with that request. Please try again.