eyes_core 3.17.3 → 3.17.9

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: c787872bfae6a5ebff57943e35298ec87694ddb2c981da7269d153c0070feab9
4
- data.tar.gz: 3879aa521a421e7ad6ad454de14ded53873bf04fe931dcf5088c143e564a22cf
3
+ metadata.gz: f71b5402a44fb9fb5b2615e736f41a2470f4482b86a5d4667cffbce6f486b9fc
4
+ data.tar.gz: bb83ec9f7d62f230db882d0d3e5adb1453533fcdb0a123b7b74d5d7463b97c1c
5
5
  SHA512:
6
- metadata.gz: f75c0d8811e9d2dfe57af4e4c43122dc0f501db4fbf14024218fd2c8c0c5d6e654953c17b57d66913ce4eb7255ad73bdd74bc432c8de8233f20caccd6e553b63
7
- data.tar.gz: cab966515a359bdccbb8e42dd43195624e9bd96ecc376ee29b3fddf17e5ed8520201b5a53221ed0dd8de7dc73c38418fdc4022ca2f8edc54dc0809f757c3eb46
6
+ metadata.gz: 5643814c5f9ed6da8112b7f9b3db17d9aede69508098b444eb4b83516452945192f51d2d09df2fb14148d1d72437aca73cf26865e5bbae77a0cff833f8b6d51f
7
+ data.tar.gz: e6055e95211eb305261fbf350aeae9f5f05b9dbef73d973cf62dcba5d53e812e2523a1ec37afe9404faaaaba0b969010e454d74af943cd13f3edcfbf9e78edbe
@@ -284,7 +284,6 @@ module Applitools::Connectivity
284
284
  endpoint_url, body: request_body
285
285
  )
286
286
  raise Applitools::EyesError.new("Request failed: #{res.status} #{res.body} #{request_body}") unless res.success?
287
-
288
287
  response = Oj.load(res.body)
289
288
  Applitools::Session.new(response, res.status == HTTP_STATUS_CODES[:created])
290
289
  end
@@ -14,7 +14,7 @@ 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]
17
+ send "#{k}=", default_config[k] unless default_config[k].nil?
18
18
  end
19
19
  end
20
20
  end
@@ -24,7 +24,7 @@ module Applitools
24
24
  config_keys.each do |k|
25
25
  new_config.send(
26
26
  "#{k}=", case value = send(k)
27
- when Symbol, FalseClass, TrueClass, Integer, Float
27
+ when Symbol, FalseClass, TrueClass, Integer, Float, NilClass
28
28
  value
29
29
  else
30
30
  value.clone
@@ -12,9 +12,9 @@ require 'applitools/core/image_match_settings'
12
12
  module Applitools
13
13
  class EyesBaseConfiguration < AbstractConfiguration
14
14
  DEFAULT_CONFIG = {
15
- branch_name: ENV['APPLITOOLS_BRANCH'] || '',
16
- parent_branch_name: ENV['APPLITOOLS_PARENT_BRANCH'] || '',
17
- baseline_branch_name: ENV['APPLITOOLS_BASELINE_BRANCH'] || '',
15
+ branch_name: ENV['APPLITOOLS_BRANCH'],
16
+ parent_branch_name: ENV['APPLITOOLS_PARENT_BRANCH'],
17
+ baseline_branch_name: ENV['APPLITOOLS_BASELINE_BRANCH'],
18
18
  save_diffs: false,
19
19
  server_url: ENV['APPLITOOLS_SERVER_URL'] ||
20
20
  ENV['bamboo_APPLITOOLS_SERVER_URL'] || Applitools::Connectivity::ServerConnector::DEFAULT_SERVER_URL,
@@ -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
@@ -42,7 +42,11 @@ module Applitools
42
42
  end
43
43
 
44
44
  def json_data
45
- result = self.class.json_methods.sort.map { |k, v| [k, json_value(send(v))] }.to_h
45
+ result = self.class.json_methods.sort.map do |k,v|
46
+ val = json_value(send(v))
47
+ next if val.nil?
48
+ [k, val]
49
+ end.compact.to_h
46
50
  result = self.class.wrap_data_block.call(result) if self.class.wrap_data_block.is_a? Proc
47
51
  result
48
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.17.3'.freeze
4
+ VERSION = '3.17.9'.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.3
4
+ version: 3.17.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-09 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png
@@ -370,7 +370,7 @@ licenses:
370
370
  - Applitools
371
371
  metadata:
372
372
  yard.run: yri
373
- post_install_message:
373
+ post_install_message:
374
374
  rdoc_options: []
375
375
  require_paths:
376
376
  - lib
@@ -387,7 +387,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
387
387
  version: '0'
388
388
  requirements: []
389
389
  rubygems_version: 3.0.8
390
- signing_key:
390
+ signing_key:
391
391
  specification_version: 4
392
392
  summary: Core of the Applitools Ruby SDK
393
393
  test_files: []