eyes_core 3.17.5 → 3.17.11

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: 864e172f6fa3b2035c0e8aa7a655e98d83de4bfe07c821f2cef2260e5df12747
4
- data.tar.gz: e85acaa6dc31a5d09fc0e8060267b7c0be45c435fd54d5a1ef621a20d4c9de35
3
+ metadata.gz: 2571c9061121ca0314b4f0303272d8eeba1f38b03140c493d0f7eaf5255c01aa
4
+ data.tar.gz: 4b9d3a9bddcb845257f2ad0a1ed91d9648b634b30fcb1dde1ec26caf065a8296
5
5
  SHA512:
6
- metadata.gz: 3d62989db64a12ab1542ea9e1218a21646e5d209c17723570568f60ef13cfd8cd16aed6fd678afa34c5be60cb0c8d3c382b65b448760c52bf2faa49f89131601
7
- data.tar.gz: 57696e8e7e2145ef6570ac42f55cff2560046fd5ce3193f16c2f6328811e8439a50b3d9bbdfcbddfa9d745ce12840d4f6754ef668896b3c357c75d5803f59c28
6
+ metadata.gz: dd4185a87a13a565bd42b205b3e86229c147438becda63e15fa98ed9617e35d07447b315d6c02142baf316a848de9db42e3f09e0fca70bfad0b3878bb07a239d
7
+ data.tar.gz: 4b90596c1da6de18976f7adb5cd5be64c041ad9e4ff4d88d663951cc23ec4ed8ea47e956a549446af3d269b0e175acb636ff0ee80d29c4bcc49963119c81277a
@@ -14,7 +14,11 @@ module Applitools
14
14
  if self.class.respond_to? :default_config
15
15
  default_config = self.class.default_config
16
16
  default_config.keys.each do |k|
17
- send "#{k}=", default_config[k] unless default_config[k].nil?
17
+ unless default_config[k].nil?
18
+ send "#{k}=", default_config[k].deep_clone if default_config[k].respond_to?(:deep_clone)
19
+ send "#{k}=", default_config[k].clone if default_config[k].respond_to?(:clone)
20
+ send "#{k}=", default_config[k].clone unless default_config[k].respond_to?(:clone) || default_config[k].respond_to?(:deep_clone)
21
+ end
18
22
  end
19
23
  end
20
24
  end
@@ -24,7 +28,7 @@ module Applitools
24
28
  config_keys.each do |k|
25
29
  new_config.send(
26
30
  "#{k}=", case value = send(k)
27
- when Symbol, FalseClass, TrueClass, Integer, Float
31
+ when Symbol, FalseClass, TrueClass, Integer, Float, NilClass
28
32
  value
29
33
  else
30
34
  value.clone
@@ -111,6 +111,7 @@ module Applitools
111
111
  int_field :scale
112
112
  int_field :remainder
113
113
  boolean_field :ignore_caret
114
+ boolean_field :ignore_displacements
114
115
  object_field :accessibility_validation, Applitools::AccessibilitySettings, true
115
116
  object_field :properties, Array
116
117
 
@@ -141,6 +142,14 @@ module Applitools
141
142
  default_match_settings.remainder = value
142
143
  end
143
144
 
145
+ def custom_setter_for_ignore_displacements(value)
146
+ default_match_settings.ignore_displacements = value
147
+ end
148
+
149
+ def custom_getter_for_ignore_displacements(_value)
150
+ default_match_settings.ignore_displacements
151
+ end
152
+
144
153
  def custom_getter_for_exact(_value)
145
154
  default_match_settings.exact
146
155
  end
@@ -39,7 +39,7 @@ module Applitools
39
39
  cloned_value = self.class.new
40
40
  self.class.json_methods.keys.each do |f|
41
41
  new_value = case (v = send(f))
42
- when Symbol, FalseClass, TrueClass, Integer, Float
42
+ when Symbol, FalseClass, TrueClass, Integer, Float, NilClass
43
43
  v
44
44
  else
45
45
  v.clone
@@ -58,6 +58,18 @@ module Applitools
58
58
  self.accessibility_settings = value
59
59
  end
60
60
 
61
+ def ==(other)
62
+ return true if other.object_id == object_id
63
+ result = true
64
+ self.class.json_methods.keys.each do |f|
65
+ result = send(f) == other.send(f)
66
+ break unless result
67
+ end
68
+ result
69
+ end
70
+
71
+ alias deep_clone deep_dup
72
+
61
73
  class Exact
62
74
  include Applitools::Jsonable
63
75
  json_fields :MinDiffIntensity, :MinDiffWidth, :MinDiffHeight, :MatchThreshold
@@ -68,7 +68,7 @@ module Applitools
68
68
  @need_convert_content_regions_coordinates = false
69
69
  @need_convert_layout_regions_coordinates = false
70
70
  @need_convert_accessibility_regions_coordinates = false
71
- self.default_image_match_settings = default_image_match_settings.deep_dup || Applitools::ImageMatchSettings.new
71
+ self.default_image_match_settings = default_image_match_settings.nil? ? Applitools::ImageMatchSettings.new : default_image_match_settings.deep_dup
72
72
  end
73
73
 
74
74
  def screenshot
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.17.5'.freeze
4
+ VERSION = '3.17.11'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.5
4
+ version: 3.17.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2020-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png
@@ -164,90 +164,6 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: pry
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: pry-byebug
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: byebug
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: pry-doc
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: pry-stack_explorer
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - ">="
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - ">="
235
- - !ruby/object:Gem::Version
236
- version: '0'
237
- - !ruby/object:Gem::Dependency
238
- name: rb-readline
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - ">="
242
- - !ruby/object:Gem::Version
243
- version: '0'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- version: '0'
251
167
  description: Don't use it directly, take a look at eyes_selenium, eyes_images or eyes_calabash
252
168
  gems instead.
253
169
  email: