img-lint 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3ff40d7655dee58b777c342aa642c40667eb0684
4
- data.tar.gz: 4db1488a433af5766342eec9aafd294bd2a0dcaa
3
+ metadata.gz: 5c17b75b315760007064f86fc3282938fb824388
4
+ data.tar.gz: 47caa70b9662c88e91e9233a23b3e283d4dfe42c
5
5
  SHA512:
6
- metadata.gz: 4564a5591f77e2c9171960dd34118e1ce3e5049d2d1d4bd699fa7c96697be7c025be7317f81e6deb8b6894ba93f65bd287a1a2fa9a85a037102dab00372377bb
7
- data.tar.gz: 94508c881a2c24e43cb0f09d5c44a208b5c5f8f768757ee87ad54c2b098279352c92a79f96533d6d45d81602feb7616db5f8e2b58fa3b2c0a8006f9a2f41d906
6
+ metadata.gz: 13e31daab649ee59ce6acce0da5ee7c8d57dd45121079e49b825284fec46203bc156daefcae8555d4c2553a820c73f093b3c5336ea701b25a0ff0125d1273748
7
+ data.tar.gz: bb41bb886cd1addde833686b6e79aa88d592c5af3b8f1c7d423f66bf6609991798403c4252a4015ff5ac8e720cb366166498b251949cffb20660e5fdd64a6551
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ $LOAD_PATH << File.expand_path("../../lib", __FILE__)
4
+
3
5
  require "img_lint"
4
6
  require "img_lint/config"
5
7
  require "img_lint/linter"
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IMGLint
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.7"
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anatoli Makarevich