appium_connect 1.1.10 → 1.1.11
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 +4 -4
- data/lib/AppiumConnect.rb +10 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 297680a6f17130366110d2c57fd35547df73e880
|
4
|
+
data.tar.gz: aee33922831f6e66ed5bf83e96d613f8dc83c64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bbc54d68aa23da78b29e2fc8451f933fc8f65a9ce6e117af178e2213ddc36baa45629e23580d2a596aeea0c7ec05ff90c00c76d9b3f1e3e11ea0edc5f688b3c
|
7
|
+
data.tar.gz: dcaed1ef05f40340c1f9fdebf20f0dec4c418f82ed240d883d93eb967b63b4a219a93dffeb586a7e9475b25ccd79a625f20a4c561ff1a8b931675b19349edfc9
|
data/lib/AppiumConnect.rb
CHANGED
@@ -14,30 +14,24 @@ if input_array.include? '--restart'
|
|
14
14
|
restart_devices
|
15
15
|
else
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
raise if len.zero?
|
26
|
-
|
27
|
-
buffer = "\0" * len
|
28
|
-
GetShortPathName.call(path, buffer, len)
|
29
|
-
buffer.tr('/', '\\')
|
30
|
-
end
|
31
|
-
|
17
|
+
def get_short_win32_filename(long_name)
|
18
|
+
require 'win32api'
|
19
|
+
win_func = Win32API.new("kernel32","GetShortPathName","PPL"," L")
|
20
|
+
buf = 0.chr * 256
|
21
|
+
buf[0..long_name.length-1] = long_name
|
22
|
+
win_func.call(long_name, buf, buf.length)
|
23
|
+
return buf.split(0.chr).first
|
24
|
+
end
|
32
25
|
|
33
26
|
|
34
27
|
|
28
|
+
platform = get_platform()
|
35
29
|
if platform == :linux
|
36
30
|
nodeConfigDir = File.expand_path('~/AppiumConnect/')
|
37
31
|
elsif platform == :mac
|
38
32
|
nodeConfigDir = File.expand_path('~/AppiumConnect/')
|
39
33
|
elsif platform == :windows
|
40
|
-
nodeConfigDir =
|
34
|
+
nodeConfigDir = get_short_win32_filename(Dir.home() + '/AppiumConnect')
|
41
35
|
end
|
42
36
|
|
43
37
|
create_dir nodeConfigDir
|