kitchen_blame 0.7.0 → 0.7.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/kitchen_blame.rb +5 -2
- data/lib/kitchen_blame/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 871ebd6f6060b81c8c151818bac5d8502f8e5611
|
4
|
+
data.tar.gz: 8c3333ee99c73a87b3fe743b3d92a69f5ef35341
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6adc77670a92385c4d5d198b2263f1768c077819198bfd77e9084a2fb8ca6c3d196b0a3613572bad32cff73d09c7d3cb0a5c110b054cf8299fc976ba13a28613
|
7
|
+
data.tar.gz: 3329bb16d534c05a8e76ed3f4bb53f2d54d9fc06c4dc850c09715a49e50bf6d8c93faf0bd81de9e436dcd5bc4b4065ec2643565502a0676eee81febaeb8ad62b
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
8
8
|
### Added
|
9
9
|
-
|
10
10
|
|
11
|
+
## [0.7.1] - 2017-07-28
|
12
|
+
### Fixed
|
13
|
+
- Padding to properly align text
|
14
|
+
|
11
15
|
## [0.7.0] - 2017-07-25
|
12
16
|
### Added
|
13
17
|
- If specified log match is the term 'latest' analyze the most recent log
|
data/lib/kitchen_blame.rb
CHANGED
@@ -110,10 +110,11 @@ module KitchenBlame
|
|
110
110
|
recipe = match_data[:recipe]
|
111
111
|
{ recipe: recipe, time: time }
|
112
112
|
end
|
113
|
+
max_duration = recipe_lines.compact.each_cons(2).map {|pair| measure_pair(pair)}.max
|
113
114
|
recipe_lines.compact.each_cons(2) do |pair|
|
114
115
|
recipe = pair.first[:recipe]
|
115
116
|
duration = measure_pair(pair)
|
116
|
-
puts "#{duration} seconds for recipe #{recipe}"
|
117
|
+
puts "#{duration.to_s.ljust(max_duration.to_s.length)} seconds for recipe #{recipe}"
|
117
118
|
end
|
118
119
|
end
|
119
120
|
# rubocop:enable MethodLength
|
@@ -128,10 +129,12 @@ module KitchenBlame
|
|
128
129
|
log = match_data[:log]
|
129
130
|
{ log: log, time: time }
|
130
131
|
end
|
132
|
+
max_duration = log_lines.compact.each_cons(2).map {|pair| measure_pair(pair)}.max
|
133
|
+
puts max_duration
|
131
134
|
log_lines.compact.each_cons(2) do |pair|
|
132
135
|
log = pair.first[:log]
|
133
136
|
duration = measure_pair(pair)
|
134
|
-
puts "#{duration} seconds for entry #{log}"
|
137
|
+
puts "#{duration.to_s.ljust(max_duration.to_s.length)} seconds for entry #{log}"
|
135
138
|
end
|
136
139
|
end
|
137
140
|
# rubocop:enable MethodLength
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen_blame
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian O'Connell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|