eyes_core 3.18.2 → 3.18.3

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
  SHA1:
3
- metadata.gz: 36a1a5082471151d4ccbc5683bc06802ae56b776
4
- data.tar.gz: 1574274f76f4e4eaa271c70308592d3324856d2c
3
+ metadata.gz: b75c9b6d9f7188f819aa7e2e0402056ef87c2454
4
+ data.tar.gz: 912b814145c5b47d81bff5424a939806f38dd8cc
5
5
  SHA512:
6
- metadata.gz: 62858147e7ee749c0dfdbb3dfdb992d3ecd8ec7f4269f789a9d71fae9ad007802cd31401382bb08e37b35375f3b532406d6cb9729fb412c2cdadaeba1db8e194
7
- data.tar.gz: 6681412cf7e58b2e9a3e824ed82bc3dcf1bb1ef1f36e7d045076b8068c1f674614205305c7dbf67875965dee7a21071fa86f7ce8fda102699f64f075eaffb93a
6
+ metadata.gz: c87057e3092012f7621acc3a61868bcdde84813f4abdf6af9fdf1f8b0e3855ce60fb458bb89bc6907bb1f6949e4f9a6711ff7f805e2ab88aadd752eca96d384f
7
+ data.tar.gz: efa26a008603071e3734ad5033f3c20e55927aede90551e12bf68cd846a59608442836c5db3de7ffa96f8590b512912e11c22e04b42355f0e8075cdd6a1796b1
@@ -167,7 +167,7 @@ module Applitools::Connectivity
167
167
  Oj.load(response.body)
168
168
  end
169
169
 
170
- def download_resource(url, ua_string = nil)
170
+ def download_resource(url, ua_string = nil, cookies=nil)
171
171
  Applitools::EyesLogger.debug "Fetching #{url}..."
172
172
  resp_proc = proc do |u|
173
173
  faraday_connection(u, false).send(:get) do |req|
@@ -175,6 +175,7 @@ module Applitools::Connectivity
175
175
  req.headers[:accept_encoding] = 'identity'
176
176
  req.headers[:accept_language] = '*'
177
177
  req.headers[:user_agent] = ua_string if ua_string
178
+ req.headers[:Cookie] = cookies.map { |h| [h[:name], h[:value]].join('=') }.join('; ') unless cookies.to_a.empty?
178
179
  end
179
180
  end
180
181
  response = resp_proc.call(url)
@@ -25,7 +25,10 @@ module Applitools
25
25
  default_match_settings: Applitools::ImageMatchSettings.new,
26
26
  accessibility_validation: nil,
27
27
  properties: [],
28
- match_timeout: DEFAULT_MATCH_TIMEOUT
28
+ match_timeout: DEFAULT_MATCH_TIMEOUT,
29
+ dont_fetch_resources: true,
30
+ enable_cross_origin_rendering: true,
31
+ dont_use_cookies: false,
29
32
  }.freeze
30
33
 
31
34
  class << self
@@ -119,6 +122,9 @@ module Applitools
119
122
  object_field :properties, Array
120
123
  int_field :match_timeout
121
124
  string_field :agent_run_id
125
+ boolean_field :dont_fetch_resources
126
+ boolean_field :enable_cross_origin_rendering
127
+ boolean_field :dont_use_cookies
122
128
 
123
129
  methods_to_delegate.delete(:batch_info)
124
130
  methods_to_delegate.delete(:batch_info=)
@@ -188,6 +194,10 @@ module Applitools
188
194
  properties << { name: name, value: value } if name && value
189
195
  end
190
196
 
197
+ def disable_browser_fetching=(value)
198
+ self.dont_fetch_resources = value
199
+ end
200
+
191
201
  methods_to_delegate.push(:set_proxy)
192
202
  methods_to_delegate.push(:add_property)
193
203
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.18.2'.freeze
4
+ VERSION = '3.18.3'.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.18.2
4
+ version: 3.18.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-05 00:00:00.000000000 Z
11
+ date: 2021-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png