eyes_core 3.16.7 → 3.16.8

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: 5cf31bf1fdae6c75e1517e0db4839a6d0331fc4afd3a5d86fc01299a8e84bd53
4
- data.tar.gz: 1a001a48cf3a381e02855554d7b959e618877a0644c8135059bd9e27feb3836c
3
+ metadata.gz: 6547c1a134851d462d94fd4d87d122560d02f2dc7f88e411dea0d13769264df9
4
+ data.tar.gz: ae3a626f88f23de7fba67cd1e72f68e390c86fd6f071120839636d78018de445
5
5
  SHA512:
6
- metadata.gz: 2c37a84a9a9c967d7282bb1ed8c8491cf134d961708fb7f4ad9b15004c1d932ec2d169276fae359097435e03f6a87465c7962293560cf348ea4de3cb0e7642d4
7
- data.tar.gz: a8a3a376b24994573285ec88d1c789e08c1e3a3b6b106ebc9f595315f300edd482e97aa5c4eb05d5fef0f7aae8b2b1ebcf9b41bf21f03ef3d4a599cc15ece583
6
+ metadata.gz: 3350fd5a295f4d860a1020ae6a25123d1001a7390f5833eabc71a24148604504fd0057e8fa2c2fdb2ebe7615e5b773662136ed90d973fc3f8c094a77628f9152
7
+ data.tar.gz: f8722a0ec2a5838e2b22ce0c325549bf7bdf103a76158bc150007733296a772e4f635e191a0e4724ad7b8dd06de3d955ebc591bb370df6075308b7b7a7ade667
@@ -159,8 +159,9 @@ module Applitools::Connectivity
159
159
  proxy: @proxy.nil? ? nil : @proxy.to_hash
160
160
  ).send(:get) do |req|
161
161
  req.options.timeout = DEFAULT_TIMEOUT
162
- req.headers['Accept-Encoding'] = 'identity'
163
- req.headers['User-Agent'] = ua_string if ua_string
162
+ req.headers[:accept_encoding] = 'identity'
163
+ req.headers[:accept_language] = 'en'
164
+ req.headers[:user_agent] = ua_string if ua_string
164
165
  end
165
166
  end
166
167
  response = resp_proc.call(url)
@@ -169,7 +170,7 @@ module Applitools::Connectivity
169
170
  redirect_count -= 1
170
171
  response = resp_proc.call(response.headers['location'])
171
172
  end
172
- Applitools::EyesLogger.debug 'Done!'
173
+ Applitools::EyesLogger.debug "Done. (#{url} #{response.status})"
173
174
  response
174
175
  end
175
176
 
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Applitools
4
4
  class Future
5
- attr_accessor :result, :semaphore, :block, :thread
5
+ attr_accessor :result, :semaphore, :block, :thread, :description
6
6
 
7
- def initialize(semaphore, &block)
7
+ def initialize(semaphore, description = nil, &block)
8
8
  raise Applitools::EyesIllegalArgument, 'Applitools::Future must be initialized with a block' unless block_given?
9
9
  self.block = block
10
10
  self.semaphore = semaphore
11
+ self.description = description
11
12
  self.thread = Thread.new do
12
13
  begin
13
14
  self.result = yield(semaphore)
@@ -20,7 +21,8 @@ module Applitools
20
21
  end
21
22
 
22
23
  def get
23
- thread.join(15)
24
+ thread.join(350)
25
+ raise Applitools::EyesError, "Failed to execute future - got nil result! (#{description})" if result.nil?
24
26
  result
25
27
  end
26
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.16.7'.freeze
4
+ VERSION = '3.16.8'.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.16.7
4
+ version: 3.16.8
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-03-06 00:00:00.000000000 Z
11
+ date: 2020-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png