eyes_core 3.15.40 → 3.15.41

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: f287ee6b9af278790d07eee670dfe45e402603b4da97e2e28780351a1c2e1d9f
4
- data.tar.gz: a542a05b7bf9c4d911bcac1ee9f456fdb7250b03c74b54ca1b455c6b08f61c19
3
+ metadata.gz: 65eb7ce08703d04d88ccedfbaa9e288994441dc2bfe72fa923686ffd21edd252
4
+ data.tar.gz: 2db62f105f9c6f508643bbac02c6433070b7e11a47700815d3504b860dbf2462
5
5
  SHA512:
6
- metadata.gz: 4a0a95ca5cf486ff3b45c5e7560c23dc9c6df106a00aba4cfa0cca4bc85eb27c98f8f46b614b41fd29e434a669d7b16b115c2afae35e973cd708960d2b5ee1b8
7
- data.tar.gz: 40a60b73a2db57f99c8eef611286b376d1410db5b9cb151915dc34705af358e393a0f0d6beaaf0f3c5086a9a330a0f82370cdb15de78e0f0e2dcec614d3c05b0
6
+ metadata.gz: 42093feb7b67f4b0049992cc92937a56ae10af2073fd4d6f3d87f8da0b1a8450e7a0bd4405ffe01520c20c71b9590a151001603b22e55ef927ade7872d3ce291
7
+ data.tar.gz: eb91bd59cc5556581e2872b3d57af6f571ab68da170bd7bcb666b837556936c8d1f3ceb73fa1ed0f26c1fa91748e76de91d3d6ace1f93a89d6d42fc2b38648a2
@@ -104,7 +104,7 @@ module Applitools::Connectivity
104
104
  Oj.load(response.body)
105
105
  end
106
106
 
107
- def download_resource(url)
107
+ def download_resource(url, ua_string = nil)
108
108
  Applitools::EyesLogger.debug "Fetching #{url}..."
109
109
  resp_proc = proc do |u|
110
110
  Faraday::Connection.new(
@@ -114,6 +114,7 @@ module Applitools::Connectivity
114
114
  ).send(:get) do |req|
115
115
  req.options.timeout = DEFAULT_TIMEOUT
116
116
  req.headers['Accept-Encoding'] = 'identity'
117
+ req.headers['User-Agent'] = ua_string if ua_string
117
118
  end
118
119
  end
119
120
  response = resp_proc.call(url)
@@ -163,7 +164,6 @@ module Applitools::Connectivity
163
164
 
164
165
  def match_window(session, data)
165
166
  # Notice that this does not include the screenshot.
166
- puts data.to_hash
167
167
  json_data = Oj.dump(Applitools::Utils.camelcase_hash_keys(data.to_hash)).force_encoding('BINARY')
168
168
  body = [json_data.length].pack('L>') + json_data + data.screenshot
169
169
  Applitools::EyesLogger.debug 'Sending match data...'
@@ -185,6 +185,12 @@ module Applitools::Utils
185
185
  nil
186
186
  end
187
187
 
188
+ # @param [Applitools::Selenium::Driver] executor
189
+ # @return [String] User agent string
190
+ def user_agent(executor)
191
+ executor.execute_script(JS_GET_USER_AGENT)
192
+ end
193
+
188
194
  # @param [Applitools::Selenium::Driver] executor
189
195
  # @return [Applitools::Location] {Applitools::Location} instance which indicates current scroll
190
196
  # position
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.15.40'.freeze
4
+ VERSION = '3.15.41'.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.15.40
4
+ version: 3.15.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-03 00:00:00.000000000 Z
11
+ date: 2019-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png