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 +4 -4
- data/lib/img_lint/linter.rb +6 -3
- data/lib/img_lint/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cf50c5e2e6d1df21d7d3a185ce614779ec25754
|
4
|
+
data.tar.gz: 9fa79b54735ef29baf629ca2ad65be98265f4a3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac14a3b290a8f67cde73748c0dbe95637a4e97dc7a32dd33ff0b5c3b71d8c5fd5279b339cd5bb2b9678da2215bd223ce5ec473f57f7ed869d834d0ecf8dcfd81
|
7
|
+
data.tar.gz: b44b63f86d212701dd0f682a13634255ddaee87f73ad556d593ddf256de31559a198d226e7ff93a543aa4366a64ffbc835db8c33cd2725e1f840fbe426d8e2cb
|
data/lib/img_lint/linter.rb
CHANGED
@@ -54,10 +54,13 @@ module IMGLint
|
|
54
54
|
|
55
55
|
puts "Suspicious images:"
|
56
56
|
|
57
|
-
fat_images.
|
58
|
-
|
57
|
+
fat_images = fat_images.inject({}) do |hash, image|
|
58
|
+
hash[image] = File.new(image).size / 1024
|
59
|
+
hash
|
60
|
+
end
|
59
61
|
|
60
|
-
|
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
|
data/lib/img_lint/version.rb
CHANGED