eyes_universal 3.3.2 → 3.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d14fcc9f222523a7fc8c9ed51a9eaf3f7e60e3f3e7f7e35ce9c0b671083fdfe
4
- data.tar.gz: 86de887e5cb37029cdfa04a4e63a24edcb017ec87bf65fde2b35907389b7d44e
3
+ metadata.gz: 1b47ef25f5ea320c7cc2967e59a4dff578e74542c7d5914b706bcd1aeabb3374
4
+ data.tar.gz: 4e0c68dc7ca91948addf06b9d66773af6026c8e34c56a2a30d70c9aff0f8f504
5
5
  SHA512:
6
- metadata.gz: 80e175a980e70eb10205f9f8f1403b785010d74784827d33b61bb1c25c4aee89d737be00bf2a83d1ad67bc92ddf7695543bfad7510f9c923fbbd54fa91feaf33
7
- data.tar.gz: af3c33d90085ee80ff0117b54c04a5f3ff5fb398c77057fa838745cc6127f3dc9aaa484b3f19614a7d656119d23d469934164865443737bdb57ff73db3db4cfb
6
+ metadata.gz: f4f6b5bc362ebc5a928ddb5bc9166114563e03cbbadfbab893079b3c3b653ff90e533bee44655d7e9ba2ed4ab82be3b43a048ae3e0efcc6749e15951a7fb62f6
7
+ data.tar.gz: 7d13e7bacc597269890e3d944e1a8dbf9759cf0bca74f1523840c4be9bbd84c5c1a01a1d85416812e9f050b7529d499a359c5482d519ca80661dc3d89bdd9b6c
@@ -14,7 +14,7 @@ file "get_server" do
14
14
  Applitools::UniversalServerDownloader.download(File.dirname(__FILE__))
15
15
  end
16
16
 
17
- # build
17
+ # depricated
18
18
  file "get_server_compressed" do
19
19
  Applitools::UniversalServerDownloader.tar_gz_download(File.dirname(__FILE__))
20
20
  end
@@ -23,3 +23,8 @@ end
23
23
  file "prepare_server" do
24
24
  Applitools::UniversalServerDownloader.prepare_server(File.dirname(__FILE__))
25
25
  end
26
+
27
+ # build
28
+ file "get_compress_all_binaries" do
29
+ Applitools::UniversalServerDownloader.get_compress_all_binaries(File.dirname(__FILE__))
30
+ end
Binary file
@@ -11,12 +11,12 @@ module Applitools
11
11
  class << self
12
12
 
13
13
  EXPECTED_SHA = {
14
- 'core.tar.gz' => '52fc92c432c45449afa04f6633cf8f51a4ef15a7137baa359ae3d73b4003bf9d',
15
- 'core-alpine' => 'f093ab6d43d417c740dee8f55a43aae0072570016f06517feb6e9464056c4701',
16
- 'core-linux' => 'd6968a870a05c2d6d72ad7552e4151a5d6d2d45c2325db0308c46c5a847add3a',
17
- 'core-linux-arm64' => 'c4792a87970a0c912a71b6fb8b99ad0eaec49819580400ca7277706bd14cdf2f',
18
- 'core-macos' => 'ec441758fd0f8a277c6ca5de444cb17142cbe59fc3c2931a6916aa225123024e',
19
- 'core-win.exe' => '1701851ed403b5f10b8cb72c482c00c0fafe69b1ea42704b88e17878f41095ab'
14
+ # 'core.tar.gz' => '18c85f7aa8800b954847640dfb959cc48794ad05d95dde96c15db42c9154792f',
15
+ 'core-alpine' => '1312f4d7cdce8fc3e569cfe8cc6892a6b7e2dd7935119468ace077feb56b59e1',
16
+ 'core-linux' => '5b507e26957b1b1d4145f4f74588d269c48be7c03e4036aa8a3fa74c97a80323',
17
+ 'core-linux-arm64' => 'c0c08c9e1b9a1b23f44953ec4e19cbbd3a7235a5d2c0bdbda4d432e47343851e',
18
+ 'core-macos' => 'dcec55c6f7cf1cb3bd6b018a75c68a941f630f4c7cf785132522c7ed19621930',
19
+ 'core-win.exe' => 'b57675e704b39ca149bd192bb3f387404a65e9ebc5ee275fea7d33dc4d34edcb'
20
20
  }
21
21
 
22
22
  def download(to)
@@ -39,7 +39,7 @@ module Applitools
39
39
  File.expand_path(tar_gz_filename, to)
40
40
  end
41
41
 
42
- def tar_gz_download(to) # build
42
+ def tar_gz_download(to) # build - depricated
43
43
  puts "[eyes-universal] Downloading Core server from #{tar_gz_full_url}"
44
44
  where = tar_gz_filepath(to)
45
45
  unless File.exist?(where) && Digest::SHA256.file(where).to_s == tar_gz_sha
@@ -74,10 +74,11 @@ module Applitools
74
74
 
75
75
  def prepare_server(to) # install
76
76
  where = tar_gz_filepath(to)
77
- downloaded_sha = Digest::SHA256.file(where).to_s
78
- puts "[eyes-universal] prepare server : #{where} #{downloaded_sha}"
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}"
79
80
 
80
- if downloaded_sha == tar_gz_sha
81
+ # if downloaded_sha == tar_gz_sha
81
82
  Gem::Package::TarReader.new(Zlib::GzipReader.open(where)) do |tar|
82
83
  tar.each do |entry|
83
84
  binary_filename = File.basename(entry.full_name)
@@ -90,24 +91,63 @@ module Applitools
90
91
  # FileUtils.remove_file(unpacked_binary) if File.exist?(unpacked_binary)
91
92
  File.open(unpacked_binary, 'wb') {|f| f.print entry.read }
92
93
 
93
- binary_sha = Digest::SHA256.file(unpacked_binary).to_s
94
- if check_binary(binary_filename, binary_sha)
94
+ # binary_sha = Digest::SHA256.file(unpacked_binary).to_s
95
+ # if check_binary(binary_filename, binary_sha)
95
96
  FileUtils.chmod('+x', unpacked_binary)
96
97
  puts "[eyes-universal] Binary ready #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}) at #{unpacked_binary}"
97
- else
98
- puts "[eyes-universal] Binary check fail #{binary_filename} (#{Applitools::UNIVERSAL_CORE_VERSION}): #{binary_sha}"
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
99
134
  end
135
+
100
136
  end
101
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}"
102
142
  else
103
- puts "[eyes-universal] Server broken. (mismatch: #{downloaded_sha})"
143
+ raise "[eyes-universal] ERROR : Download incomplete (#{Applitools::UNIVERSAL_CORE_VERSION}). Server not ready"
104
144
  end
105
145
  end
106
146
 
107
147
  private
108
148
 
109
149
  def base_url
110
- "https://github.com/applitools/eyes.sdk.javascript1/releases/download/%40applitools/core%40#{Applitools::UNIVERSAL_CORE_VERSION}/"
150
+ "https://github.com/applitools/eyes.sdk.javascript1/releases/download/js%2Fcore%40#{Applitools::UNIVERSAL_CORE_VERSION}/"
111
151
  end
112
152
 
113
153
  def full_url
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '4.6.2'.freeze
5
- IMAGES_VERSION = '4.2.2'.freeze
6
- UNIVERSAL_VERSION = '3.3.2'.freeze
7
- UNIVERSAL_CORE_VERSION = '2.5.8'.freeze
4
+ VERSION = '4.6.3'.freeze
5
+ IMAGES_VERSION = '4.2.3'.freeze
6
+ UNIVERSAL_VERSION = '3.3.3'.freeze
7
+ UNIVERSAL_CORE_VERSION = '3.4.0'.freeze
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_universal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.2
4
+ version: 3.3.3
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-05-10 00:00:00.000000000 Z
11
+ date: 2023-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: open-uri
@@ -20,7 +20,7 @@ dependencies:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
22
  version: 0.1.0
23
- type: :runtime
23
+ type: :development
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
@@ -37,7 +37,7 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
- type: :runtime
40
+ type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements: