img-lint 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/img-lint +2 -0
- data/lib/img_lint/linter.rb +3 -1
- 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: 5c17b75b315760007064f86fc3282938fb824388
|
4
|
+
data.tar.gz: 47caa70b9662c88e91e9233a23b3e283d4dfe42c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13e31daab649ee59ce6acce0da5ee7c8d57dd45121079e49b825284fec46203bc156daefcae8555d4c2553a820c73f093b3c5336ea701b25a0ff0125d1273748
|
7
|
+
data.tar.gz: bb41bb886cd1addde833686b6e79aa88d592c5af3b8f1c7d423f66bf6609991798403c4252a4015ff5ac8e720cb366166498b251949cffb20660e5fdd64a6551
|
data/bin/img-lint
CHANGED
data/lib/img_lint/linter.rb
CHANGED
@@ -13,7 +13,7 @@ module IMGLint
|
|
13
13
|
|
14
14
|
images = Dir.glob(%(#{path}/**/*.{#{config["image_formats"]}}))
|
15
15
|
|
16
|
-
puts "No images found in #{path}" if images.empty?
|
16
|
+
puts "No images found in #{path}" if verbose && images.empty?
|
17
17
|
|
18
18
|
fat_images = images.select do |file|
|
19
19
|
File.new(file).size > max_file_size * 1024
|
@@ -25,6 +25,8 @@ module IMGLint
|
|
25
25
|
fat_images.each do |image|
|
26
26
|
file_size = File.new(image).size / 1024
|
27
27
|
|
28
|
+
image.sub!(Dir.pwd, "") if Dir.pwd == path
|
29
|
+
|
28
30
|
puts [image, "#{file_size}Kb"].join("\t")
|
29
31
|
end
|
30
32
|
end
|
data/lib/img_lint/version.rb
CHANGED