image_compare 1.0.6 → 1.0.7

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: 23eba1fc057ba2ec6ad089496b1ba60b6e7b5290cd181c08cc7d413729b83eff
4
- data.tar.gz: e3adbb49a9da518ce1867ca09ad8272aac9250b0f6d61a524e4a989a00133d57
3
+ metadata.gz: 83bfbc6343288b7b1c56f8b96df48e941b67aeb6c70f6628f08c11f0a224a48f
4
+ data.tar.gz: 2fa90cd2bba4c93988c1ca73cb55d29bf44e22d7375a5146f17c9a17597d8219
5
5
  SHA512:
6
- metadata.gz: 5179a1d7f11c7189188f2027a092cc5f69050148f94e8947218f3f404aa60f11f1c8b266559b0b1c0363b11f4177b0f3ccec284460c62b777917ca0f73d19ccc
7
- data.tar.gz: da70a3d2e6e085501fda1d3aac1804d811733eeab02549a6cd7395c5eae6d00369b4e1d90360de34020481acb866e3cc90d3988a50789b006fdc5d7db10cbaa4
6
+ metadata.gz: ccdbc41fff4603801acb2ba62c7ee6e13b7b0dbed0e32509625958ac87dc5ab3dfa4e0cfb2aaf61226d52cfbcdd7cc324fb3c8a93a5e526512fa5cf64dc74a67
7
+ data.tar.gz: d0f1c158fe61387fb011ddd1da2265f6636c67799894fa9dec41927b1b6dbd51eb240042f8afaed435f254a49a36aac0112e971911f73e0135eae07330aa2fcd
data/CHANGELOG.md CHANGED
@@ -8,6 +8,7 @@
8
8
  - v1.0.4: Fix gem documentation images ([@gsguma][])
9
9
  - v1.0.5: Fix gem documentation ([@gsguma][])
10
10
  - v1.0.6: Fix the error when trying to add a rect exclude area that is partially outside the image bounds ([@gsguma][])
11
+ - v1.0.7: Fix all code smells and integration tests ([@gsguma][], [@cristianofmc][])
11
12
 
12
13
  [@gsguma]: https://github.com/gsguma
13
14
  [@cristianofmc]: https://github.com/cristianofmc
@@ -16,12 +16,14 @@ module ImageCompare
16
16
  super(**options)
17
17
  end
18
18
 
19
- def diff(bg, diff)
19
+ def diff(bg, _diff)
20
20
  diff_image = bg.highlight_rectangle(exclude_rect, :blue)
21
21
 
22
- return diff_image if self.result.match?
22
+ unless result.match? || area_in_exclude_rect?
23
+ return diff_image.highlight_rectangle(bounds, :red)
24
+ end
23
25
 
24
- diff_image.highlight_rectangle(bounds) unless area_in_exclude_rect?
26
+ diff_image
25
27
  end
26
28
 
27
29
  def area_in_exclude_rect?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ImageCompare
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_compare
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - cristianofmc
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-04-05 00:00:00.000000000 Z
12
+ date: 2023-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png
@@ -91,7 +91,7 @@ licenses:
91
91
  metadata:
92
92
  bug_tracker_uri: https://github.com/instantink/image_compare/issues
93
93
  changelog_uri: https://github.com/instantink/image_compare/blob/master/CHANGELOG.md
94
- documentation_uri: https://www.rubydoc.info/gems/image_compare/1.0.6
94
+ documentation_uri: https://www.rubydoc.info/gems/image_compare/1.0.7
95
95
  homepage_uri: https://github.com/instantink/image_compare
96
96
  source_code_uri: https://github.com/instantink/image_compare
97
97
  post_install_message: