browserstack-local 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/lib/browserstack/localbinary.rb +23 -1
- metadata +19 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a9f2fb5a2998d8a0ef30547374adc5ceae6c802c
|
4
|
+
data.tar.gz: a134189cab2eee5826661b43cf5afaf0031a1726
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 79b5cdeabd670e174a921a9dc97d729ca3c6d9bfb26cd9c93868edf810034f2be092f0990e7baeadf1a7aa06c6ac013a91ea58a2101dcb281f2b401825f65133
|
7
|
+
data.tar.gz: fc9c57f13da8f99f22fb8513306295b2921316af96e0236985562d48a28865cb7fdd5c293c4a35f04f969159319f1624d803f02054836ab6fc45ba5cbd8d647f
|
@@ -50,13 +50,35 @@ class LocalBinary
|
|
50
50
|
binary_path
|
51
51
|
end
|
52
52
|
|
53
|
+
def verify_binary(binary_path)
|
54
|
+
binary_response = IO.popen(binary_path + " --version").readline
|
55
|
+
binary_response =~ /BrowserStack Local version \d+\.\d+/
|
56
|
+
rescue Exception => e
|
57
|
+
false
|
58
|
+
end
|
59
|
+
|
53
60
|
def binary_path
|
54
61
|
dest_parent_dir = get_available_dirs
|
55
62
|
binary_path = File.join(dest_parent_dir, "BrowserStackLocal#{".exe" if @windows}")
|
63
|
+
|
56
64
|
if File.exists? binary_path
|
57
65
|
binary_path
|
58
66
|
else
|
59
|
-
download(dest_parent_dir)
|
67
|
+
binary_path = download(dest_parent_dir)
|
68
|
+
end
|
69
|
+
|
70
|
+
valid_binary = verify_binary(binary_path)
|
71
|
+
|
72
|
+
if valid_binary
|
73
|
+
binary_path
|
74
|
+
else
|
75
|
+
binary_path = download(dest_parent_dir)
|
76
|
+
valid_binary = verify_binary(binary_path)
|
77
|
+
if valid_binary
|
78
|
+
binary_path
|
79
|
+
else
|
80
|
+
raise BrowserStack::LocalException.new('BrowserStack Local binary is corrupt')
|
81
|
+
end
|
60
82
|
end
|
61
83
|
end
|
62
84
|
|
metadata
CHANGED
@@ -1,54 +1,46 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: browserstack-local
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- BrowserStack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2016-09-19 00:00:00 Z
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
|
-
|
15
13
|
description: Ruby bindings for BrowserStack Local
|
16
14
|
email: support@browserstack.com
|
17
15
|
executables: []
|
18
|
-
|
19
16
|
extensions: []
|
20
|
-
|
21
17
|
extra_rdoc_files: []
|
22
|
-
|
23
|
-
files:
|
18
|
+
files:
|
24
19
|
- lib/browserstack/local.rb
|
25
20
|
- lib/browserstack/localbinary.rb
|
26
21
|
- lib/browserstack/localexception.rb
|
27
22
|
homepage: http://rubygems.org/gems/browserstack-local
|
28
|
-
licenses:
|
23
|
+
licenses:
|
29
24
|
- MIT
|
30
25
|
metadata: {}
|
31
|
-
|
32
26
|
post_install_message:
|
33
27
|
rdoc_options: []
|
34
|
-
|
35
|
-
require_paths:
|
28
|
+
require_paths:
|
36
29
|
- lib
|
37
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
-
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
30
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
46
40
|
requirements: []
|
47
|
-
|
48
41
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
42
|
+
rubygems_version: 2.4.8
|
50
43
|
signing_key:
|
51
44
|
specification_version: 4
|
52
45
|
summary: BrowserStack Local
|
53
46
|
test_files: []
|
54
|
-
|