eyes_universal 4.7.0 → 4.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d777c1ce518d682ed3ed0b2876653d16b98e47522b229af77d6c621b9aab6cc6
4
- data.tar.gz: a4036ddc0929f59a5ba31bff4e4a123c837e22e953844715fe1cd35e486537fe
3
+ metadata.gz: d540e11d9aed3711562552651b8b6c1af288f85b80d470a87d78efd4ed5842d2
4
+ data.tar.gz: 8364c3cea6ec2ad256a35dcea889f84b2185676e77ad79cacd0d08180c5debb8
5
5
  SHA512:
6
- metadata.gz: f2627e3f94a0602c85a5fb6aefe0fea6b0c5b3c379061af4dfcb41109b01b7b0230f23b8e693ad2e5db41c184c5121ec051a8937c9e6b9fb8f51cb0b7005775a
7
- data.tar.gz: 44e123a774c13c3b748e52de1985e8c6422e31930857bf94c85f76dad9d12d10b282ae0d4b8fcbffa78835dd204dd078f05538df5f51013748172e7b10d69f6b
6
+ metadata.gz: 3d4ce98affb300bdb448fb1eab235c27fbac766caa12274429f66283b6e75bc1cdc57df674ceee84d9f709b632e8876e6a7e6449f33b5563800994032b60d279
7
+ data.tar.gz: 190b7bec2994ffaa96f5e4991a97b0adfa34306f2e7ca0e3f3ff65d9e6b80277e8444bf5be90a9f11cc88dd694c33f5c48b6bfd50726eea8b0c720ceb85aa59e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,93 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.9.1](https://github.com/applitools/eyes.sdk.javascript1/compare/ruby/eyes_universal@4.8.0...ruby/eyes_universal@4.9.1) (2024-02-29)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/req bumped to 1.6.5
9
+ #### Bug Fixes
10
+
11
+ * fixed url concatenation logic ([#2197](https://github.com/applitools/eyes.sdk.javascript1/issues/2197)) ([c3b2e0a](https://github.com/applitools/eyes.sdk.javascript1/commit/c3b2e0ad47f002978544eaac759a80f18f7c5ee3))
12
+ * @applitools/dom-shared bumped to 1.0.13
13
+ #### Bug Fixes
14
+
15
+ * dont execute script synchronously in polling ([#2228](https://github.com/applitools/eyes.sdk.javascript1/issues/2228)) ([04f525b](https://github.com/applitools/eyes.sdk.javascript1/commit/04f525bcac19bc2fb7240928add28f71efcef0ea))
16
+ * @applitools/core-base bumped to 1.9.1
17
+ #### Bug Fixes
18
+
19
+ * fixed url concatenation logic ([#2197](https://github.com/applitools/eyes.sdk.javascript1/issues/2197)) ([c3b2e0a](https://github.com/applitools/eyes.sdk.javascript1/commit/c3b2e0ad47f002978544eaac759a80f18f7c5ee3))
20
+
21
+
22
+
23
+ * @applitools/dom-capture bumped to 11.2.6
24
+
25
+ * @applitools/dom-snapshot bumped to 4.8.1
26
+
27
+ * @applitools/nml-client bumped to 1.7.2
28
+
29
+ * @applitools/tunnel-client bumped to 1.4.1
30
+ #### Bug Fixes
31
+
32
+ * upgrade execution-grid-tunnel to avoid port collision ([751e4e2](https://github.com/applitools/eyes.sdk.javascript1/commit/751e4e2441eb85604bbece0a9dbe18fa16b23847))
33
+
34
+
35
+
36
+ * @applitools/ufg-client bumped to 1.9.10
37
+
38
+ * @applitools/ec-client bumped to 1.7.27
39
+
40
+ * @applitools/core bumped to 4.9.1
41
+
42
+
43
+ ## [4.8.0](https://github.com/applitools/eyes.sdk.javascript1/compare/ruby/eyes_universal-v4.7.0...ruby/eyes_universal@4.8.0) (2024-02-13)
44
+
45
+
46
+ ### Dependencies
47
+
48
+ * @applitools/dom-snapshot bumped to 4.7.17
49
+ #### Bug Fixes
50
+
51
+ * throw error for encoding none unicode char ([#2171](https://github.com/applitools/eyes.sdk.javascript1/issues/2171)) ([4edb9cf](https://github.com/applitools/eyes.sdk.javascript1/commit/4edb9cfb27d8db2ff4cb09c8ebf1b95ab020633d))
52
+ * @applitools/spec-driver-webdriver bumped to 1.0.57
53
+ #### Bug Fixes
54
+
55
+ * fixed issue with cdp commands on chromium browsers ([#2180](https://github.com/applitools/eyes.sdk.javascript1/issues/2180)) ([550fc77](https://github.com/applitools/eyes.sdk.javascript1/commit/550fc772d3988aae29e6f4a1a11d2a408072dc38))
56
+ * @applitools/spec-driver-puppeteer bumped to 1.4.0
57
+ #### Features
58
+
59
+ * added support for puppeteer >= 22 ([#2185](https://github.com/applitools/eyes.sdk.javascript1/issues/2185)) ([59d23a9](https://github.com/applitools/eyes.sdk.javascript1/commit/59d23a9689d77c7db06df53b67fa293a3b3f166e))
60
+ * @applitools/nml-client bumped to 1.7.0
61
+ #### Features
62
+
63
+ * add support for regions and calculated regions ([#2161](https://github.com/applitools/eyes.sdk.javascript1/issues/2161)) ([fea4b1f](https://github.com/applitools/eyes.sdk.javascript1/commit/fea4b1fca3d8f59eada2b5186cd32d47352ccf1a))
64
+
65
+
66
+ #### Bug Fixes
67
+
68
+ * missing viewport when using system screenshot and multi viewport ([#2173](https://github.com/applitools/eyes.sdk.javascript1/issues/2173)) ([411283c](https://github.com/applitools/eyes.sdk.javascript1/commit/411283c7bebc09f178d73b6b47e81e5ce4244d5e))
69
+
70
+
71
+
72
+ * @applitools/screenshoter bumped to 3.8.23
73
+
74
+ * @applitools/ec-client bumped to 1.7.25
75
+
76
+ * @applitools/core bumped to 4.8.0
77
+ #### Features
78
+
79
+ * add support for regions and calculated regions ([#2161](https://github.com/applitools/eyes.sdk.javascript1/issues/2161)) ([fea4b1f](https://github.com/applitools/eyes.sdk.javascript1/commit/fea4b1fca3d8f59eada2b5186cd32d47352ccf1a))
80
+
81
+
82
+ #### Bug Fixes
83
+
84
+ * missing viewport when using system screenshot and multi viewport ([#2173](https://github.com/applitools/eyes.sdk.javascript1/issues/2173)) ([411283c](https://github.com/applitools/eyes.sdk.javascript1/commit/411283c7bebc09f178d73b6b47e81e5ce4244d5e))
85
+ * nml coded region integration with universal ([6fb0934](https://github.com/applitools/eyes.sdk.javascript1/commit/6fb09348238dfe4698856f88e762a9abf80c686f))
86
+ * throw error for encoding none unicode char ([#2171](https://github.com/applitools/eyes.sdk.javascript1/issues/2171)) ([4edb9cf](https://github.com/applitools/eyes.sdk.javascript1/commit/4edb9cfb27d8db2ff4cb09c8ebf1b95ab020633d))
87
+
88
+
89
+
90
+
3
91
  ## [6.0.3] (2024-02-02)
4
92
 
5
93
  * ### Bug Fixes
data/Rakefile CHANGED
@@ -2,37 +2,60 @@
2
2
 
3
3
  require 'rake/clean'
4
4
  require 'securerandom'
5
-
6
5
  require 'bundler/gem_helper'
6
+
7
7
  # Monkey patch the Bundler release class to change tags for eyes_images
8
8
  module Bundler
9
9
  class GemHelper
10
-
11
10
  def version_tag
12
11
  ruby_tag = "@applitools/ruby"
13
12
  "#{ruby_tag}/#{gemspec.name}@#{version}"
14
13
  end
15
-
16
14
  end
17
15
  end
18
16
 
19
17
  Bundler::GemHelper.install_tasks
20
18
 
19
+ # Add a task for downloading binaries
21
20
  namespace :applitools do
21
+ DL_SCRIPT = File.expand_path("../../scripts/download-core-bin.sh", File.dirname(__FILE__))
22
+ BINARIES_DIR = File.expand_path("ext/eyes-universal", File.dirname(__FILE__))
23
+ ARCHIVE_NAME = "core.tar.gz"
24
+ VERSION = Applitools::EyesUniversal::UNIVERSAL_CORE_VERSION
22
25
 
23
- task :get_build_server do
24
- load 'ext/eyes-universal/Rakefile'
25
- Rake::Task['get_compress_all_binaries'].invoke
26
- end
26
+ task :download_binaries do
27
+ # Check if the archive or binaries already exist
28
+ archive_path = File.join(BINARIES_DIR, ARCHIVE_NAME)
27
29
 
30
+ if File.exist?(archive_path)
31
+ puts "[eyes-universal] Archive already exist, skipping archiving."
32
+ else
33
+ if Dir.glob(File.join(BINARIES_DIR, 'core-*')).any?
34
+ puts "[eyes-universal] Binaries already downloaded"
35
+ else
36
+ sh "#{DL_SCRIPT} --tag js/core@#{VERSION} --dir #{BINARIES_DIR}"
37
+ puts "[eyes-universal] Binaries downloaded to #{BINARIES_DIR}"
38
+ end
39
+
40
+ # Compress downloaded binaries into core.tar.gz
41
+ if Dir.chdir(BINARIES_DIR) do
42
+ sh "cd #{BINARIES_DIR} && tar -czf #{ARCHIVE_NAME} core-*"
43
+ end
44
+ puts "[eyes-universal] Compressed binaries into #{archive_path}"
45
+ else
46
+ puts "[eyes-universal] Archive already exist, skipping archiving."
47
+ end
48
+ end
49
+
50
+ end
28
51
  end
29
52
 
30
- task :build => ['applitools:get_build_server']
53
+ # Make sure downloading binaries happens before the build
54
+ task :build => ['applitools:download_binaries']
31
55
 
32
56
  namespace 'github' do
33
57
  task :set_batch_info do
34
58
  batch_id = SecureRandom.uuid
35
- # next if ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
36
59
  ENV['APPLITOOLS_DONT_CLOSE_BATCHES'] = 'true'
37
60
  ENV['APPLITOOLS_BATCH_ID'] = batch_id unless ENV['APPLITOOLS_BATCH_ID'] && !ENV['APPLITOOLS_BATCH_ID'].empty?
38
61
  ENV['APPLITOOLS_BATCH_NAME'] = "Eyes Ruby SDK(#{RUBY_VERSION} | #{RUBY_PLATFORM})"
@@ -3,18 +3,13 @@ require 'rake/clean'
3
3
 
4
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/eyes_universal/universal_server_downloader', File.dirname(__FILE__))
7
- require DOWNLOADER_PATH
6
+ BINARY_MANAGER_PATH = File.expand_path('../../lib/applitools/eyes_universal/universal_binary_manager', File.dirname(__FILE__))
7
+ require BINARY_MANAGER_PATH
8
8
 
9
- desc "Install universal server binaries"
9
+ desc "Prepare universal server binaries for run"
10
10
  task :default => [:prepare_server]
11
11
 
12
12
  # install
13
13
  file "prepare_server" do
14
- Applitools::EyesUniversal::UniversalServerDownloader.prepare_server(File.dirname(__FILE__))
15
- end
16
-
17
- # build
18
- file "get_compress_all_binaries" do
19
- Applitools::EyesUniversal::UniversalServerDownloader.get_compress_all_binaries(File.dirname(__FILE__))
14
+ Applitools::EyesUniversal::UniversalBinaryManager.prepare_server(File.dirname(__FILE__))
20
15
  end
Binary file
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.files = [
22
22
  'ext/eyes-universal/core.tar.gz',
23
23
  'ext/eyes-universal/Rakefile',
24
- 'lib/applitools/eyes_universal/universal_server_downloader.rb',
24
+ 'lib/applitools/eyes_universal/universal_binary_manager.rb',
25
25
  'lib/applitools/eyes_universal/executable_finder.rb',
26
26
  'lib/applitools/eyes_universal/universal_server_control.rb',
27
27
  'lib/eyes_universal.rb',
@@ -0,0 +1,65 @@
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 UniversalBinaryManager
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
+ def filename
40
+ return 'core-win.exe' if Gem.win_platform?
41
+ case RUBY_PLATFORM
42
+ when /darwin/i
43
+ 'core-macos'
44
+ when /arm/i
45
+ 'core-linux-arm64'
46
+ when /mswin|windows|mingw/i
47
+ 'core-win.exe'
48
+ when /musl/i
49
+ 'core-alpine'
50
+ when /linux|arch/i
51
+ 'core-linux'
52
+ else
53
+ raise "Unsupported platform #{RUBY_PLATFORM}"
54
+ end
55
+ end
56
+
57
+ def tar_gz_filename
58
+ 'core.tar.gz'
59
+ end
60
+
61
+
62
+ end
63
+ end
64
+ end
65
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Applitools
4
4
  module EyesUniversal
5
- VERSION = '4.7.0'.freeze
6
- UNIVERSAL_CORE_VERSION = '4.7.0'.freeze
5
+ VERSION = '4.9.1'.freeze
6
+ UNIVERSAL_CORE_VERSION = '4.9.1'.freeze
7
7
  end
8
8
  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: 4.7.0
4
+ version: 4.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-02 00:00:00.000000000 Z
11
+ date: 2024-02-29 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.0
20
17
  - - "~>"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '0.1'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.1.0
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.0
30
27
  - - "~>"
31
28
  - !ruby/object:Gem::Version
32
29
  version: '0.1'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.1.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: stringio
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -58,15 +58,15 @@ files:
58
58
  - ext/eyes-universal/core.tar.gz
59
59
  - eyes_universal.gemspec
60
60
  - lib/applitools/eyes_universal/executable_finder.rb
61
+ - lib/applitools/eyes_universal/universal_binary_manager.rb
61
62
  - lib/applitools/eyes_universal/universal_server_control.rb
62
- - lib/applitools/eyes_universal/universal_server_downloader.rb
63
63
  - lib/applitools/eyes_universal/version.rb
64
64
  - lib/eyes_universal.rb
65
65
  homepage: https://www.applitools.com
66
66
  licenses:
67
67
  - Applitools
68
68
  metadata: {}
69
- post_install_message:
69
+ post_install_message:
70
70
  rdoc_options: []
71
71
  require_paths:
72
72
  - lib
@@ -81,8 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  requirements: []
84
- rubygems_version: 3.0.3.1
85
- signing_key:
84
+ rubygems_version: 3.4.1
85
+ signing_key:
86
86
  specification_version: 4
87
87
  summary: Applitools Ruby Universal binaries for SDK
88
88
  test_files: []
@@ -1,109 +0,0 @@
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