progress 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Show progress during console script run.
4
4
 
5
- ## Installation:
5
+ ## Installation
6
6
 
7
7
  gem install progress
8
8
 
9
- ## SYNOPSIS:
9
+ ## Usage
10
10
 
11
11
  1000.times_with_progress('Counting to 1000') do |i|
12
12
  # do something with i
@@ -36,9 +36,9 @@ class Progress
36
36
  end
37
37
 
38
38
  # returns self but changes title
39
- def with_progress(title = nil)
39
+ def with_progress(title = nil, &block)
40
40
  @title = title
41
- self
41
+ block ? each(&block) : self
42
42
  end
43
43
  end
44
44
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'progress'
5
- s.version = '2.1.0'
5
+ s.version = '2.1.1'
6
6
  s.summary = %q{Show progress of long running tasks}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: progress
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 0
10
- version: 2.1.0
9
+ - 1
10
+ version: 2.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-29 00:00:00 Z
18
+ date: 2011-12-04 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rspec