img-lint 0.0.11 → 0.0.12

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
  SHA1:
3
- metadata.gz: 29860afa014eac2d56512a7737fe74b99494f0f3
4
- data.tar.gz: 693f34d70655716e14a649ad0900654530ebb201
3
+ metadata.gz: 6cf50c5e2e6d1df21d7d3a185ce614779ec25754
4
+ data.tar.gz: 9fa79b54735ef29baf629ca2ad65be98265f4a3f
5
5
  SHA512:
6
- metadata.gz: dd1027be47bd990671476e1bfd3e241256bb6f3b9406e3f599023de9f46c95904d1c6f1847b270b601c170909bee257029d613c07937a308a77e89ce83270bb7
7
- data.tar.gz: 0454792e509e7da64964bd6b8b894324c52cdeb9dded9a465d2e11ef32fa44eb2d480c16694c406f6e6f981e30fedcfd8956de65a13c16f8c7157a6c4595a36a
6
+ metadata.gz: ac14a3b290a8f67cde73748c0dbe95637a4e97dc7a32dd33ff0b5c3b71d8c5fd5279b339cd5bb2b9678da2215bd223ce5ec473f57f7ed869d834d0ecf8dcfd81
7
+ data.tar.gz: b44b63f86d212701dd0f682a13634255ddaee87f73ad556d593ddf256de31559a198d226e7ff93a543aa4366a64ffbc835db8c33cd2725e1f840fbe426d8e2cb
@@ -54,10 +54,13 @@ module IMGLint
54
54
 
55
55
  puts "Suspicious images:"
56
56
 
57
- fat_images.each do |image|
58
- file_size = File.new(image).size / 1024
57
+ fat_images = fat_images.inject({}) do |hash, image|
58
+ hash[image] = File.new(image).size / 1024
59
+ hash
60
+ end
59
61
 
60
- image.sub!(Dir.pwd, "") if Dir.pwd == path
62
+ fat_images.sort_by(&:last).reverse.each do |image, file_size|
63
+ image = image.sub(Dir.pwd, "") if Dir.pwd == path
61
64
 
62
65
  puts [image, "#{file_size}Kb"].join("\t")
63
66
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IMGLint
4
- VERSION = "0.0.11".freeze
4
+ VERSION = "0.0.12".freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: img-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoli Makarevich