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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9af3a7c5bb62a19e5ad07d916acb4f75030d574d
4
- data.tar.gz: 2c32d09f3778b34251e032777abe4c3fbea63a06
3
+ metadata.gz: 871ebd6f6060b81c8c151818bac5d8502f8e5611
4
+ data.tar.gz: 8c3333ee99c73a87b3fe743b3d92a69f5ef35341
5
5
  SHA512:
6
- metadata.gz: 7e4acd1d10dcc9df97f2eaab037f3a53546f3a4f93be23b577212a9706263337ee93e49302d0ee8da285fd4713a6dbaa8c14f00faf6821afeb4c7b550784770b
7
- data.tar.gz: 4bc39831d2319ec2f30d101865033a445e6712ccedf5cfa2ae94f83b1daf6bdbfd2bf625532d920d8c9e4a679bd33b007126dcf0fadf4f696b20813a5b51a7ef
6
+ metadata.gz: 6adc77670a92385c4d5d198b2263f1768c077819198bfd77e9084a2fb8ca6c3d196b0a3613572bad32cff73d09c7d3cb0a5c110b054cf8299fc976ba13a28613
7
+ data.tar.gz: 3329bb16d534c05a8e76ed3f4bb53f2d54d9fc06c4dc850c09715a49e50bf6d8c93faf0bd81de9e436dcd5bc4b4065ec2643565502a0676eee81febaeb8ad62b
@@ -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
@@ -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
@@ -14,5 +14,5 @@
14
14
  # limitations under the License.
15
15
 
16
16
  module KitchenBlame
17
- VERSION = '0.7.0'.freeze
17
+ VERSION = '0.7.1'.freeze
18
18
  end
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.0
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-25 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler