watchdoge 0.0.18 → 0.0.19

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
  SHA256:
3
- metadata.gz: f1255a9fce4e99291b3fe8711ad2fbbc85591e8b55dbb7d178abc2d87b339414
4
- data.tar.gz: bb3e38c2da5aec42d638fd1c915165d74d7bf85c13a48ce360bee1bc9b4ff9f9
3
+ metadata.gz: 398c14865e7fef97f94eff50002f7de2623878eb022aedb31d16ff5995a2aaa3
4
+ data.tar.gz: 7e6c5d44a7f720dc2825c7484bd194fc2382816423c0ecf77aa44621d89a3f54
5
5
  SHA512:
6
- metadata.gz: 84b279bd118d1056638ad6f7033af9addbd4369308147113bf7328c52af2685866a7e16715217754433251d7203ec7b24f4b220ad98eac19e9ae0a1a45514b66
7
- data.tar.gz: 79162b0e6ca9950fa6cc4ec209e8134c14b70c2d57b515cbf4bcf560cbb1b7d54eec44c18711c61738081e9c2c413aea69903520c5918fec64eecfa76c4779ad
6
+ metadata.gz: c40e84bba42b2fd4be21b64576bf97d0cff5d9451447a49fe8deadf8c4eeaf21f867d6057cb87842ef8edb4e4fa9783eaed7cf3079d12f2c61c399bf663c953e
7
+ data.tar.gz: 9779a8aa2a0d0de5e96b7a34c5c3f931be3d13cbff206d52d34802492be28e6e88c76feae7ca635ad5ad062c3358b1d79a67ed829bc2822831835be5e8aefc53
@@ -7,12 +7,14 @@ module WatchDoge
7
7
  def diff input_image, reference_image
8
8
  return nil if input_image.pixels.hash == reference_image.pixels.hash
9
9
 
10
+ dup_input_image = input_image.dup
11
+
10
12
  input_image.height.times do |y|
11
13
  pixels = input_image.row(y)
12
14
 
13
15
  if y >= reference_image.height
14
16
  pixels.each_with_index do |pixel, x|
15
- input_image.compose_pixel(x, y, HIGHLIGHT_COLOR)
17
+ dup_input_image.compose_pixel(x, y, HIGHLIGHT_COLOR)
16
18
  end
17
19
  else
18
20
  reference_pixels = reference_image.row(y)
@@ -21,14 +23,14 @@ module WatchDoge
21
23
 
22
24
  pixels.each_with_index do |pixel, x|
23
25
  if pixels[x] != reference_pixels[x]
24
- input_image.compose_pixel(x, y, reference_pixels[x])
25
- input_image.compose_pixel(x, y, HIGHLIGHT_COLOR)
26
+ dup_input_image.compose_pixel(x, y, reference_pixels[x])
27
+ dup_input_image.compose_pixel(x, y, HIGHLIGHT_COLOR)
26
28
  end
27
29
  end
28
30
  end
29
31
  end
30
32
 
31
- input_image
33
+ dup_input_image
32
34
  end
33
35
  end
34
36
  end
@@ -1,3 +1,3 @@
1
1
  module WatchDoge
2
- Version = '0.0.18'
2
+ Version = '0.0.19'
3
3
  end
data/watchdoge.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'watchdoge'
3
- s.version = '0.0.18'
3
+ s.version = '0.0.19'
4
4
  s.date = '2019-07-22'
5
5
  s.summary = "dogi"
6
6
  s.description = "A collection of web test tools"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchdoge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shen Lee