eyes_universal 1.0.6
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 +7 -0
- data/ext/eyes-universal/Rakefile +12 -0
- data/lib/applitools/universal_sdk/universal_server_downloader.rb +65 -0
- metadata +61 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 146e80c8c3ca9cc31827d827b108314e4bc8c123
|
4
|
+
data.tar.gz: 017d81e0990de51280563d2eebf78da8d3bff6c5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b616f32bd82a2de401e9e6d90440b308992c37cac951a6e5b3570d910fae5104be0fe0168899ef27065033c7cac43f6b149b361308b418f9367627cb0ca3f066
|
7
|
+
data.tar.gz: 5680c689cd140e7f5c4db90e8fd2c589a3b059c9952049786eb41358d086d6ac3ad958cd60267a6daa251d9a8f6c7c68d3d823ce7a611ac13a3a5398f44e9b6f
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake/clean'
|
3
|
+
|
4
|
+
DOWNLOADER_PATH = File.expand_path('../../lib/applitools/universal_sdk/universal_server_downloader', File.dirname(__FILE__))
|
5
|
+
require DOWNLOADER_PATH
|
6
|
+
|
7
|
+
desc "Download universal server binaries"
|
8
|
+
task :default => [:get_server]
|
9
|
+
|
10
|
+
file "get_server" do
|
11
|
+
Applitools::UniversalServerDownloader.download(File.dirname(__FILE__))
|
12
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'open-uri'
|
4
|
+
require 'digest'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
module Applitools
|
8
|
+
class UniversalServerDownloader
|
9
|
+
class << self
|
10
|
+
|
11
|
+
def download(to)
|
12
|
+
puts "[eyes-universal] Downloading Eyes universal server from #{full_url}"
|
13
|
+
where = filepath(to)
|
14
|
+
open(full_url) {|cloud| File.write(where, cloud.read) }
|
15
|
+
if Digest::SHA256.file(where).to_s == expected_binary_sha
|
16
|
+
FileUtils.chmod('+x', where)
|
17
|
+
puts "[eyes-universal] Download complete. Server placed in #{where}"
|
18
|
+
else
|
19
|
+
puts "[eyes-universal] Download broken. Please try reinstall"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def filepath(to)
|
24
|
+
File.expand_path(filename, to)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def base_url
|
30
|
+
'https://github.com/applitools/eyes.sdk.javascript1/releases/download/%40applitools/eyes-universal%401.0.6/'
|
31
|
+
end
|
32
|
+
|
33
|
+
def full_url
|
34
|
+
URI.join(base_url, filename)
|
35
|
+
end
|
36
|
+
|
37
|
+
def expected_binary_sha
|
38
|
+
case RUBY_PLATFORM
|
39
|
+
when /mswin|windows/i
|
40
|
+
'b5e8160b94389cd496cca79b55bf5d17e99b307e9413deccf29784d681daf648'
|
41
|
+
when /linux|arch/i
|
42
|
+
'da34c88504571008ae3d0aee8ef97b793b4e20b0483c1c0d5be1142cc19c35ac'
|
43
|
+
when /darwin/i
|
44
|
+
'0aa411f97aa36ab4fedd7155ff99d40c372d481152c8faa15a5fbf8f3eb8e503'
|
45
|
+
else
|
46
|
+
raise 'Unsupported platform'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def filename
|
51
|
+
case RUBY_PLATFORM
|
52
|
+
when /mswin|windows/i
|
53
|
+
'eyes-universal-win.exe'
|
54
|
+
when /linux|arch/i
|
55
|
+
'eyes-universal-linux'
|
56
|
+
when /darwin/i
|
57
|
+
'eyes-universal-macos'
|
58
|
+
else
|
59
|
+
raise "Unsupported platform #{RUBY_PLATFORM}"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eyes_universal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Applitools Team
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: open-uri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.0
|
27
|
+
description: eyes-universal binaries for writing Applitools tests
|
28
|
+
email:
|
29
|
+
- team@applitools.com
|
30
|
+
executables: []
|
31
|
+
extensions:
|
32
|
+
- ext/eyes-universal/Rakefile
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ext/eyes-universal/Rakefile
|
36
|
+
- lib/applitools/universal_sdk/universal_server_downloader.rb
|
37
|
+
homepage: https://www.applitools.com
|
38
|
+
licenses:
|
39
|
+
- Applitools
|
40
|
+
metadata: {}
|
41
|
+
post_install_message:
|
42
|
+
rdoc_options: []
|
43
|
+
require_paths:
|
44
|
+
- lib
|
45
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
requirements: []
|
56
|
+
rubyforge_project:
|
57
|
+
rubygems_version: 2.6.14.3
|
58
|
+
signing_key:
|
59
|
+
specification_version: 4
|
60
|
+
summary: Applitools Ruby Universal binaries for SDK
|
61
|
+
test_files: []
|