eyes_core 6.4.2 → 6.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +160 -0
- data/eyes_core.gemspec +1 -1
- data/lib/applitools/core/classic_runner.rb +3 -2
- data/lib/applitools/core/eyes_runner.rb +4 -3
- data/lib/applitools/eyes_core/version.rb +1 -1
- data/lib/applitools/universal_sdk/universal_client.rb +27 -33
- data/lib/applitools/universal_sdk/universal_server.rb +16 -12
- data/lib/applitools/utils/utils.rb +11 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffb4916338839fd6ca6b15874a65fe26cffe27a156d1e6c5b59b55465327f658
|
4
|
+
data.tar.gz: 895c11c0f2843558090b0f9e86bf1900984b478af4796cfb01bf5867cb597e6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17a35ac64ce18ad2fce6b3608ccee63ba281614b535b02fdc23d10e8528fce1717cbcd81031b77b0e1cadf2146a33849238379acded3daa87588b289318e9be3
|
7
|
+
data.tar.gz: 04cad673216a1b91942b3e25dea06361d47ae1f7c17132e29d4f02e170a9949348b0117cda204edd3ee41ccdc30107a0973af6eba5d5c4b155c50b2753b7b08e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,165 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [6.5.1](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.5.0...ruby/eyes_core@6.5.1) (2025-01-19)
|
4
|
+
|
5
|
+
|
6
|
+
### Dependencies
|
7
|
+
|
8
|
+
* @applitools/socket bumped to 1.2.1
|
9
|
+
#### Bug Fixes
|
10
|
+
|
11
|
+
* mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
|
12
|
+
* @applitools/req bumped to 1.7.7
|
13
|
+
#### Bug Fixes
|
14
|
+
|
15
|
+
* memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
|
16
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.24
|
17
|
+
#### Bug Fixes
|
18
|
+
|
19
|
+
* universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
|
20
|
+
* @applitools/ufg-client bumped to 1.16.1
|
21
|
+
#### Bug Fixes
|
22
|
+
|
23
|
+
* memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
* @applitools/core bumped to 4.29.1
|
28
|
+
#### Bug Fixes
|
29
|
+
|
30
|
+
* mask from config property ([#2739](https://github.com/Applitools-Dev/sdk/issues/2739)) ([6840624](https://github.com/Applitools-Dev/sdk/commit/6840624f5f3f56512dce96547815904adec94704))
|
31
|
+
* universal core on windows ([#2736](https://github.com/Applitools-Dev/sdk/issues/2736)) ([9bd0744](https://github.com/Applitools-Dev/sdk/commit/9bd0744ca816a020973f20645aeb2460af76f44c))
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
* @applitools/screenshoter bumped to 3.10.4
|
36
|
+
|
37
|
+
* @applitools/nml-client bumped to 1.8.23
|
38
|
+
|
39
|
+
* @applitools/tunnel-client bumped to 1.6.1
|
40
|
+
#### Bug Fixes
|
41
|
+
|
42
|
+
* memory usage going high when resource is uint8array ([#2743](https://github.com/Applitools-Dev/sdk/issues/2743)) ([d06deeb](https://github.com/Applitools-Dev/sdk/commit/d06deeb845de62e96ec623efefa90ae65a703736))
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
* @applitools/core-base bumped to 1.22.1
|
47
|
+
|
48
|
+
* @applitools/ec-client bumped to 1.10.2
|
49
|
+
|
50
|
+
* eyes_universal bumped to 4.29.1
|
51
|
+
|
52
|
+
|
53
|
+
## [6.5.0](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.4.2...ruby/eyes_core@6.5.0) (2024-12-31)
|
54
|
+
|
55
|
+
|
56
|
+
### Features
|
57
|
+
|
58
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
59
|
+
|
60
|
+
|
61
|
+
### Dependencies
|
62
|
+
|
63
|
+
* @applitools/utils bumped to 1.7.7
|
64
|
+
#### Bug Fixes
|
65
|
+
|
66
|
+
* shim process execution functions for browser environment ([#2698](https://github.com/Applitools-Dev/sdk/issues/2698)) ([8d77db4](https://github.com/Applitools-Dev/sdk/commit/8d77db48e1c7fd54cad92c89a819a924255e5868))
|
67
|
+
* @applitools/logger bumped to 2.1.0
|
68
|
+
#### Features
|
69
|
+
|
70
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
* @applitools/dom-snapshot bumped to 4.11.13
|
75
|
+
#### Bug Fixes
|
76
|
+
|
77
|
+
* code scanning issue ([#2687](https://github.com/Applitools-Dev/sdk/issues/2687)) ([f301056](https://github.com/Applitools-Dev/sdk/commit/f301056cccfc9cc0c21ceedbd521d8f4b054f058))
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
* @applitools/socket bumped to 1.2.0
|
82
|
+
#### Features
|
83
|
+
|
84
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
* @applitools/dom-capture bumped to 11.5.3
|
89
|
+
#### Bug Fixes
|
90
|
+
|
91
|
+
* code scanning issue ([#2687](https://github.com/Applitools-Dev/sdk/issues/2687)) ([f301056](https://github.com/Applitools-Dev/sdk/commit/f301056cccfc9cc0c21ceedbd521d8f4b054f058))
|
92
|
+
* @applitools/ufg-client bumped to 1.16.0
|
93
|
+
#### Features
|
94
|
+
|
95
|
+
* deterministic output in offline execution ([#2711](https://github.com/Applitools-Dev/sdk/issues/2711)) ([5e8c7ca](https://github.com/Applitools-Dev/sdk/commit/5e8c7ca43c98e7ba6aed0c1a66c5a60b4001aeff))
|
96
|
+
|
97
|
+
|
98
|
+
#### Bug Fixes
|
99
|
+
|
100
|
+
* code scanning issue ([#2687](https://github.com/Applitools-Dev/sdk/issues/2687)) ([f301056](https://github.com/Applitools-Dev/sdk/commit/f301056cccfc9cc0c21ceedbd521d8f4b054f058))
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
* @applitools/core bumped to 4.28.0
|
105
|
+
#### Features
|
106
|
+
|
107
|
+
* deterministic output in offline execution ([#2711](https://github.com/Applitools-Dev/sdk/issues/2711)) ([5e8c7ca](https://github.com/Applitools-Dev/sdk/commit/5e8c7ca43c98e7ba6aed0c1a66c5a60b4001aeff))
|
108
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
109
|
+
|
110
|
+
|
111
|
+
#### Bug Fixes
|
112
|
+
|
113
|
+
* take snapshots with coded regions on pages that has cross origin frames ([#2705](https://github.com/Applitools-Dev/sdk/issues/2705)) ([5972fec](https://github.com/Applitools-Dev/sdk/commit/5972fec890a1454a9f96c4eddcf17634e72111aa))
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
* @applitools/spec-driver-webdriver bumped to 1.1.22
|
118
|
+
|
119
|
+
* @applitools/spec-driver-selenium bumped to 1.5.93
|
120
|
+
|
121
|
+
* @applitools/screenshoter bumped to 3.10.2
|
122
|
+
|
123
|
+
* @applitools/nml-client bumped to 1.8.21
|
124
|
+
|
125
|
+
* @applitools/tunnel-client bumped to 1.6.0
|
126
|
+
#### Features
|
127
|
+
|
128
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
* @applitools/ec-client bumped to 1.10.0
|
133
|
+
#### Features
|
134
|
+
|
135
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
* @applitools/req bumped to 1.7.6
|
140
|
+
|
141
|
+
* @applitools/image bumped to 1.1.16
|
142
|
+
|
143
|
+
* @applitools/driver bumped to 1.20.2
|
144
|
+
|
145
|
+
* @applitools/spec-driver-puppeteer bumped to 1.4.22
|
146
|
+
|
147
|
+
* @applitools/core-base bumped to 1.22.0
|
148
|
+
#### Features
|
149
|
+
|
150
|
+
* deterministic output in offline execution ([#2711](https://github.com/Applitools-Dev/sdk/issues/2711)) ([5e8c7ca](https://github.com/Applitools-Dev/sdk/commit/5e8c7ca43c98e7ba6aed0c1a66c5a60b4001aeff))
|
151
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
* eyes_universal bumped to 4.28.0
|
156
|
+
#### Features
|
157
|
+
|
158
|
+
* logger masking ([#2640](https://github.com/Applitools-Dev/sdk/issues/2640)) ([bd69d21](https://github.com/Applitools-Dev/sdk/commit/bd69d21f6341447b1acdb042f4ee1a6328d7428f))
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
3
163
|
## [6.4.2](https://github.com/Applitools-Dev/sdk/compare/ruby/eyes_core@6.4.1...ruby/eyes_core@6.4.2) (2024-11-27)
|
4
164
|
|
5
165
|
|
data/eyes_core.gemspec
CHANGED
@@ -38,7 +38,7 @@ Gem::Specification.new do |spec|
|
|
38
38
|
spec.add_dependency 'colorize'
|
39
39
|
spec.add_dependency 'websocket'
|
40
40
|
spec.add_dependency 'sorted_set'
|
41
|
-
spec.add_dependency 'eyes_universal', "= 4.
|
41
|
+
spec.add_dependency 'eyes_universal', "= 4.29.1"
|
42
42
|
|
43
43
|
spec.add_development_dependency 'bundler'
|
44
44
|
spec.add_development_dependency 'rake'
|
@@ -4,8 +4,9 @@ require_relative 'eyes_runner'
|
|
4
4
|
module Applitools
|
5
5
|
class ClassicRunner < EyesRunner
|
6
6
|
attr_accessor :all_test_results, :all_pending_exceptions
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
def initialize(mask_log = nil)
|
9
|
+
super(mask_log)
|
9
10
|
self.all_test_results = []
|
10
11
|
self.all_pending_exceptions = {}
|
11
12
|
end
|
@@ -6,10 +6,11 @@ module Applitools
|
|
6
6
|
attr_accessor :universal_client, :universal_eyes_manager
|
7
7
|
attr_accessor :remove_duplicate_tests
|
8
8
|
|
9
|
-
def initialize
|
9
|
+
def initialize(mask_log = nil)
|
10
10
|
self.batches_server_connectors_map = {}
|
11
11
|
self.universal_client = nil # eyes.open
|
12
12
|
self.universal_eyes_manager = nil # eyes.open
|
13
|
+
@mask_log = mask_log
|
13
14
|
end
|
14
15
|
|
15
16
|
def add_batch(batch_id, &block)
|
@@ -20,9 +21,9 @@ module Applitools
|
|
20
21
|
batches_server_connectors_map.each_value { |v| v.call if v.respond_to? :call }
|
21
22
|
end
|
22
23
|
|
23
|
-
def get_universal_eyes_manager(eyes=nil)
|
24
|
+
def get_universal_eyes_manager(eyes = nil)
|
24
25
|
return universal_eyes_manager if universal_eyes_manager
|
25
|
-
self.universal_client = Applitools::Connectivity::UniversalClient.new(eyes) if universal_client.nil?
|
26
|
+
self.universal_client = Applitools::Connectivity::UniversalClient.new(eyes, @mask_log) if universal_client.nil?
|
26
27
|
self.universal_eyes_manager = universal_client.make_manager(universal_eyes_manager_config.to_hash)
|
27
28
|
end
|
28
29
|
|
@@ -10,7 +10,6 @@ require 'websocket'
|
|
10
10
|
require 'uri'
|
11
11
|
require 'eyes_universal'
|
12
12
|
|
13
|
-
|
14
13
|
module Applitools::Connectivity
|
15
14
|
class UniversalClient
|
16
15
|
|
@@ -41,9 +40,9 @@ module Applitools::Connectivity
|
|
41
40
|
|
42
41
|
attr_accessor :commands_config
|
43
42
|
|
44
|
-
def initialize(eyes=nil)
|
43
|
+
def initialize(eyes = nil, mask_log = nil)
|
45
44
|
# @socket = Applitools::Connectivity::UniversalClientSocket.new
|
46
|
-
prepare_socket(eyes)
|
45
|
+
prepare_socket(eyes, mask_log)
|
47
46
|
# store on open for next check calls
|
48
47
|
@open_config = nil
|
49
48
|
@commands_config = {
|
@@ -74,7 +73,7 @@ module Applitools::Connectivity
|
|
74
73
|
ec_client_settings = {}
|
75
74
|
ec_client_settings[:options] = ec_client_capabilities unless ec_client_capabilities.empty?
|
76
75
|
ec_client_settings[:proxy] = proxy unless proxy.nil?
|
77
|
-
make_ec_client_request_payload = {settings: ec_client_settings}
|
76
|
+
make_ec_client_request_payload = { settings: ec_client_settings }
|
78
77
|
# interface GetECClientRequestPayload {
|
79
78
|
# settings?: ECClientSettings
|
80
79
|
# }
|
@@ -92,7 +91,6 @@ module Applitools::Connectivity
|
|
92
91
|
Applitools::UniversalEyesManager.new(eyes_manager, self)
|
93
92
|
end
|
94
93
|
|
95
|
-
|
96
94
|
def core_make_manager(eyes_manager_config)
|
97
95
|
# interface MakeManagerRequestPayload {
|
98
96
|
# type: 'ufg' | 'classic'
|
@@ -155,9 +153,6 @@ module Applitools::Connectivity
|
|
155
153
|
commands_config[:screenshot] = commands_config[:check]
|
156
154
|
end
|
157
155
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
156
|
def eyes_manager_make_eyes(manager, driver_config, config)
|
162
157
|
@open_config = config
|
163
158
|
|
@@ -170,7 +165,7 @@ module Applitools::Connectivity
|
|
170
165
|
# }
|
171
166
|
#
|
172
167
|
# type OpenEyesResponsePayload = Ref<Eyes>
|
173
|
-
command_with_result(EYES_MANAGER_MAKE_EYES, {manager: manager, target: driver_config, settings: commands_config[:open], config: commands_config})
|
168
|
+
command_with_result(EYES_MANAGER_MAKE_EYES, { manager: manager, target: driver_config, settings: commands_config[:open], config: commands_config })
|
174
169
|
end
|
175
170
|
|
176
171
|
def eyes_manager_close_all_eyes(manager, remove_duplicate_tests)
|
@@ -194,8 +189,8 @@ module Applitools::Connectivity
|
|
194
189
|
# missing: number
|
195
190
|
# matches: number
|
196
191
|
# }
|
197
|
-
settings = {throwErr: false, removeDuplicateTests: remove_duplicate_tests}
|
198
|
-
command_with_result(EYES_MANAGER_CLOSE_ALL_EYES, {manager: manager, settings: settings})
|
192
|
+
settings = { throwErr: false, removeDuplicateTests: remove_duplicate_tests }
|
193
|
+
command_with_result(EYES_MANAGER_CLOSE_ALL_EYES, { manager: manager, settings: settings })
|
199
194
|
end
|
200
195
|
|
201
196
|
def eyes_get_results(eyes)
|
@@ -205,8 +200,8 @@ module Applitools::Connectivity
|
|
205
200
|
# }
|
206
201
|
#
|
207
202
|
# type GetEyesResultsResponsePayload = TestResult[]
|
208
|
-
settings = {throwErr: false}
|
209
|
-
command_with_result(EYES_GET_RESULTS, {eyes: eyes, settings: settings})
|
203
|
+
settings = { throwErr: false }
|
204
|
+
command_with_result(EYES_GET_RESULTS, { eyes: eyes, settings: settings })
|
210
205
|
end
|
211
206
|
|
212
207
|
def eyes_check(eyes, settings, image_target = {})
|
@@ -218,7 +213,7 @@ module Applitools::Connectivity
|
|
218
213
|
# }
|
219
214
|
#
|
220
215
|
# type CheckResponsePayload = CheckResult[]
|
221
|
-
payload = {eyes: eyes, settings: settings, config: commands_config}
|
216
|
+
payload = { eyes: eyes, settings: settings, config: commands_config }
|
222
217
|
payload[:target] = image_target unless image_target.empty?
|
223
218
|
command_with_result(EYES_CHECK, payload)
|
224
219
|
end
|
@@ -234,7 +229,7 @@ module Applitools::Connectivity
|
|
234
229
|
# [key: string]: Array<{x: number, y: number, width: number, height: number}>
|
235
230
|
# }
|
236
231
|
|
237
|
-
command_with_result(EYES_LOCATE, {target: driver_target, settings: settings, config: commands_config})
|
232
|
+
command_with_result(EYES_LOCATE, { target: driver_target, settings: settings, config: commands_config })
|
238
233
|
end
|
239
234
|
|
240
235
|
def eyes_extract_text_regions(eyes, settings, driver_target)
|
@@ -245,7 +240,7 @@ module Applitools::Connectivity
|
|
245
240
|
# }
|
246
241
|
#
|
247
242
|
# type LocateTextResponsePayload = Record<string, {text: string, x: number, y: number, width: number, height: number}[]>
|
248
|
-
payload = {target: driver_target, settings: settings, config: commands_config}
|
243
|
+
payload = { target: driver_target, settings: settings, config: commands_config }
|
249
244
|
payload.delete(:target) if driver_target.nil? || driver_target.empty?
|
250
245
|
command_with_result(EYES_EXTRACT_TEXT_REGIONS, payload)
|
251
246
|
end
|
@@ -258,7 +253,7 @@ module Applitools::Connectivity
|
|
258
253
|
# }
|
259
254
|
#
|
260
255
|
# type ExtractTextResponsePayload = string[]
|
261
|
-
payload = {target: driver_target, settings: regions, config: commands_config}
|
256
|
+
payload = { target: driver_target, settings: regions, config: commands_config }
|
262
257
|
payload.delete(:settings) if regions.empty?
|
263
258
|
command_with_result(EYES_EXTRACT_TEXT, payload)
|
264
259
|
end
|
@@ -278,7 +273,7 @@ module Applitools::Connectivity
|
|
278
273
|
# "updateBaselineIfNew": true,
|
279
274
|
# "updateBaselineIfDifferent": true
|
280
275
|
# }
|
281
|
-
command_with_result(EYES_CLOSE, {eyes: eyes, settings: settings, config: commands_config})
|
276
|
+
command_with_result(EYES_CLOSE, { eyes: eyes, settings: settings, config: commands_config })
|
282
277
|
end
|
283
278
|
|
284
279
|
def eyes_abort(eyes)
|
@@ -295,7 +290,7 @@ module Applitools::Connectivity
|
|
295
290
|
# "updateBaselineIfNew": true,
|
296
291
|
# "updateBaselineIfDifferent": true
|
297
292
|
# }
|
298
|
-
command_with_result(EYES_ABORT, {eyes: eyes, settings: settings})
|
293
|
+
command_with_result(EYES_ABORT, { eyes: eyes, settings: settings })
|
299
294
|
end
|
300
295
|
|
301
296
|
def core_get_viewport_size(driver)
|
@@ -307,7 +302,7 @@ module Applitools::Connectivity
|
|
307
302
|
# width: number
|
308
303
|
# height: number
|
309
304
|
# }
|
310
|
-
command_with_result(CORE_GET_VIEWPORT_SIZE, {target: driver})
|
305
|
+
command_with_result(CORE_GET_VIEWPORT_SIZE, { target: driver })
|
311
306
|
end
|
312
307
|
|
313
308
|
def core_set_viewport_size(driver, size)
|
@@ -315,10 +310,10 @@ module Applitools::Connectivity
|
|
315
310
|
# target: DriverTarget
|
316
311
|
# size: {width: number, height: number}
|
317
312
|
# }
|
318
|
-
command_with_result(CORE_SET_VIEWPORT_SIZE, {target: driver, size: size})
|
313
|
+
command_with_result(CORE_SET_VIEWPORT_SIZE, { target: driver, size: size })
|
319
314
|
end
|
320
315
|
|
321
|
-
def core_close_batches(close_batch_settings=nil)
|
316
|
+
def core_close_batches(close_batch_settings = nil)
|
322
317
|
# interface CloseBatchRequestPayload {
|
323
318
|
# settings: CloseBatchSettings | CloseBatchSettings[]
|
324
319
|
# }
|
@@ -326,7 +321,7 @@ module Applitools::Connectivity
|
|
326
321
|
batch_ids = [@open_config[:batch][:id]]
|
327
322
|
batch_ids = [close_batch_settings] if close_batch_settings.is_a?(String)
|
328
323
|
batch_ids = close_batch_settings if close_batch_settings.is_a?(Array)
|
329
|
-
optional = [:serverUrl, :apiKey, :proxy].map {|k| [k, @open_config[k]] }.to_h
|
324
|
+
optional = [:serverUrl, :apiKey, :proxy].map { |k| [k, @open_config[k]] }.to_h
|
330
325
|
optional[:eyesServerUrl] = optional.delete(:serverUrl) if optional[:serverUrl] # v4
|
331
326
|
close_batch_settings = { settings: ({ batchIds: batch_ids }.merge(optional).compact) }
|
332
327
|
end
|
@@ -340,11 +335,10 @@ module Applitools::Connectivity
|
|
340
335
|
command_with_result(CORE_DELETE_TEST, delete_test_settings)
|
341
336
|
end
|
342
337
|
|
343
|
-
|
344
338
|
private
|
345
339
|
|
346
|
-
|
347
|
-
|
340
|
+
def prepare_socket(eyes = nil, mask_log = nil)
|
341
|
+
Applitools::EyesUniversal::UniversalServerControl.configure(mask_log)
|
348
342
|
@universal_server_control = Applitools::EyesUniversal::UniversalServerControl.instance
|
349
343
|
@web_socket = @universal_server_control.new_server_socket_connection
|
350
344
|
socket_handshake
|
@@ -377,7 +371,6 @@ module Applitools::Connectivity
|
|
377
371
|
# resolved
|
378
372
|
# end
|
379
373
|
|
380
|
-
|
381
374
|
def socket_handshake
|
382
375
|
socket_uri = "ws://#{@web_socket.remote_address.inspect_sockaddr}/eyes"
|
383
376
|
handshake = WebSocket::Handshake::Client.new(url: socket_uri)
|
@@ -387,7 +380,7 @@ module Applitools::Connectivity
|
|
387
380
|
@handshake_version = handshake.version if handshake.finished? && handshake.valid?
|
388
381
|
end
|
389
382
|
|
390
|
-
def session_init(eyes=nil)
|
383
|
+
def session_init(eyes = nil)
|
391
384
|
sdk_name = Applitools::EyesBase.environment_sdk[:name]
|
392
385
|
sdk_version = Applitools::EyesBase.environment_sdk[:currentVersion]
|
393
386
|
if eyes
|
@@ -424,7 +417,7 @@ module Applitools::Connectivity
|
|
424
417
|
end
|
425
418
|
|
426
419
|
def command(name, payload, key = SecureRandom.uuid)
|
427
|
-
json_data = JSON.generate({name: name, key: key, payload: payload})
|
420
|
+
json_data = JSON.generate({ name: name, key: key, payload: payload })
|
428
421
|
outgoing_frame = WebSocket::Frame::Outgoing::Client.new(version: @handshake_version, data: json_data, type: :text)
|
429
422
|
@web_socket.write(outgoing_frame)
|
430
423
|
end
|
@@ -459,7 +452,7 @@ module Applitools::Connectivity
|
|
459
452
|
puts incoming_payload['message']
|
460
453
|
new_web_socket_result = receive_result(name)
|
461
454
|
result = format_result(name, key, new_web_socket_result)
|
462
|
-
elsif
|
455
|
+
elsif incoming_json['name'] === name && incoming_json['key'] === key
|
463
456
|
incoming_payload = incoming_json['payload']
|
464
457
|
result = incoming_payload.key?('error') ? incoming_payload['error'] : incoming_payload['result']
|
465
458
|
Applitools::Utils.deep_symbolize_keys result
|
@@ -476,7 +469,7 @@ module Applitools::Connectivity
|
|
476
469
|
web_socket_result = receive_result(name)
|
477
470
|
results = convert_web_socket_result(web_socket_result, name)
|
478
471
|
|
479
|
-
this_key_responses, other_responses = results.partition {|h| h['name'] === name && h['key'] === key}
|
472
|
+
this_key_responses, other_responses = results.partition { |h| h['name'] === name && h['key'] === key }
|
480
473
|
process_other_responses other_responses
|
481
474
|
|
482
475
|
if this_key_responses.empty?
|
@@ -484,7 +477,8 @@ module Applitools::Connectivity
|
|
484
477
|
get_command_result(name, key)
|
485
478
|
elsif this_key_responses.size === 1
|
486
479
|
convert_responses(this_key_responses)
|
487
|
-
else
|
480
|
+
else
|
481
|
+
# size > 1
|
488
482
|
raise Applitools::EyesError.new "Result mismatch : #{name} #{key} (#{this_key_responses})"
|
489
483
|
end
|
490
484
|
end
|
@@ -496,7 +490,7 @@ module Applitools::Connectivity
|
|
496
490
|
until (decoded_frame = encoded_frame.next).nil?
|
497
491
|
decoded_frames.push(decoded_frame)
|
498
492
|
end
|
499
|
-
decoded_frames.map {|frame| JSON.parse(frame.to_s)}
|
493
|
+
decoded_frames.map { |frame| JSON.parse(frame.to_s) }
|
500
494
|
end
|
501
495
|
|
502
496
|
def process_other_responses(other_responses)
|
@@ -45,20 +45,24 @@ module Applitools::Connectivity
|
|
45
45
|
|
46
46
|
def filename
|
47
47
|
return 'eyes-universal-win.exe' if Gem.win_platform?
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
'eyes-universal-linux'
|
48
|
+
|
49
|
+
platform = RUBY_PLATFORM.downcase
|
50
|
+
|
51
|
+
if platform.include?('darwin')
|
52
|
+
return 'eyes-universal-macos'
|
53
|
+
elsif platform.include?('linux')
|
54
|
+
if platform.include?('arm64') || platform.include?('aarch64')
|
55
|
+
return 'eyes-universal-linux-arm64'
|
56
|
+
elsif platform.include?('musl')
|
57
|
+
return 'eyes-universal-alpine'
|
59
58
|
else
|
60
|
-
|
59
|
+
return 'eyes-universal-linux'
|
60
|
+
end
|
61
|
+
elsif platform.match?(/mswin|mingw|windows/)
|
62
|
+
return 'eyes-universal-win.exe'
|
61
63
|
end
|
64
|
+
|
65
|
+
raise "Unsupported platform: #{RUBY_PLATFORM}"
|
62
66
|
end
|
63
67
|
|
64
68
|
def server_libname
|
@@ -6,7 +6,17 @@ module Applitools::Utils
|
|
6
6
|
extend self
|
7
7
|
|
8
8
|
def underscore(str)
|
9
|
-
str
|
9
|
+
str = str.gsub('::', '/')
|
10
|
+
str = str.gsub(/([A-Z]{2,})(?=[A-Z][a-z])|([a-z\d])([A-Z])/o) do
|
11
|
+
if Regexp.last_match(1) # Handles groups of uppercase letters like "HTMLParser"
|
12
|
+
"#{Regexp.last_match(1)}_"
|
13
|
+
else # Handles camel-case transitions like "camelCase"
|
14
|
+
"#{Regexp.last_match(2)}_#{Regexp.last_match(3)}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Step 3: Convert hyphens to underscores and downcase everything
|
19
|
+
str.tr('-', '_').downcase
|
10
20
|
end
|
11
21
|
|
12
22
|
def uncapitalize(str)
|
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: 6.
|
4
|
+
version: 6.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - '='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 4.
|
117
|
+
version: 4.29.1
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - '='
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 4.
|
124
|
+
version: 4.29.1
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|