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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b510d4e5c3a666cd31b7b5a878268b15c317f5022c55763ba69b237bd9f19d51
4
- data.tar.gz: 998efba992e9ccf1384efff35c6750df981856c8f287cf833a064cce2e87ff6b
3
+ metadata.gz: d52e868100c813c02c3230f7e975b67b846af89c9cbf283256a88aa285ebe39d
4
+ data.tar.gz: 9b8193303c92dccfcb7985443375143b0f83541077a366e29823d1754fb5db33
5
5
  SHA512:
6
- metadata.gz: 3ec32ecb0252db280fd1341b86f51d86cc5de603b8267b7f172e3cb70d6cbf3bcec21b1893cd6b39820e6a810c4852cd6a4d37efd0414a9cef83837acd13dbd6
7
- data.tar.gz: 23041a5964e05353493ed1eee45b002e801c6d0f770babea0e68a316256e970bc4a51d710543d266d1772b974f29edb9d92383eaf85f3ecae042f6c2ff66429e
6
+ metadata.gz: cf62b72be1528d168d585aae9cda752c3587276ca7496f0920aafe1d9a22f123f4fdc914fe1d793b7f3c51121a5621b75a585c0dabc7e348f6e2c1202187777d
7
+ data.tar.gz: 2cebad4e68d11b596984200370621e74d8d1a461fd59a43a1f8ce26a5dda174fd204d1dfd0113852736ab8be0eb812b1ed84622946a96136c326d87138ea2524
@@ -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.each do |top, details|
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
- details.each do |note, cnt|
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
@@ -4,5 +4,5 @@
4
4
  # Gem version
5
5
  #
6
6
  module Depralyzer
7
- VERSION = '0.1.2'
7
+ VERSION = '0.1.3'
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depralyzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothy Chambers