eyes_universal 3.6.0 → 4.5.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa984e689bf897180f160c0d1e6e791513e2611b3d48fc9692d76242e20f29e5
4
- data.tar.gz: 48d32b4aea4d9b8432a077e633c455318ca4949f658286329471da8678534834
3
+ metadata.gz: 1144a539103675ae0fae17ca6435815008b95970200a35ddf1a46b46e28e2c74
4
+ data.tar.gz: edbd263cbfddc277c16bf815b4da8df97fd944cc701d424eac9ebeb7b14408d5
5
5
  SHA512:
6
- metadata.gz: a825a2101133af19b65a82ecf113236f6b76b303f378e0ff06726818f74bc83abbc0f1489faada2259dd11c785b58aa5e1bc3c20b30ae834b484e096acf2f000
7
- data.tar.gz: e561b294ea45a6498fe08d0251bdb5b00082340497a1421b0834815712f472973732bf8c1980ebc85c16a05b03d48306f414d27f6f1157eb3a7fe3840c9f8b78
6
+ metadata.gz: be6884ec167cf662be1e7077fb49bf0ef08f639d357dc55282edb04ff637fb5b65cd5d0ed8561f42bce6287cd16218b733e1cd8a5f1aa74d0edec71f23ed8892
7
+ data.tar.gz: 6b0e7ed71c280522757087d8995ca77a5d5161a506b0aebc17b2a19e1b84388e00b8d4cdb88e65640258231f3f4f6a37c1e22bfd466241118b995994ac7e61af
data/CHANGELOG.md ADDED
@@ -0,0 +1,531 @@
1
+ # Changelog
2
+
3
+ ## [6.0.2] (2024-01-03)
4
+
5
+ ### Updated
6
+ * Update version of Universal SDK Core to 4.5.2
7
+
8
+ ### Dependencies
9
+
10
+ * ### Features
11
+ * sign windows binaries
12
+ * support updated applitools lib protocol
13
+ * add set of env variables to skip/ignore some optional automations
14
+
15
+ * ### Bug Fixes
16
+
17
+ * layout breakpoints reload and lazy load
18
+ * fix safe selector generation
19
+ * fixed issue when page wasn't reloaded for one of the breakpoints if the initial viewport size matches it
20
+ * avoid caching concurrency
21
+ * environment for each check for local environment
22
+ * fixed concurrency splank logging
23
+ * fixed the issue when custom os name passed through configuration wasn't respected
24
+
25
+
26
+ ## [6.0.1] (2023-12-13)
27
+ ### Bug Fixes
28
+ * fix code loading error (NameError in environment_sdk)
29
+
30
+ ## [6.0.0] (2023-12-13)
31
+
32
+ ### Dependencies
33
+
34
+ ### Breaking Changes:
35
+ * #### Features
36
+ * Update version of Universal SDK Core to v4
37
+
38
+ * #### Added
39
+ * new api eyes.get_results to get results
40
+
41
+ * #### Removed
42
+ * eyes.checks now returns nil (added new eyes.get_results to get a results)
43
+
44
+ ### Features
45
+ * added notification about outdated sdk version
46
+ * log driver environment info to splank
47
+ * show aborted tests in Eyes dashboard
48
+ * allowed running multiple classic test with different devices for applitoolsified native apps
49
+ * add more logs for tunnel worker
50
+ * added warning when driver used with capabilities that may conflict with applitools lib workflow
51
+ ### Bug Fixes
52
+ * fix custom sequence_name in BatchInfo
53
+ * suppport coded regions with layoutBreakpoints reload
54
+ * update dom-snapshot to support xml pages and parens inside css URLs
55
+ * upgrade dom-capture to get font-family in DOM
56
+ * change expiration time of the tunnel
57
+ * async cache should wait for upload
58
+ * async cache race condition
59
+ * allow css scrolling when taking screenshot of the webview
60
+ * generate safe selectors as close as possible to taking dom snapshot
61
+ * added retries on ufg requests that respond with 503 status code
62
+ * fix incorrect stitchMode mapping in checkSettings
63
+ * handled duplicated style properties in inline style tags
64
+ * fixed issue that caused dom snapshots to be taken for different viewport sizes when layout breakpoints were explicitly turned off
65
+ * remove some connection timeout in case of a long running tasks
66
+ * return result when error in the ufg
67
+ * send devtool commands in chromium
68
+ * preserve css declarations order in dom-snapshot
69
+ * do not block concurrency when server response is 503
70
+ ### Code Refactoring
71
+ * reorganized code between gems
72
+
73
+ ## [5.0.0] - 2023-07-11
74
+ ### Breaking Changes:
75
+ - get_all_test_results return TestResultSummary with additional info
76
+ - TestResults Array now in get_all_test_results.results or can be accessed old-style with get_all_test_results[0]
77
+ - eyes.close always return first result, even when have failed check
78
+ - eyes.abort on closed/aborted eye now return nil
79
+ ### Added
80
+ - Add support for reloading the page when using layout_breakpoints
81
+ - add errors to TestResults
82
+ ### Updated
83
+ - Update version of Universal SDK Core to 3.6.0
84
+ ### Features
85
+ - ability to skip deserialize dom snapshot
86
+ - prevent animated gif images from playing in ufg
87
+ - support custom property per renderer
88
+ ### Bug fixes
89
+ - fixed issue that caused creation of unnecessary tunnels
90
+ - start tunnels with proper regional server
91
+ ## [4.6.3] - 2023-07-04
92
+ ### Updated
93
+ - Update version of Universal SDK Core to 3.4.0
94
+ ### Added
95
+ - Add api for mobile (set_nmg_capabilities, set_mobile_capabilities, use_system_screenshot)
96
+ ### Features
97
+ - Drop support of legacy vhs extraction
98
+ - Add an API to send logEvents
99
+ - Add support for reloading the page when using layoutBreakpoints
100
+ - Fixed issue with failed find element responses in EC
101
+ - Fixed issue when on certain browser versions test didn't target a previously created baseline
102
+ - added a new mode for taking native app screenshots
103
+ ### Bug fixes
104
+ - Increase timeout for rendering results polling
105
+ - Fixed issue when logs are not show up
106
+ - Add isProcess property when calling makeCoreServer
107
+ - Fixed issue with Safari mobile screenshots
108
+ - Fixed issue with default settings in extractText
109
+ - Fixed issue with viewport information extraction when switched to webview
110
+ - apply default scrolling mode
111
+ ## [4.6.2] - 2023-05-10
112
+ ### Added
113
+ - Add remove_duplicate_tests option & set_remove_duplicate_tests method to eyes runner
114
+ ### Updated
115
+ - Update version of Universal SDK Core to 2.5.8
116
+ ### Features
117
+ - Added functional session feature
118
+ - Add a timeout and max concurrency for fetching resources
119
+ ### Bug fixes
120
+ - Fixed issue in dom snapshot that prevented urls that start with a whitespace to be mapped
121
+ - Improved appium prefixed capabilities parsing
122
+ - Fix issue when locate return wrong type of the region, with left and top properties instead of x and y
123
+ - Fixed issue with when webview were wasn't recognized as web compatible world
124
+ - Fixed the issue with session metadata extraction
125
+ - Fixed functional test feature issues in ec client
126
+ - Fixed typo in ec custom property
127
+ - Fixed issue with hanging requests
128
+ - Fixed platform name formatting
129
+ - Prevented driver metadata extraction during check in ufg eyes
130
+ - Fixed dynamic import issue in universal binaries
131
+ - Fixed detection of emulated mobile drivers
132
+ - Remove 'Execution Cloud' custom property
133
+ ## [4.6.1] - 2023-04-12
134
+ ### Changed
135
+ - Packaging server core inside eyes_universal
136
+ ### Updated
137
+ - Update version of Universal SDK Core to 2.4.8
138
+ ### Features
139
+ - Added removeDuplicateTests property to the GetManagerResultsSettings
140
+ - Changed makeManager api to accept settings
141
+ - Improved extraction of nml element
142
+ - Update broker url using last response instead of using driver
143
+ ### Bug fixes
144
+ - Fixed screenshot framing
145
+ - Fixed issue with css fetching for dom capture
146
+ - Fixed issue with emulation driver detection
147
+ - Fixed relative url resolution in css files
148
+ - Added timeout to css fetching during preparing dom capture
149
+ - Improve performance in DOM snapshot
150
+ - Fixed retry interval during poll requests to eyes back-end
151
+ - Fixed issue with concurrency of the renders in ufg mode
152
+ - Fixed issue with concurrency of the renders in ufg mode
153
+ - Fixed ufg concurrency regression
154
+ - Replaced broker url cache with nml element cache
155
+ - Fixed selector transformation for scroll root elements for ufg
156
+ - Upgrade tunnel version
157
+ ## [4.6.0] - 2023-03-06
158
+ ### Changed
159
+ - change server package to @applitools/core
160
+ ### Updated
161
+ - Improve logging in core server
162
+ - Passing density metric for PPI support in the sdk
163
+ ### Added
164
+ - Integrate universal protocol to run core via transport
165
+ - Added Resize stitch mode value
166
+ - Add NML support for Android
167
+ - Add makeECClient api
168
+ ### Bug fixes
169
+ - upgrade dom-snapshot with a fix to CSP
170
+ - Fixed issue when .visualgrid was not added to agent id
171
+ - Fixed issue with aborting ufg tests
172
+ ## [4.5.5] - 2023-01-06
173
+ ### Updated
174
+ - Update version of Universal SDK to 3.2.2
175
+ ## [4.5.4] - 2023-01-04
176
+ ### Updated
177
+ - Update version of Universal SDK to 3.2.1
178
+ - Update arm64-darwin server recognition
179
+ ### Features
180
+ - Filter styles and resources with non-screen media queries
181
+ ### Bug fixes
182
+ - Fixed issue with parsing capabilities for iOS with native app
183
+ ## [4.5.3] - 2022-12-30
184
+ ### Fixed
185
+ - skip yanked gem versions
186
+ ## [4.5.2] - 2022-12-30
187
+ ### Updated
188
+ - Update version of Universal SDK to 3.2.0
189
+ ### Added
190
+ - Add dont_close_batches flag to eyes [Trello 3093](https://trello.com/c/3E0ilb0A)
191
+ ### Features
192
+ - Add server support for arm
193
+ - Additional internal event logs
194
+ ### Bug fixes
195
+ - Fixed OCR functionality with latest eyes server
196
+ - Fixed issue when helper lib inputs were not cleaned up before calling new command
197
+ - Fixed issue with element scroll position not being restored after screenshot is taken on native platforms
198
+ - Handed error during polling in long requests to eyes server
199
+ - Handle fake shadowRoot with UFG
200
+ ## [4.5.1] - 2022-11-28
201
+ ### Fixed
202
+ - releasing as stable all eyes
203
+ ## [4.0.0.alpha-eyes-images] - 2022-11-28
204
+ ### Added
205
+ - eyes_images updated to universal server sdk(v3)
206
+ ### Deprecated (eyes_images)
207
+ - eyes_images inputs Applitools::Screenshot and ChunkyPNG::Image now are image_path and image (examples in spec/images/eyes_images_functional_spec.rb)
208
+ ### Added (eyes_images)
209
+ - eyes_images: Applitools::MatchLevel::IGNORE_COLORS
210
+ ## [4.5.0.alpha] - 2022-11-23
211
+ - Update version of Universal SDK to v3 (sdk: 3.0.2)
212
+ ## [4.4.1] - 2022-10-03
213
+ ### Added
214
+ - Added iPhone 14 and iPhone 14 Pro Max devices [Trello 73](https://trello.com/c/M1YiwtHb)
215
+ ## [4.4.0] - 2022-09-16
216
+ ### Updated
217
+ - Update version of Universal SDK to 2.12.3
218
+ ### Added
219
+ - Created testing client for eyes-universal
220
+ ### Fixed
221
+ - Using lazyLoad.waitingTime as a delay between stitches by default
222
+ - Using proxy while polling for the result of the nml command
223
+ ## [4.3.0] - 2022-09-16
224
+ ### Updated
225
+ - Update version of Universal SDK to 2.12.0
226
+ ### Added
227
+ - Add proxy support when using NML for NMG
228
+ - Add NML NMG support for iOS
229
+ - Added support for lazy loading views in android native apps
230
+ - tests for alpine
231
+ ### Fixed
232
+ - Sending correct commands with android helper lib
233
+ - Fixed issue that prevented NMG from working when NML was enabled
234
+ ## [4.2.0] - 2022-09-05
235
+ ### Removed
236
+ - removed device name Galaxy S8, S8 Plus, Note 8
237
+ ## [4.1.4] - 2022-09-02
238
+ ### Updated
239
+ - Update version of Universal SDK to 2.10.8
240
+ ### Changed
241
+ - U-SDK server spawn once per process
242
+ - U-SDK server shutdown-mode changed
243
+ ## [4.1.4.alpha] - 2022-08-15
244
+ ### Updated
245
+ - Update version of Universal SDK to 2.10.5
246
+ ### Changed
247
+ - ci moved to github
248
+ ## [4.1.3] - 2022-08-04
249
+ ### Added
250
+ - add enum for edge-2 (EDGE_CHROMIUM_TWO_VERSIONS_BACK)
251
+ - Android 12 device name [Trello 54](https://trello.com/c/SZAPDKSI)
252
+ ### Updated
253
+ - Update version of Universal SDK to 2.10.3
254
+ ## [4.1.2] - 2022-07-07
255
+ ### Added
256
+ - add padding support for regions [Trello 2929](https://trello.com/c/kHbnEdC7), [Trello 42](https://trello.com/c/PYKqJLbg)
257
+ - add custom region id support for regions [Trello 47](https://trello.com/c/pv51sCYA)
258
+ ### Updated
259
+ - Update version of Universal SDK to 2.9.5
260
+ ### Fixed
261
+ - fix freeze in communication with universal server
262
+ - fix floating region bounds option(as 4 numbers) parsing
263
+ ## [4.1.1] - 2022-06-16
264
+ ### Added
265
+ - add support lazy loading as part of the check-api [Trello](https://trello.com/c/BIHFMhVk)
266
+ ### Updated
267
+ - Update version of Universal SDK to 2.8.0
268
+ ## [4.1.0] - 2022-06-16
269
+ ### Removed
270
+ - alpha flag from version number
271
+ ## [4.1.0.alpha] - 2022-06-13
272
+ ### Updated
273
+ - Update version of Universal SDK to 2.7.2
274
+ ## Removed
275
+ - removed eventmachine from eyes_core
276
+ ## [4.0.5.4] - 2022-06-10
277
+ ### Updated
278
+ - Update version of Universal SDK to 2.7.1
279
+ ### Fixed
280
+ - Fix default boolean field transition to server(like full page screenshot)
281
+ ## [4.0.5.3] - 2022-06-02
282
+ ### Updated
283
+ - Update version of Universal SDK to 2.5.19
284
+ ### Fixed
285
+ - fix ruby-3.1 installation collision
286
+ ## [4.0.5.2] - 2022-05-24
287
+ ### Updated
288
+ - Update version of Universal SDK to 2.5.17
289
+ ### Fixed
290
+ - Fix closing batches with closeManager
291
+ ## Removed
292
+ - removed nokogiri frozen version
293
+ - remove old&unused js(now processed by universal server)
294
+ ## [4.0.5.1] - 2022-05-18
295
+ ### Fixed
296
+ - Fix wrong gem yank
297
+ ## [4.0.5] - 2022-05-18
298
+ ### Updated
299
+ - Update version of Universal SDK to 2.5.11
300
+ ### Fixed
301
+ - Fix for default notify_on_completion value(moved to universal server)
302
+ ## [4.0.4] - 2022-05-13
303
+ ### Fixed
304
+ - Fix for mingw
305
+ ## [4.0.3] - 2022-05-13
306
+ ### Updated
307
+ - Update version of Universal SDK to 2.5.7
308
+ ### Added
309
+ - added api: wait_before_capture, page_id
310
+ - api for native ufg: add_mobile_device, add_mobile_devices
311
+ - new ios devices
312
+ - AndroidDeviceName and AndroidDeviceInfo
313
+ ### Fixed
314
+ - Fix installing universal server issues on windows
315
+ - fix getting connection info for universal server on ci
316
+ ## Removed
317
+ - png processing lib dependecies
318
+ ## [4.0.2] - 2022-02-08
319
+ ### Updated
320
+ - Update version of Universal SDK to 1.0.9
321
+ ### Fixed
322
+ - Fix installing issues with latest ruby version and installing on windows
323
+ ## [4.0.1] - 2022-02-08 - unreleased
324
+ ### Updated
325
+ - Update version of Universal SDK to 1.0.7
326
+ ## [4.0.0] - 2022-01-24
327
+ ### Changed
328
+ - Library is now based on Universal SDK
329
+ ## [3.18.4] - 2021-08-31
330
+ ### Fixed
331
+ - Fix Appium runner option [Trello 2697](https://trello.com/c/F6dLF1VF)
332
+ - Fix parsing css transition [Trello 2647](https://trello.com/c/CIzoKPNY)
333
+ - Fix require warning: No such file or directory @ dir_chdir - lib/applitools/selenium/scripts/node_modules [Trello 2148](https://trello.com/c/j5sAPSBa)
334
+ ## [3.18.3] - 2021-06-24
335
+ ### Added
336
+ - Support cross origin iframes in UFG [Trello 2259](https://trello.com/c/iJKPvd75), [Trello 2584](https://trello.com/c/QyLzmnGl)
337
+ ## [3.18.2] - 2021-05-05
338
+ ### Added
339
+ - Support variation_group_id and agentRunId [Trello 2527](https://trello.com/c/6SyxJXVZ)
340
+ ## [3.18.1] - 2021-04-28
341
+ ### Added
342
+ - Allow defining custom properties at the batch level [Trello 2445](https://trello.com/c/IKTydXLv)
343
+ ## [3.18.0] - 2021-04-20
344
+ ### Fixed
345
+ - Fix Selenium and Appium libraries conflict [Trello 2500](https://trello.com/c/UOwzI2s8)
346
+ ## Deprecated
347
+ - Ruby 1.9 support for Appium lib (Requirement 2.2+)
348
+ ## [3.17.23] - 2021-01-22
349
+ ### Fixed
350
+ - Fix viewport rect of a native app at some android devices [Trello 2079](https://trello.com/c/sQJLgtUL)
351
+ ### Updated
352
+ - Update Ruby Coverege Tests to v2
353
+ ## [3.17.22] - 2021-01-12
354
+ ### Added
355
+ - Supporting check full element with ufg [Trello 2145](https://trello.com/c/8tPAnz66)
356
+ ### Updated
357
+ - Supporting iPhone 12 in `IosDeviceName` class. [Trello 2269](https://trello.com/c/yWFy2pRE)
358
+ ### Fixed
359
+ - Restart on calling eyes.open with started driver [Trello 2162](https://trello.com/c/1SCQUUnW), [Trello 2233](https://trello.com/c/yPY3jhjW)
360
+ ## [3.17.21] - 2020-08-20
361
+ ### added
362
+ - UFG: the ability to set :visual_grid_options for the UFG SDK (Both globally and through the fluent interface) [Trello_2089](https://trello.com/c/d4zggQes/2089-ufg-sdks-visualgridoptionspolyfilladoptedstylesheets)
363
+ ## [3.17.20] - 2020-08-20
364
+ ### fixed
365
+ - Skip resources list: the errorStatusCode is passed to the server for UFG resources (if present) [Trello_2101](https://trello.com/c/vw3Ag8eO/2101-sdk-doesnt-pass-errorstatuscode-for-ufg-resources-if-an-error-occurred)
366
+ ## [3.17.19] - 2020-08-18
367
+ ### Updated
368
+ - Skip resources list for UFG is implemented [Trello_1974](https://trello.com/c/44xq8dze/1974-dom-snapshot-should-accept-a-skip-list-for-fetched-resources)
369
+ ## [3.17.18] - 2020-08-01
370
+ ### Fixed
371
+ - appium region screenshot issue [Trello_1996](https://trello.com/c/bmD4fCbs/1996-appium-native-ruby-error-with-png-signature-for-targetregion)
372
+ ## [3.17.17] - 2020-07-29
373
+ ### Fixed
374
+ - The availability to set :notify_on_completion manually for Applitools::BatchInfo. [Trello_2012](https://trello.com/c/OdYXtkFI/2012-batch-sequence-and-batch-notifications-are-not-working-in-the-ruby-selenium-sdk)
375
+ ### Updated
376
+ - Screenshot retry mechanism is now more efficient. [Trello 1866](https://trello.com/c/KyxkI6Bu)
377
+ ## [3.17.16] - 2020-07-16
378
+ ### Fixed
379
+ - The test name is not updated in case of double open->check->close call. [Trello 2011](https://trello.com/c/7UN1AbYU/2011-ruby-ufg-tests-creates-tests-out-of-order-when-classic-eyesopen-is-used)
380
+ ## [3.17.15] - 2020-07-16
381
+ ### Added
382
+ - Added `VisualViewport` for UFG client. [Trello 1957](https://trello.com/c/jWvdBwex/1957-add-visual-viewport-support-in-the-ui-for-mobile-devices)
383
+ ## [3.17.14] - 2020-07-9
384
+ ### Updated
385
+ - Added missing `StitchingService` URI field in `RenderRequest`. [Trello 1988](https://trello.com/c/Yr6EsUlL)
386
+ ## [3.17.13] - 2020-07-03
387
+ ## Fixed
388
+ - eyes_appium: Coded Floating Regions Incorrectly Placed [Trello_1960](https://trello.com/c/j6nJh1LS/1960-ruby-native-app-coded-floating-regions-incorrectly-placed)
389
+ - eyes_images: Simple eyes_images test is broken [Trello_1949](https://trello.com/c/dHQbz96i/1949-eyesimages-seem-to-be-broken)
390
+ ## [3.17.12] - 2020-07-02
391
+ ## Fixed
392
+ - :match_timeout property is moved to configuration object [Trello_1935](https://trello.com/c/2Z070Qgs/1935-ruby-selenium-matchtimeout-not-available-in-the-configuration-object)
393
+ ## [3.17.11] - 2020-06-25
394
+ ## Fixed
395
+ - IosDeviceOrientation is replaced by Orientation [Trello_1944](https://trello.com/c/EzyG7525/1944-ufg-safari-on-ios-orientations-changes)
396
+ ## [Eyes.sdk.ruby 3.17.10] - 2020-06-20
397
+ ## Fixed
398
+ - a configuration shared between Eyes instances in Rspec [Trello_1938](https://trello.com/c/qOQkbDO7/1938-a-configuration-shared-between-eyes-instances-in-rspec)
399
+ ## [Eyes.sdk.ruby 3.17.9] - 2020-06-19
400
+ ## Fixed
401
+ - Call :clone on a NilClass for ruby 2.3 [Trello_1855](https://trello.com/c/LCBhnTMd/1885-selenium-ruby-cant-clone-nilclass)
402
+ ## [Eyes.sdk.ruby 3.17.7] - 2020-06-18
403
+ ## Added
404
+ - eyes.ignore_displacements= and eyes.ignore_displacements methods [Trello_841](https://trello.com/c/uwrYb1Vj/841-add-a-general-method-for-ignoredisplacements?menu=filter&filter=visual%20loca,due:notdue)
405
+ ## Fixed
406
+ - Encoded regions for 'selector' mode [Trello_1915](https://trello.com/c/BQIrbCfC/1915-ruby-ultrafast-grid-incorrect-placement-of-coded-regions-for-targetregion)
407
+ ## [Eyes.sdk.ruby 3.17.6] - 2020-06-16
408
+ ## Fixed
409
+ - config.add_device_emulation(name, orientation) is fixed [Trello_1914](https://trello.com/c/l7WRvhSP/1914-ruby-ultrafast-grid-adddeviceemulation-throws-error-after-upgrading-to-3175?menu=filter&filter=due:notdue)
410
+ ## Added
411
+ - Appium driver support is ectended (Applitools::Appium::Eyes.new(driver: Appium::Driver.new)) [Trello_1913](https://trello.com/c/wQTgRNrN/1913-appium-ruby-regression-unknown-driver-appiumdriver0x00007fbaf9903448-applitoolseyeserror?menu=filter&filter=due:notdue)
412
+ ## [Eyes.sdk.ruby 3.17.5] - 2020-06-15
413
+ ## Added
414
+ - The ability to set :baseline_env_name for DesktopBrowserInfo, IosDeviceInfo and ChromeEmulationInfo
415
+ ## Fixed
416
+ - IosScreenOrientation instead of the IosScreenshotOrientation
417
+ ## [Eyes.sdk.ruby 3.17.4] - 2020-06-11
418
+ ## Fixed
419
+ - restricted to set emulation_info && ios_device_info for DesktopBrowserInfo
420
+ ## [Eyes.sdk.ruby 3.17.3] - 2020-06-06
421
+ ## Deprecated
422
+ - BrowserTypes module is deprecated in a favor of BrowserType
423
+ - Orientations module is deprecated in a favor of Orientation
424
+ ## Fixed
425
+ - IosDeviceOrientation instead of IosDeviceOrientations(plural)
426
+ ## Deprecated
427
+ ## [Eyes.sdk.ruby 3.17.2] - 2020-06-06
428
+ ## Added
429
+ - safari on ios device emulation for UFG [Trello_1872](https://trello.com/c/bykk2rzB/1872-ufg-safari-on-ios-simulators-support)
430
+ ## [Eyes.sdk.ruby 3.17.1] - 2020-05-26
431
+ ## Fixed
432
+ - eyes.properties for VG [Trello_1804](https://trello.com/c/Jt2BYz0e/1804-ruby-selenium-addproperty-method-not-recognized-when-running-with-visualgridrunner)
433
+ - SessionStartInfo parameters were not passed to Json correctly
434
+ ## [Eyes.sdk.ruby 3.17.0] - 2020-05-18
435
+ ## Added
436
+ - eyes.accessibility_validation(Applitools::AccessibilitySettings.new(Applitools::AccessibilityLevel::AA, Applitools::AccessibilityVersion::WCAG_2_0)) - [Trello_1767](https://trello.com/c/gq69woeK/1767-all-sdks-accessibility-accessiblity-guidelines-version-support-and-additional-verifications?menu=filter&filter=due:notdue)
437
+ ## Removed
438
+ - eyes.accessibility_level
439
+ ## [Eyes.sdk.ruby 3.16.16] - 2020-04-28
440
+ ## Added
441
+ - Regions support for eyes_appium (Target#ignore, Target#floating, Target#accessibility, Target#layout, etc.)
442
+ ## [Eyes.sdk.ruby 3.16.15] - 2020-04-24
443
+ ## Deprecated
444
+ - BrowserTypes::EDGE is deprecated. Please change it to either "EDGE_LEGACY" for the legacy version or to "EDGE_CHROMIUM" for the new Chromium-based version. [Trello 1757](https://trello.com/c/LUe43aee/1757-all-ultrafast-sdks-edge-chromium-support)
445
+ ## [Eyes.sdk.ruby 3.16.14] - 2020-04-10
446
+ ## Added
447
+ - new_session? flag is taken from start_session server response with fallback to the status code [Trello_1715](https://trello.com/c/DcVzWbeR/1715-all-sdks-updated-long-running-task-mode-for-startsession)
448
+ ## [Eyes.sdk.ruby 3.16.13] - 2020-04-06
449
+ ## Fixed
450
+ - eyes#hide_scrollbars is true by default [Trello 1592](https://trello.com/c/MXixwLnj/1592-upload-dom-directly-to-azure)
451
+ - eyes#ignore_caret has been included tothe configuration object [Trello)_1706](https://trello.com/c/16JqYlYb/1706-ignorecaret-globally-is-missing-ruby)
452
+ - Irrelevant URLs are excluded from SVG resource parsing results [Trello 1691](https://trello.com/c/EAIpEh8s/1691-ruby-vg-parsing-of-irrelevant-urls-from-css-and-svg-resources)
453
+ ## Added
454
+ - x-applitools-eyes-client header for all API requests [Trello_1697](https://trello.com/c/CzhUxOqE/1697-all-sdks-should-report-their-version-in-all-requests-to-the-eyes-server)
455
+ ## [Eyes.sdk.ruby 3.16.12] - 2020-03-30
456
+ ## Fixed
457
+ - eyes#send_dom didn't work [Trello 1659](https://trello.com/c/9CfD0fhn/1659-disable-dom-capturing-is-not-working-on-the-test-level-ruby)
458
+ ## [Eyes.sdk.ruby 3.16.11] - 2020-03-27
459
+ ## Fixed
460
+ - dom_capture threw an exception on a particular page [Trello 1658](https://trello.com/c/x0uYFwx0/1658-test-is-being-aborted-when-trying-to-capture-dom-ruby)
461
+ ## [Eyes.sdk.ruby 3.16.10] - 2020-03-24
462
+ ## Added
463
+ - The ability to use different Faraday adapters instead the default one [Trello 1683](https://trello.com/c/6IASHoBB/1683-add-http2-support-to-the-communication-library)
464
+ - The ability to set up timeout for HTTP request
465
+ - The ability to set up timeout for an Applitools::Future
466
+ ## [Eyes.sdk.ruby 3.16.9] - 2020-03-17
467
+ ## Fixed
468
+ - Agent ID for eyes_appium set to eyes.appium.ruby/version
469
+ ## [Eyes.sdk.ruby 3.16.8] - 2020-03-13
470
+ ## Fixed
471
+ - SDK fetch resources: the request header 'Accept-Language' is used along with 'User-Agent'
472
+ - Timeout for Thread.join is increased up to Faraday's connection timeout
473
+ - Error handling for resources that failed to fetch
474
+ ## Added
475
+ - Log messages for resource fetching now include the URL and status code
476
+ ## [Eyes.sdk.ruby 3.16.7] - 2020-03-06
477
+ ### Added
478
+ - dom_snapshot is uploaded directly to Azure storage
479
+ ### Fixed
480
+ - dom_snapshot script updated to 7.1.3
481
+ - send_dom is true by default for EyesSelenium
482
+ ## [Eyes.sdk.ruby 3.16.6] - 2020-03-05
483
+ ### Fixed
484
+ - eyes#check might be called as #check(tag, target) as well as #check(target)
485
+ - Selenium Eyes: ignore regions in the current target caused an exception
486
+ ## [Eyes.sdk.ruby 3.16.5] - 2020-03-02
487
+ ### Fixed
488
+ - double slash issue for custom server URL
489
+ ## [Eyes.sdk.ruby 3.16.2] - 2020-02-06
490
+ ### Fixed
491
+ - DefaultMatchSettings being overridden incorrectly by ImageMatchSettings
492
+ ## [Eyes.sdk.ruby 3.16.1] - 2020-01-29
493
+ ### Fixed
494
+ - eyes_appium crashed trying to get viewport_size
495
+ ### Added
496
+ - long_requests are used for start session
497
+ ## [Eyes.sdk.ruby 3.16.0] - 2020-01-24
498
+ ### Added
499
+ - Screenshot uploading direct to cloud store
500
+ ## [Eyes.sdk.ruby 3.15.48] - 2020-01-20
501
+ ### Added
502
+ - New browser types for the VisualGrid (CHROME, CHROME_ONE_VERSION_BACK, CHROME_TWO_VERSIONS_BACK, FIREFOX, FIREFOX_ONE_VERSION_BACK, FIREFOX_TWO_VERSIONS_BACK, SAFARI, SAFARI_ONE_VERSION_BACK, SAFARI_TWO_VERSIONS_BACK, IE_10, IE_11, EDGE)
503
+ ## [Eyes.sdk.ruby 3.15.47] - 2020-01-08
504
+ ### Fixed
505
+ - eyes_images throws "undefined method `each' for nil:NilClass (NoMethodError)"
506
+ ## [Eyes.sdk.ruby 3.15.43] - 2019-12-20
507
+ ### Removed
508
+ - delta compression for screenshots
509
+ ## [Eyes.sdk.ruby 3.15.43] - 2019-12-19
510
+ ### Added
511
+ - eyes.abort_async method implementation
512
+ ### Fixed
513
+ - save_new_tests is true by default
514
+ - tests are aborted instead of being closed on render fail
515
+ ## [Eyes.sdk.ruby 3.15.43] - 2019-12-12
516
+ ### Added
517
+ - Return empty test if the render fails
518
+ - eyes.abort method
519
+ ## [Eyes.sdk.ruby 3.15.42] - 2019-12-10
520
+ ### Fixed
521
+ - CSS paring & fetching font urls
522
+ - VisualGridEyes#config renamed to #configuration
523
+ - VisualGridEyes.configuration returns a clone of a configuration object
524
+ ## [Eyes.sdk.ruby 3.15.41] - 2019-11-06
525
+ ### Fixed
526
+ - Various VG related bugs
527
+ ## [Eyes.sdk.ruby 3.15.39] - 2019-11-06
528
+ ### Added
529
+ - This CHANGELOG file.
530
+ ### Fixed
531
+ - Chrome 78 css stitching bug
data/Rakefile ADDED
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rake/clean'
4
+ require 'securerandom'
5
+
6
+ require 'bundler/gem_helper'
7
+ # Monkey patch the Bundler release class to change tags for eyes_images
8
+ module Bundler
9
+ class GemHelper
10
+
11
+ def version_tag
12
+ ruby_tag = "@applitools/ruby"
13
+ "#{ruby_tag}/#{gemspec.name}@#{version}"
14
+ end
15
+
16
+ end
17
+ end
18
+
19
+ Bundler::GemHelper.install_tasks
20
+
21
+ namespace :applitools do
22
+
23
+ task :get_build_server do
24
+ load 'ext/eyes-universal/Rakefile'
25
+ Rake::Task['get_compress_all_binaries'].invoke
26
+ end
27
+
28
+ end
29
+
30
+ task :build => ['applitools:get_build_server']
31
+
32
+ namespace 'github' do
33
+ task :set_batch_info do
34
+ batch_id = SecureRandom.uuid
35
+ # next if ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
36
+ ENV['APPLITOOLS_DONT_CLOSE_BATCHES'] = 'true'
37
+ ENV['APPLITOOLS_BATCH_ID'] = batch_id unless ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
38
+ ENV['APPLITOOLS_BATCH_NAME'] = "Eyes Ruby SDK(#{RUBY_VERSION} | #{RUBY_PLATFORM})"
39
+ end
40
+
41
+ task :check do
42
+ puts "Batch ID: #{ENV['APPLITOOLS_BATCH_ID']}"
43
+ puts "Batch NAME: #{ENV['APPLITOOLS_BATCH_NAME']}"
44
+ end
45
+
46
+ task :server_tests => [:set_batch_info, :check] do
47
+ sh('bundle exec parallel_rspec -n 1 -- --tag universal_server -- spec/eyes_universal/*_spec.rb')
48
+ end
49
+ end
@@ -1,30 +1,20 @@
1
1
  require 'rubygems'
2
2
  require 'rake/clean'
3
3
 
4
- CURRENT_VERSION_PATH = File.expand_path('../../lib/applitools/version', File.dirname(__FILE__))
4
+ CURRENT_VERSION_PATH = File.expand_path('../../lib/applitools/eyes_universal/version', File.dirname(__FILE__))
5
5
  require CURRENT_VERSION_PATH
6
- DOWNLOADER_PATH = File.expand_path('../../lib/applitools/universal_sdk/universal_server_downloader', File.dirname(__FILE__))
6
+ DOWNLOADER_PATH = File.expand_path('../../lib/applitools/eyes_universal/universal_server_downloader', File.dirname(__FILE__))
7
7
  require DOWNLOADER_PATH
8
8
 
9
- desc "Download universal server binaries"
9
+ desc "Install universal server binaries"
10
10
  task :default => [:prepare_server]
11
11
 
12
- # depricated
13
- file "get_server" do
14
- Applitools::UniversalServerDownloader.download(File.dirname(__FILE__))
15
- end
16
-
17
- # depricated
18
- file "get_server_compressed" do
19
- Applitools::UniversalServerDownloader.tar_gz_download(File.dirname(__FILE__))
20
- end
21
-
22
12
  # install
23
13
  file "prepare_server" do
24
- Applitools::UniversalServerDownloader.prepare_server(File.dirname(__FILE__))
14
+ Applitools::EyesUniversal::UniversalServerDownloader.prepare_server(File.dirname(__FILE__))
25
15
  end
26
16
 
27
17
  # build
28
18
  file "get_compress_all_binaries" do
29
- Applitools::UniversalServerDownloader.get_compress_all_binaries(File.dirname(__FILE__))
30
- end
19
+ Applitools::EyesUniversal::UniversalServerDownloader.get_compress_all_binaries(File.dirname(__FILE__))
20
+ end
Binary file
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+ require_relative "lib/applitools/eyes_universal/version"
7
+
8
+
9
+
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = 'eyes_universal'
13
+ spec.version = Applitools::EyesUniversal::VERSION
14
+ spec.authors = ['Applitools Team']
15
+ spec.email = ['team@applitools.com']
16
+ spec.description = 'eyes-universal binaries for writing Applitools tests'
17
+ spec.summary = 'Applitools Ruby Universal binaries for SDK'
18
+ spec.homepage = 'https://www.applitools.com'
19
+ spec.license = 'Applitools'
20
+
21
+ spec.files = [
22
+ 'ext/eyes-universal/core.tar.gz',
23
+ 'ext/eyes-universal/Rakefile',
24
+ 'lib/applitools/eyes_universal/universal_server_downloader.rb',
25
+ 'lib/applitools/eyes_universal/executable_finder.rb',
26
+ 'lib/applitools/eyes_universal/universal_server_control.rb',
27
+ 'lib/eyes_universal.rb',
28
+ 'lib/applitools/eyes_universal/version.rb',
29
+ 'CHANGELOG.md',
30
+ 'eyes_universal.gemspec',
31
+ 'Rakefile',
32
+ ]
33
+ spec.extensions = ["ext/eyes-universal/Rakefile"]
34
+
35
+ spec.add_development_dependency 'open-uri', '~> 0.1', '>= 0.1.0'
36
+ spec.add_development_dependency 'stringio'
37
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Applitools::EyesUniversal
4
+ module UniversalServerGemFinder
5
+ extend self
6
+
7
+ SERVER_GEM_NAME = 'eyes_universal'
8
+
9
+ def filepath
10
+ server_lib ? File.join(server_lib.gem_dir, 'ext', 'eyes-universal', filename) : ''
11
+ end
12
+
13
+ def other_filepaths
14
+ in_gem_path = File.join('gems', server_lib.full_name, 'ext', 'eyes-universal', filename)
15
+ Gem.path.map {|path| File.expand_path(in_gem_path, path) }
16
+ end
17
+
18
+ def executable_filepath
19
+ raise 'Universal server not Found' if server_lib.nil?
20
+ return filepath if valid_file?(filepath)
21
+ core_path = other_filepaths.find {|path| valid_file?(path) }
22
+ return core_path if core_path
23
+ raise 'Universal server unrecognized'
24
+ end
25
+
26
+ private
27
+
28
+ def server_lib
29
+ Gem::Specification.find_by_name(SERVER_GEM_NAME)
30
+ rescue Gem::MissingSpecError
31
+ nil
32
+ end
33
+
34
+ def filename
35
+ return 'core-win.exe' if Gem.win_platform?
36
+ case RUBY_PLATFORM
37
+ when /darwin/i
38
+ 'core-macos'
39
+ when /arm/i
40
+ 'core-linux-arm64'
41
+ when /mswin|windows|mingw/i
42
+ 'core-win.exe'
43
+ when /musl/i
44
+ 'core-alpine'
45
+ when /linux|arch/i
46
+ 'core-linux'
47
+ else
48
+ raise 'Unsupported platform'
49
+ end
50
+ end
51
+
52
+ def valid_file?(path)
53
+ File.exist?(path) && File.executable?(path)
54
+ end
55
+
56
+ end
57
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'singleton'
4
+ require 'socket'
5
+
6
+ module Applitools::EyesUniversal
7
+ class UniversalServerControl
8
+
9
+ include Singleton
10
+
11
+ DEFAULT_SERVER_IP = '127.0.0.1'
12
+ DEFAULT_SERVER_HOST = 'localhost'
13
+ EXECUTABLE_FILEPATH = Applitools::EyesUniversal::UniversalServerGemFinder.executable_filepath
14
+
15
+ def initialize
16
+ @control_pipe = nil
17
+ @port_pipe = nil
18
+ @usdk_pid = nil
19
+ @monitoring_thread = nil
20
+ @port = nil
21
+ start_server_with_pipe
22
+ @sockets = []
23
+ end
24
+
25
+ def server_port
26
+ @port
27
+ end
28
+
29
+ def new_server_socket_connection
30
+ begin
31
+ # socket = TCPSocket.new(DEFAULT_SERVER_IP, @port)
32
+ socket = Addrinfo.tcp(DEFAULT_SERVER_HOST, @port).connect
33
+ @sockets.push(socket)
34
+ socket
35
+ rescue Errno::ECONNREFUSED => e
36
+ puts e
37
+ nil
38
+ end
39
+ end
40
+
41
+ def server_running?
42
+ return false if @monitoring_thread.nil?
43
+ monitoring_result = @monitoring_thread.join(1)
44
+ monitoring_result.nil?
45
+ end
46
+
47
+ def stop_server
48
+ return if @control_pipe.nil?
49
+ @control_pipe.close_write
50
+ @sockets.each {|socket| socket.close unless socket.closed? }
51
+ sleep(1)
52
+ end
53
+
54
+ def to_s # for test & debug
55
+ "SDKServer(port=#{@port}; pid=#{@usdk_pid})"
56
+ end
57
+
58
+ private
59
+
60
+ def start_server_with_pipe
61
+ in_pipe, @control_pipe = IO.pipe
62
+ @port_pipe, port_w = IO.pipe
63
+
64
+ @usdk_pid = spawn(
65
+ EXECUTABLE_FILEPATH, 'universal', '--no-singleton', '--shutdown-mode', 'stdin',
66
+ in: in_pipe, out: port_w, err: port_w,
67
+ # close_others: true
68
+ )
69
+ in_pipe.close_read
70
+ port_w.close_write
71
+
72
+ @monitoring_thread = Process.detach(@usdk_pid)
73
+
74
+ # can print Warning from server
75
+ server_message = @port_pipe.readline.strip
76
+ while server_message.to_i.zero?
77
+ if ENV['APPLITOOLS_SHOW_LOGS']
78
+ puts server_message
79
+ end
80
+ server_message = @port_pipe.readline.strip
81
+ end
82
+ @port = server_message.to_i
83
+
84
+ @port_pipe.close_read
85
+
86
+ if ENV['APPLITOOLS_SHOW_LOGS']
87
+ puts "Started Universal SDK server at #{@port} pid = #{@usdk_pid} ; from #{EXECUTABLE_FILEPATH}"
88
+ end
89
+ end
90
+
91
+ end
92
+ end
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'open-uri'
4
+ require 'rubygems/package'
5
+ require 'zlib'
6
+
7
+ module Applitools
8
+ module EyesUniversal
9
+ class UniversalServerDownloader
10
+ class << self
11
+
12
+ def tar_gz_filepath(to)
13
+ File.expand_path(tar_gz_filename, to)
14
+ end
15
+
16
+
17
+ def prepare_server(to) # install
18
+ where = tar_gz_filepath(to)
19
+ puts "[eyes-universal] prepare server : #{where}"
20
+
21
+ Gem::Package::TarReader.new(Zlib::GzipReader.open(where)) do |tar|
22
+ tar.each do |entry|
23
+ binary_filename = File.basename(entry.full_name)
24
+ if filename != binary_filename
25
+ puts "[eyes-universal] skip #{binary_filename}"
26
+ next
27
+ end
28
+ puts "[eyes-universal] process #{binary_filename}"
29
+ unpacked_binary = File.expand_path(binary_filename, to)
30
+ File.open(unpacked_binary, 'wb') {|f| f.print entry.read }
31
+
32
+ FileUtils.chmod('+x', unpacked_binary)
33
+ # binary_version = `#{unpacked_binary} --version`
34
+ puts "[eyes-universal] Binary ready #{binary_filename} (#{Applitools::EyesUniversal::UNIVERSAL_CORE_VERSION}) at #{unpacked_binary}"
35
+ end
36
+ end
37
+ end
38
+
39
+
40
+ def get_compress_all_binaries(to)
41
+ filenames = ['core-alpine', 'core-linux', 'core-linux-arm64', 'core-macos', 'core-win.exe']
42
+
43
+ target_core = File.expand_path(tar_gz_filename, to)
44
+ if File.exist?(target_core)
45
+ puts "[eyes-universal] Use Server placed in #{target_core}"
46
+ return
47
+ end
48
+ File.open(target_core, "wb") do |file|
49
+ Zlib::GzipWriter.wrap(file) do |gzip|
50
+ Gem::Package::TarWriter.new(gzip) do |tar|
51
+
52
+ filenames.each do |fname|
53
+ binary_url = URI.join(base_url, fname)
54
+ where = File.expand_path(fname, to)
55
+ binary_url.open {|cloud| File.binwrite(where, cloud.read) }
56
+ mode = File.stat(where).mode
57
+ tar.add_file_simple(fname, mode, File.size(where)) do |io|
58
+ File.open(where, "rb") do |f|
59
+ io.write(f.read)
60
+ end
61
+ end
62
+ puts "[eyes-universal] Download complete. Server placed in #{where}"
63
+ end
64
+
65
+ end
66
+ end
67
+ end
68
+
69
+ if File.exist?(target_core)
70
+ puts "[eyes-universal] Download complete (#{Applitools::EyesUniversal::UNIVERSAL_CORE_VERSION}). Server placed in #{target_core}"
71
+ else
72
+ raise "[eyes-universal] ERROR : Download incomplete (#{Applitools::EyesUniversal::UNIVERSAL_CORE_VERSION}). Server not ready"
73
+ end
74
+ end
75
+
76
+
77
+ private
78
+
79
+ def base_url
80
+ "https://github.com/applitools/eyes.sdk.javascript1/releases/download/js%2Fcore%40#{Applitools::EyesUniversal::UNIVERSAL_CORE_VERSION}/"
81
+ end
82
+
83
+ def filename
84
+ return 'core-win.exe' if Gem.win_platform?
85
+ case RUBY_PLATFORM
86
+ when /darwin/i
87
+ 'core-macos'
88
+ when /arm/i
89
+ 'core-linux-arm64'
90
+ when /mswin|windows|mingw/i
91
+ 'core-win.exe'
92
+ when /musl/i
93
+ 'core-alpine'
94
+ when /linux|arch/i
95
+ 'core-linux'
96
+ else
97
+ raise "Unsupported platform #{RUBY_PLATFORM}"
98
+ end
99
+ end
100
+
101
+ def tar_gz_filename
102
+ 'core.tar.gz'
103
+ end
104
+
105
+
106
+ end
107
+ end
108
+ end
109
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: false
2
+
3
+ module Applitools
4
+ module EyesUniversal
5
+ VERSION = '4.5.2'.freeze
6
+ UNIVERSAL_CORE_VERSION = '4.5.2'.freeze
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "applitools/eyes_universal/version"
4
+ require_relative "applitools/eyes_universal/executable_finder"
5
+ require_relative "applitools/eyes_universal/universal_server_control"
6
+
7
+ module Applitools::EyesUniversal
8
+
9
+ end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_universal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 4.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-11 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open-uri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.1'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: 0.1.0
20
+ - - "~>"
21
+ - !ruby/object:Gem::Version
22
+ version: '0.1'
23
23
  type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '0.1'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: 0.1.0
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '0.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: stringio
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -52,10 +52,16 @@ extensions:
52
52
  - ext/eyes-universal/Rakefile
53
53
  extra_rdoc_files: []
54
54
  files:
55
+ - CHANGELOG.md
56
+ - Rakefile
55
57
  - ext/eyes-universal/Rakefile
56
58
  - ext/eyes-universal/core.tar.gz
57
- - lib/applitools/universal_sdk/universal_server_downloader.rb
58
- - lib/applitools/version.rb
59
+ - eyes_universal.gemspec
60
+ - lib/applitools/eyes_universal/executable_finder.rb
61
+ - lib/applitools/eyes_universal/universal_server_control.rb
62
+ - lib/applitools/eyes_universal/universal_server_downloader.rb
63
+ - lib/applitools/eyes_universal/version.rb
64
+ - lib/eyes_universal.rb
59
65
  homepage: https://www.applitools.com
60
66
  licenses:
61
67
  - Applitools
@@ -75,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
81
  - !ruby/object:Gem::Version
76
82
  version: '0'
77
83
  requirements: []
78
- rubygems_version: 3.3.14
84
+ rubygems_version: 3.0.3.1
79
85
  signing_key:
80
86
  specification_version: 4
81
87
  summary: Applitools Ruby Universal binaries for SDK
@@ -1,212 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'open-uri'
4
- require 'digest'
5
- require 'fileutils'
6
- require 'rubygems/package'
7
- require 'zlib'
8
-
9
- module Applitools
10
- class UniversalServerDownloader
11
- class << self
12
-
13
- EXPECTED_SHA = {
14
- # 'core.tar.gz' => '18c85f7aa8800b954847640dfb959cc48794ad05d95dde96c15db42c9154792f',
15
- 'core-alpine' => 'ddb73106b9162b067cc3c6eeb45549db46cd27cc1dce10049e0462ca53a05997',
16
- 'core-linux' => '4bb76583b380cc300979bdd7ecc5e17cc6b954187c1e18619fdd5bb102b31d0a',
17
- 'core-linux-arm64' => 'de8e502ac25edfeced882b7fbde44eb825e9708fa186c0338d3943fe4c03f693',
18
- 'core-macos' => 'a4d0a1c19a93e12e1e4d0b67944110614b08889108aae77c31749d287c9023d7',
19
- 'core-win.exe' => 'd883e3ac51e6510ebb1ba22491bd51313bb2c44456b3ae404a461603cb42e4eb'
20
- }
21
-
22
- def download(to)
23
- puts "[eyes-universal] Downloading Eyes universal server from #{full_url}"
24
- where = filepath(to)
25
- full_url.open {|cloud| File.binwrite(where, cloud.read) }
26
- if Digest::SHA256.file(where).to_s == expected_binary_sha
27
- FileUtils.chmod('+x', where)
28
- puts "[eyes-universal] Download complete. Server placed in #{where}"
29
- else
30
- puts "[eyes-universal] Download broken. Please try reinstall"
31
- end
32
- end
33
-
34
- def filepath(to)
35
- File.expand_path(filename, to)
36
- end
37
-
38
- def tar_gz_filepath(to)
39
- File.expand_path(tar_gz_filename, to)
40
- end
41
-
42
- def tar_gz_download(to) # build - depricated
43
- puts "[eyes-universal] Downloading Core server from #{tar_gz_full_url}"
44
- where = tar_gz_filepath(to)
45
- unless File.exist?(where) && Digest::SHA256.file(where).to_s == tar_gz_sha
46
- tar_gz_full_url.open {|cloud| File.binwrite(where, cloud.read) }
47
- end
48
- downloaded_sha = Digest::SHA256.file(where).to_s
49
- if downloaded_sha == tar_gz_sha
50
- Gem::Package::TarReader.new(Zlib::GzipReader.open(where)) do |tar|
51
- tar.each do |entry|
52
- binary_filename = File.basename(entry.full_name)
53
- dest = File.expand_path(binary_filename, to)
54
- dest_dir = File.dirname(dest)
55
- FileUtils.mkdir_p(dest_dir) unless Dir.exist?(dest_dir)
56
- FileUtils.remove_file(dest) if File.exist?(dest)
57
- File.open(dest, 'wb') {|f| f.print entry.read }
58
-
59
- binary_sha = Digest::SHA256.file(dest).to_s
60
- if check_binary(binary_filename, binary_sha)
61
- FileUtils.chmod('+x', dest)
62
- puts "[eyes-universal] Binary check pass #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}): #{dest}"
63
- FileUtils.rm(dest)
64
- else
65
- raise "[eyes-universal] Binary fail #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}): #{binary_sha}"
66
- end
67
- end
68
- end
69
- puts "[eyes-universal] Download complete (#{Applitools::UNIVERSAL_CORE_VERSION}). Server placed in #{where}"
70
- else
71
- raise "[eyes-universal] Download broken. (mismatch: #{downloaded_sha})"
72
- end
73
- end
74
-
75
- def prepare_server(to) # install
76
- where = tar_gz_filepath(to)
77
- # downloaded_sha = Digest::SHA256.file(where).to_s
78
- # puts "[eyes-universal] prepare server : #{where} #{downloaded_sha}"
79
- puts "[eyes-universal] prepare server : #{where}"
80
-
81
- # if downloaded_sha == tar_gz_sha
82
- Gem::Package::TarReader.new(Zlib::GzipReader.open(where)) do |tar|
83
- tar.each do |entry|
84
- binary_filename = File.basename(entry.full_name)
85
- if filename != binary_filename
86
- puts "[eyes-universal] skip #{binary_filename}"
87
- next
88
- end
89
- puts "[eyes-universal] process #{binary_filename}"
90
- unpacked_binary = File.expand_path(binary_filename, to)
91
- # FileUtils.remove_file(unpacked_binary) if File.exist?(unpacked_binary)
92
- File.open(unpacked_binary, 'wb') {|f| f.print entry.read }
93
-
94
- # binary_sha = Digest::SHA256.file(unpacked_binary).to_s
95
- # if check_binary(binary_filename, binary_sha)
96
- FileUtils.chmod('+x', unpacked_binary)
97
- puts "[eyes-universal] Binary ready #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}) at #{unpacked_binary}"
98
- # else
99
- # puts "[eyes-universal] Binary check fail #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}): #{binary_sha}"
100
- # end
101
- end
102
- end
103
- # else
104
- # puts "[eyes-universal] Server broken. (mismatch: #{downloaded_sha})"
105
- # end
106
- end
107
-
108
- def get_compress_all_binaries(to)
109
- filenames = EXPECTED_SHA.keys
110
-
111
- target_core = File.expand_path(tar_gz_filename, to)
112
- File.open(target_core, "wb") do |file|
113
- Zlib::GzipWriter.wrap(file) do |gzip|
114
- Gem::Package::TarWriter.new(gzip) do |tar|
115
-
116
- filenames.each do |fname|
117
- binary_url = URI.join(base_url, fname)
118
- where = File.expand_path(fname, to)
119
- # unless File.exist?(where) && Digest::SHA256.file(where).to_s == EXPECTED_SHA[fname] # local dev/debug
120
- binary_url.open {|cloud| File.binwrite(where, cloud.read) }
121
- # end
122
- # downloaded_sha = Digest::SHA256.file(where).to_s
123
- # if downloaded_sha == EXPECTED_SHA[fname]
124
- mode = File.stat(where).mode
125
- tar.add_file_simple(fname, mode, File.size(where)) do |io|
126
- File.open(where, "rb") do |f|
127
- io.write(f.read)
128
- end
129
- end
130
- puts "[eyes-universal] Download complete. Server placed in #{where}"
131
- # else
132
- # puts "[eyes-universal] Download broken. (#{fname} mismatch: #{downloaded_sha})"
133
- # end
134
- end
135
-
136
- end
137
- end
138
- end
139
-
140
- if File.exist?(target_core)
141
- puts "[eyes-universal] Download complete (#{Applitools::UNIVERSAL_CORE_VERSION}). Server placed in #{target_core}"
142
- else
143
- raise "[eyes-universal] ERROR : Download incomplete (#{Applitools::UNIVERSAL_CORE_VERSION}). Server not ready"
144
- end
145
- end
146
-
147
- private
148
-
149
- def base_url
150
- "https://github.com/applitools/eyes.sdk.javascript1/releases/download/js%2Fcore%40#{Applitools::UNIVERSAL_CORE_VERSION}/"
151
- end
152
-
153
- def full_url
154
- URI.join(base_url, filename)
155
- end
156
-
157
- def expected_binary_sha
158
- return EXPECTED_SHA['core-win.exe'] if Gem.win_platform?
159
- case RUBY_PLATFORM
160
- when /darwin/i
161
- EXPECTED_SHA['core-macos']
162
- when /arm/i
163
- EXPECTED_SHA['core-linux-arm64']
164
- when /mswin|windows|mingw/i
165
- EXPECTED_SHA['core-win.exe']
166
- when /musl/i
167
- EXPECTED_SHA['core-alpine']
168
- when /linux|arch/i
169
- EXPECTED_SHA['core-linux']
170
- else
171
- raise 'Unsupported platform'
172
- end
173
- end
174
-
175
- def filename
176
- return 'core-win.exe' if Gem.win_platform?
177
- case RUBY_PLATFORM
178
- when /darwin/i
179
- 'core-macos'
180
- when /arm/i
181
- 'core-linux-arm64'
182
- when /mswin|windows|mingw/i
183
- 'core-win.exe'
184
- when /musl/i
185
- 'core-alpine'
186
- when /linux|arch/i
187
- 'core-linux'
188
- else
189
- raise "Unsupported platform #{RUBY_PLATFORM}"
190
- end
191
- end
192
-
193
- def tar_gz_full_url
194
- URI.join(base_url, tar_gz_filename)
195
- end
196
-
197
- def tar_gz_filename
198
- 'core.tar.gz'
199
- end
200
- def tar_gz_sha
201
- EXPECTED_SHA[tar_gz_filename]
202
- end
203
-
204
- def check_binary(binary_filename, binary_sha)
205
- expected_sha = EXPECTED_SHA[binary_filename]
206
- raise "Unsupported platform #{binary_filename}" if expected_sha.nil?
207
- binary_sha == expected_sha
208
- end
209
-
210
- end
211
- end
212
- end
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: false
2
-
3
- module Applitools
4
- VERSION = '5.0.0'.freeze
5
- IMAGES_VERSION = '5.0.0'.freeze
6
- UNIVERSAL_VERSION = '3.6.0'.freeze
7
- UNIVERSAL_CORE_VERSION = '3.6.0'.freeze
8
- end