simple_progressbar 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -8,24 +8,22 @@ class SimpleProgressbar
8
8
  end
9
9
 
10
10
  def progress(percent)
11
- print "\e[19D"
11
+ print "\e[18D"
12
12
  render_progress(percent)
13
13
  end
14
14
 
15
15
  private
16
16
 
17
17
  def render_progress(percent)
18
- line = "["
18
+ print "["
19
19
 
20
- for i in 0..(percent/10).to_i
21
- line += "*"
20
+ (percent/10).to_i.times do
21
+ print "*"
22
22
  end
23
- for i in (percent/10).to_i..9
24
- line += " "
23
+ (10 - (percent/10).to_i).times do
24
+ print " "
25
25
  end
26
-
27
- line += "]\e[32m#{'%4s' % percent}\e[0m %"
28
- print line
26
+ print "]\e[32m#{'%4s' % percent}\e[0m %"
29
27
  STDOUT.flush
30
28
  end
31
29
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simple_progressbar}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bodo Tasche"]
@@ -17,7 +17,9 @@ Gem::Specification.new do |s|
17
17
  "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
- "LICENSE",
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
21
23
  "README.rdoc",
22
24
  "Rakefile",
23
25
  "VERSION",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bodo Tasche
@@ -39,6 +39,8 @@ extra_rdoc_files:
39
39
  - LICENSE
40
40
  - README.rdoc
41
41
  files:
42
+ - .document
43
+ - .gitignore
42
44
  - LICENSE
43
45
  - README.rdoc
44
46
  - Rakefile