appium_connect 1.1.6 → 1.1.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AppiumConnect.rb +15 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec1e72c3ca5220ad4e637c7baa9efacbe05839f1
4
- data.tar.gz: 9a23400bb46d7255ca00eb376a7d3d3836223b93
3
+ metadata.gz: eb4e25d566d83a3902148704081a84ece42e7857
4
+ data.tar.gz: 260b2b2af8c2c44ebb1cbe717aa6c9550e4f9f1c
5
5
  SHA512:
6
- metadata.gz: 07da145d777ffc0bcd28d3b60230a6d1bdd7b1792d874b77d943149af2ebc56cfd5e13f237d8cc65418c43fb5b8ffb9d7bfa8e2dc3b736a6f26559279faf0cf8
7
- data.tar.gz: f60616501d54a723f22e1807ab88cf23b375a784104969dcc627471b45d2a5163ee9ba42168900fa4e7aeeb926c59a5d4cb2745d73e75080b033171493d30f4c
6
+ metadata.gz: e76883b45b87bb8be0b8d08ca73f9fa5e58d231ffd90173e92fb486475366d5479a98315c6a97eda5ef7525972fec4c86cbab1d0a98c3a7b80a3233ef9d7ae22
7
+ data.tar.gz: 9454d4fed9147a150fedafdd8d3ec2dd0c88b0cf94d1d3cbe91a7ba63eec32084806d0cce1bb6aeab088bfcf7a88069c8890f846004a4255b7620885adb32bda
data/lib/AppiumConnect.rb CHANGED
@@ -22,7 +22,7 @@ else
22
22
  elsif platform == :mac
23
23
  nodeConfigDir = File.expand_path('~/AppiumConnect/')
24
24
  elsif platform == :windows
25
- nodeConfigDir = Dir.home() + '/AppiumConnect'
25
+ nodeConfigDir = get_windows_path(Dir.home() + '/AppiumConnect')
26
26
  end
27
27
 
28
28
  create_dir nodeConfigDir
@@ -76,4 +76,18 @@ else
76
76
 
77
77
 
78
78
  launch_hub_and_nodes config['nodeIp'], config['hubIp'], nodeConfigDir
79
+ end
80
+
81
+ if platform == :windows
82
+ GetShortPathName = Win32API.new('kernel32', 'GetShortPathName', 'ppi', 'i')
83
+ end
84
+
85
+ def get_windows_path(path)
86
+ len = GetShortPathName.call(path, nil, 0)
87
+
88
+ raise if len.zero?
89
+
90
+ buffer = "\0" * len
91
+ GetShortPathName.call(path, buffer, len)
92
+ buffer.tr('/', '\\')
79
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Watson