duration_estimate 0.0.2 → 0.0.3

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: 1be63dbda523533ef9e8d8878ae0aced8bbafaaa
4
- data.tar.gz: ca9ed0a08762ba6b8ef79c23f690583178941da1
3
+ metadata.gz: c3cdcccfb9aa61cc100ee224ce4f6fbd639d55c3
4
+ data.tar.gz: a335443d0f283841bb91dd0c7be2c819df72be99
5
5
  SHA512:
6
- metadata.gz: 7bd11f65886bc693bbbdf856a7fe8a6741fa533f62ba8b4732608e652b0a79c82d84372f634c216a40f57b5f7fd8391593d8a69381443841e7adbf2ca31f7417
7
- data.tar.gz: 5412ecb8540c90b41ac28f10cfc9bf73a9ab099f6ad7ddee159d2f8a3523b33061de92908356d626251e1b995323b790ef42e6207ef92913c7c76dec7375bfd3
6
+ metadata.gz: b69c8f431f9c9bc8e1e3fa7067c5dfcbfd82a5bc2379ebf13f12265694f11eddd49f2340883716c1e3a762ecf346fcfd7a9f5d43c08b2c01f8805c6752f2f815
7
+ data.tar.gz: 6cb464da7c527616a23a86141aa2848dcafe05dc5ffd41011c77fd7b7eb36c09f3b23f6977fac323aa77dad8b74fcb3e079774e921093bbeac1c00aac09d8679
@@ -4,8 +4,7 @@ rvm:
4
4
  - 2.2.2
5
5
  - 2.1.6
6
6
  - 2.0.0
7
- - 1.9.3
8
- - jruby-19mode
7
+ - jruby-9.1.12.0
9
8
 
10
9
  branches:
11
10
  only:
@@ -25,11 +25,11 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'bundler', '~> 1.10'
26
26
 
27
27
  # Test
28
- spec.add_development_dependency 'rspec', '~> 3.3'
29
- spec.add_development_dependency 'simplecov', '~> 0.10'
28
+ spec.add_development_dependency 'rspec', '~> 3.4'
29
+ spec.add_development_dependency 'simplecov', '~> 0.11'
30
30
 
31
31
  # Code style, debugging, docs
32
- spec.add_development_dependency 'rubocop', '~> 0.32'
32
+ spec.add_development_dependency 'rubocop', '~> 0.35'
33
33
  spec.add_development_dependency 'pry', '~> 0.10'
34
34
  spec.add_development_dependency 'yard', '~> 0.8'
35
35
  spec.add_development_dependency 'rake', '~> 10.4'
@@ -108,6 +108,19 @@ class DurationEstimate
108
108
  # @yieldparam item [Object] Current item in collection.
109
109
  # @yieldparam e [DurationEstimate] This instance.
110
110
  def each
111
+ unless block_given?
112
+ return Enumerator.new do |y|
113
+ items.each do |item|
114
+ measure do
115
+ self.items_done += 1 # rubocop:disable Style/SpaceAroundOperators
116
+ self.items_remaining -= 1
117
+
118
+ y << [item, self]
119
+ end
120
+ end
121
+ end
122
+ end
123
+
111
124
  items.each do |item|
112
125
  measure do
113
126
  self.items_done += 1 # rubocop:disable Style/SpaceAroundOperators
@@ -1,4 +1,4 @@
1
1
  class DurationEstimate
2
2
  # Version, man!
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: duration_estimate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oldrich Vetesnik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-02 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '3.3'
33
+ version: '3.4'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '3.3'
40
+ version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: simplecov
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.10'
47
+ version: '0.11'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.10'
54
+ version: '0.11'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.32'
61
+ version: '0.35'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.32'
68
+ version: '0.35'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -151,10 +151,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  requirements: []
153
153
  rubyforge_project:
154
- rubygems_version: 2.4.8
154
+ rubygems_version: 2.6.12
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: Do something to a collection of items and see how long it is going to take.
158
158
  Useful for long-running Rake tasks.
159
159
  test_files: []
160
- has_rdoc: