capybara-screenshot-diff 0.15.0 → 0.15.1

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: 79eb03ec72d66b7c8e8a1c2597238a0e4fed8d86c2f33150edb1d08c9d3a44b1
4
- data.tar.gz: 6d50e7b3a58e317f43a534ab1fc27a953f46232a40473d58a86aac10d91db6d2
3
+ metadata.gz: b36c962b23a2af28438bdfa5246f2f9bf612c705929bd57d3bdf023183e64317
4
+ data.tar.gz: e5bd86681099718612bf44099acb1cfdf958d906830f3a1059d3910915b34571
5
5
  SHA512:
6
- metadata.gz: 7beaab007bfbae3db191271d312ba70ec1ab29b0ff1d519c8b79d4ca1f600d88d00222e1c6910adf9e66ece549c69f64bc5626dc2bfe4071bcaafa31d1c767ea
7
- data.tar.gz: 9144c53f1a723a73ad6add946694775255132160affdc8308e84a9aa61d2b4ee32eeaa933bf471de648a8a124e8c7f359874e5fad92d844d5650d9d8607575b2
6
+ metadata.gz: bc296fd709ccd6a931cf2fc7de0e893ac084216b6c8fe1c8018e50e8ce1e716355f19db5cbaba457797db5e18f7a757561317b8c26a7967d118c3afd5ecaf680
7
+ data.tar.gz: 03e5c3b3a7351275d1472361cc0cb7cb705b7bf94abe61ac0f41dd27faf495a2e53c2f5085243d1ac598e8660fb0d74bd974e558289d1f1e469fe10a43789b1b
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-06-26 14:23:03 +0200 using RuboCop version 0.57.2.
3
+ # on 2019-04-11 18:39:44 +0200 using RuboCop version 0.67.2.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -8,24 +8,25 @@
8
8
 
9
9
  # Offense count: 12
10
10
  Metrics/AbcSize:
11
- Max: 55
11
+ Max: 50
12
12
 
13
- # Offense count: 1
13
+ # Offense count: 2
14
14
  # Configuration parameters: CountComments, ExcludedMethods.
15
+ # ExcludedMethods: refine
15
16
  Metrics/BlockLength:
16
17
  Max: 44
17
18
 
18
19
  # Offense count: 1
19
20
  # Configuration parameters: CountComments.
20
21
  Metrics/ClassLength:
21
- Max: 303
22
+ Max: 305
22
23
 
23
24
  # Offense count: 6
24
25
  Metrics/CyclomaticComplexity:
25
- Max: 13
26
+ Max: 18
26
27
 
27
- # Offense count: 16
28
- # Configuration parameters: CountComments.
28
+ # Offense count: 15
29
+ # Configuration parameters: CountComments, ExcludedMethods.
29
30
  Metrics/MethodLength:
30
31
  Max: 49
31
32
 
@@ -37,15 +38,15 @@ Metrics/ModuleLength:
37
38
  # Offense count: 1
38
39
  # Configuration parameters: CountKeywordArgs.
39
40
  Metrics/ParameterLists:
40
- Max: 6
41
+ Max: 7
41
42
 
42
43
  # Offense count: 6
43
44
  Metrics/PerceivedComplexity:
44
- Max: 15
45
+ Max: 18
45
46
 
46
47
  # Offense count: 2
47
48
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
48
- # AllowedNames: io, id, to, by, on, in, at
49
+ # AllowedNames: io, id, to, by, on, in, at, ip, db
49
50
  Naming/UncommunicativeMethodParamName:
50
51
  Exclude:
51
52
  - 'lib/capybara/screenshot/diff/image_compare.rb'
@@ -275,7 +275,11 @@ module Capybara
275
275
  end
276
276
 
277
277
  def same_color?(old_img, new_img, x, y)
278
- return true if @skip_area && @skip_area[0] <= x && x <= @skip_area[2] && @skip_area[1] <= y && y <= @skip_area[3]
278
+ if @skip_area && @skip_area[0] <= x && x <= @skip_area[2] &&
279
+ @skip_area[1] <= y && y <= @skip_area[3]
280
+ return true
281
+ end
282
+
279
283
  color_distance =
280
284
  color_distance_at(new_img, old_img, x, y, shift_distance_limit: @shift_distance_limit)
281
285
  if !@max_color_distance || color_distance > @max_color_distance
@@ -81,7 +81,7 @@ module Capybara
81
81
  end
82
82
 
83
83
  def stabilization_images(base_file)
84
- Dir["#{base_file.chomp('.png')}_x*.png~"]
84
+ Dir["#{base_file.chomp('.png')}_x*.png~"].sort
85
85
  end
86
86
 
87
87
  def clean_stabilization_images(base_file)
@@ -3,7 +3,7 @@
3
3
  module Capybara
4
4
  module Screenshot
5
5
  module Diff
6
- VERSION = '0.15.0'.freeze
6
+ VERSION = '0.15.1'.freeze
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-screenshot-diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Uwe Kubosch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-09 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack