eyes_universal 4.5.2 → 4.8.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: 1144a539103675ae0fae17ca6435815008b95970200a35ddf1a46b46e28e2c74
4
- data.tar.gz: edbd263cbfddc277c16bf815b4da8df97fd944cc701d424eac9ebeb7b14408d5
3
+ metadata.gz: 3a52342f63ca11f9aec0628c2fd6d425106cbaca5655bce78f3b5fd071407c8a
4
+ data.tar.gz: 3057a28e0fbfd99f32b551f4f3ccdba60cf57e602d21dd40ffaa630cc1cefd22
5
5
  SHA512:
6
- metadata.gz: be6884ec167cf662be1e7077fb49bf0ef08f639d357dc55282edb04ff637fb5b65cd5d0ed8561f42bce6287cd16218b733e1cd8a5f1aa74d0edec71f23ed8892
7
- data.tar.gz: 6b0e7ed71c280522757087d8995ca77a5d5161a506b0aebc17b2a19e1b84388e00b8d4cdb88e65640258231f3f4f6a37c1e22bfd466241118b995994ac7e61af
6
+ metadata.gz: 07ef372933d2210a1a731ba733ceb89d6cc70163e01a9e8e2857f71bec9fe8aa6cba39989a2d10ab57539a98323e7ec294ea20bf59aa99b285c9eb25d23e29e8
7
+ data.tar.gz: 81e747554c1edb81882a064313944cd486a29fbe0be432a9bf8e93f4fd69ab15b2fdfbd73abd62446d1e5f612672c3dd9d18e025b884c0f2b74505b496cbadad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # Changelog
2
2
 
3
+ ## [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)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * @applitools/dom-snapshot bumped to 4.7.17
9
+ #### Bug Fixes
10
+
11
+ * 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))
12
+ * @applitools/spec-driver-webdriver bumped to 1.0.57
13
+ #### Bug Fixes
14
+
15
+ * 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))
16
+ * @applitools/spec-driver-puppeteer bumped to 1.4.0
17
+ #### Features
18
+
19
+ * 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))
20
+ * @applitools/nml-client bumped to 1.7.0
21
+ #### Features
22
+
23
+ * 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))
24
+
25
+
26
+ #### Bug Fixes
27
+
28
+ * 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))
29
+
30
+
31
+
32
+ * @applitools/screenshoter bumped to 3.8.23
33
+
34
+ * @applitools/ec-client bumped to 1.7.25
35
+
36
+ * @applitools/core bumped to 4.8.0
37
+ #### Features
38
+
39
+ * 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))
40
+
41
+
42
+ #### Bug Fixes
43
+
44
+ * 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))
45
+ * nml coded region integration with universal ([6fb0934](https://github.com/applitools/eyes.sdk.javascript1/commit/6fb09348238dfe4698856f88e762a9abf80c686f))
46
+ * 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))
47
+
48
+
49
+
50
+
51
+ ## [6.0.3] (2024-02-02)
52
+
53
+ * ### Bug Fixes
54
+ * Fix Ruby 3 compatability issue with i18n integration
55
+ * Fix locate id parsing
56
+
57
+ * ### Features
58
+ * Add configure block-style of eyes_images configuration
59
+
60
+ ### Dependencies
61
+
62
+ * ### Updated
63
+ * Update version of Universal SDK Core to 4.7.0
64
+
65
+ * ### Features
66
+ * added support of proxy server url env var
67
+
68
+ * ### Bug Fixes
69
+ * losing root context after layout breakpoints reload
70
+ * add environment variable for setting ufg server ufg
71
+ * remove local environment id
72
+
3
73
  ## [6.0.2] (2024-01-03)
4
74
 
5
75
  ### Updated
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.5.2'.freeze
6
- UNIVERSAL_CORE_VERSION = '4.5.2'.freeze
5
+ VERSION = '4.8.1'.freeze
6
+ UNIVERSAL_CORE_VERSION = '4.8.0'.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.5.2
4
+ version: 4.8.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-01-03 00:00:00.000000000 Z
11
+ date: 2024-02-20 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