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 +4 -4
- data/.travis.yml +1 -2
- data/duration_estimate.gemspec +3 -3
- data/lib/duration_estimate.rb +13 -0
- data/lib/duration_estimate/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3cdcccfb9aa61cc100ee224ce4f6fbd639d55c3
|
4
|
+
data.tar.gz: a335443d0f283841bb91dd0c7be2c819df72be99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b69c8f431f9c9bc8e1e3fa7067c5dfcbfd82a5bc2379ebf13f12265694f11eddd49f2340883716c1e3a762ecf346fcfd7a9f5d43c08b2c01f8805c6752f2f815
|
7
|
+
data.tar.gz: 6cb464da7c527616a23a86141aa2848dcafe05dc5ffd41011c77fd7b7eb36c09f3b23f6977fac323aa77dad8b74fcb3e079774e921093bbeac1c00aac09d8679
|
data/.travis.yml
CHANGED
data/duration_estimate.gemspec
CHANGED
@@ -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.
|
29
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
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
|
+
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'
|
data/lib/duration_estimate.rb
CHANGED
@@ -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
|
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.
|
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:
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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:
|