depralyzer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/depralyzer/generator.rb +6 -3
- data/lib/depralyzer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d52e868100c813c02c3230f7e975b67b846af89c9cbf283256a88aa285ebe39d
|
4
|
+
data.tar.gz: 9b8193303c92dccfcb7985443375143b0f83541077a366e29823d1754fb5db33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf62b72be1528d168d585aae9cda752c3587276ca7496f0920aafe1d9a22f123f4fdc914fe1d793b7f3c51121a5621b75a585c0dabc7e348f6e2c1202187777d
|
7
|
+
data.tar.gz: 2cebad4e68d11b596984200370621e74d8d1a461fd59a43a1f8ce26a5dda174fd204d1dfd0113852736ab8be0eb812b1ed84622946a96136c326d87138ea2524
|
data/lib/depralyzer/generator.rb
CHANGED
@@ -23,10 +23,13 @@ module Depralyzer
|
|
23
23
|
|
24
24
|
def pretty_output(summary)
|
25
25
|
puts "Total of #{summary.size} deprecation types with #{occurrence(summary)} occurrences"
|
26
|
-
summary.
|
26
|
+
m1 = summary.sort_by { |_, value| -value.values.inject(0) { |sum, x| sum + x }}.to_h
|
27
|
+
m1.each do |top, details|
|
27
28
|
puts
|
28
|
-
puts "### #{top}"
|
29
|
-
|
29
|
+
puts "### #{top} (#{details.values.inject(0) { |sum, x| sum + x }})"
|
30
|
+
|
31
|
+
m = details.sort_by { |_, value| -value}.to_h
|
32
|
+
m.each do |note, cnt|
|
30
33
|
puts sprintf("- %10d %s", cnt, note)
|
31
34
|
end
|
32
35
|
end
|
data/lib/depralyzer/version.rb
CHANGED