eyes_universal 3.3.2 → 3.6.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa984e689bf897180f160c0d1e6e791513e2611b3d48fc9692d76242e20f29e5
|
4
|
+
data.tar.gz: 48d32b4aea4d9b8432a077e633c455318ca4949f658286329471da8678534834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a825a2101133af19b65a82ecf113236f6b76b303f378e0ff06726818f74bc83abbc0f1489faada2259dd11c785b58aa5e1bc3c20b30ae834b484e096acf2f000
|
7
|
+
data.tar.gz: e561b294ea45a6498fe08d0251bdb5b00082340497a1421b0834815712f472973732bf8c1980ebc85c16a05b03d48306f414d27f6f1157eb3a7fe3840c9f8b78
|
data/ext/eyes-universal/Rakefile
CHANGED
@@ -14,7 +14,7 @@ file "get_server" do
|
|
14
14
|
Applitools::UniversalServerDownloader.download(File.dirname(__FILE__))
|
15
15
|
end
|
16
16
|
|
17
|
-
#
|
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' => '
|
15
|
-
'core-alpine' => '
|
16
|
-
'core-linux' => '
|
17
|
-
'core-linux-arm64' => '
|
18
|
-
'core-macos' => '
|
19
|
-
'core-win.exe' => '
|
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
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
|
-
|
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
|
-
|
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
|
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
|
data/lib/applitools/version.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
|
3
3
|
module Applitools
|
4
|
-
VERSION = '
|
5
|
-
IMAGES_VERSION = '
|
6
|
-
UNIVERSAL_VERSION = '3.
|
7
|
-
UNIVERSAL_CORE_VERSION = '
|
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
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.
|
4
|
+
version: 3.6.0
|
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-
|
11
|
+
date: 2023-07-11 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: :
|
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: :
|
40
|
+
type: :development
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|