luffa 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/luffa/ios/ideviceinstaller.rb +11 -11
- data/lib/luffa/version.rb +1 -1
- 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: 93d9621bd408e38894694a62ef51be69b8ea6a1e
|
4
|
+
data.tar.gz: e133693a756dc9f489b7b8178a8d3d27c97afa75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e713220ee99cbf68382d53e511d1183a6a0d0c3dc077e94208b137467260c67c756199ac1cd50e98c9f78ae1a0ab40d4d212a28396d57c1ae99e417dad6688
|
7
|
+
data.tar.gz: 5eb34d2d9c71f63f666ee4dcac9fc215a26c26578b5c299d07d810a5560674976fc6b6410222dac180615f1813d090477b8789c80c7f8a346def6969a35b4628
|
@@ -13,12 +13,12 @@ module Luffa
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.ideviceinstaller_available?
|
16
|
-
path = bin_path
|
17
|
-
path and File.exist? bin_path
|
16
|
+
path = self.bin_path
|
17
|
+
path and File.exist? self.bin_path
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.idevice_id_available?
|
21
|
-
path = idevice_id_bin_path
|
21
|
+
path = self.idevice_id_bin_path
|
22
22
|
path and File.exist? path
|
23
23
|
end
|
24
24
|
|
@@ -45,8 +45,8 @@ module Luffa
|
|
45
45
|
# Also idevice_id, which ideviceinstaller relies on, will sometimes report
|
46
46
|
# devices 2x which will cause ideviceinstaller to fail.
|
47
47
|
devices = xcode_tools.instruments(:devices)
|
48
|
-
if
|
49
|
-
white_list = `#{idevice_id_bin_path} -l`.strip.split("\n")
|
48
|
+
if IDeviceInstaller.idevice_id_available?
|
49
|
+
white_list = `#{self.idevice_id_bin_path} -l`.strip.split("\n")
|
50
50
|
devices.select do | device |
|
51
51
|
white_list.include?(device.udid) && white_list.count(device.udid) == 1
|
52
52
|
end
|
@@ -59,14 +59,14 @@ module Luffa
|
|
59
59
|
|
60
60
|
DEFAULT_OPTIONS = { :timeout => 10.0, :tries => 2 }
|
61
61
|
|
62
|
-
def bin_path
|
63
|
-
|
62
|
+
def self.bin_path
|
63
|
+
@@bin_path ||= `which ideviceinstaller`.chomp!
|
64
64
|
end
|
65
65
|
|
66
66
|
def run_command_with_args(args, options={})
|
67
67
|
merged_options = DEFAULT_OPTIONS.merge(options)
|
68
68
|
|
69
|
-
cmd = "#{bin_path} #{args.join(' ')}"
|
69
|
+
cmd = "#{IDeviceInstaller.bin_path} #{args.join(' ')}"
|
70
70
|
Luffa.log_unix_cmd(cmd) if Luffa::Environment.debug?
|
71
71
|
|
72
72
|
exit_status = nil
|
@@ -89,7 +89,7 @@ module Luffa
|
|
89
89
|
|
90
90
|
Retriable.retriable({tries: tries, on: on, on_retry: on_retry} ) do
|
91
91
|
Timeout.timeout(timeout, TimeoutError) do
|
92
|
-
Open3.popen3(bin_path, *args) do |_, stdout, stderr, process_status|
|
92
|
+
Open3.popen3(IDeviceInstaller.bin_path, *args) do |_, stdout, stderr, process_status|
|
93
93
|
err = stderr.read.strip
|
94
94
|
if err && err != ''
|
95
95
|
unless err[/iTunesMetadata.plist/,0] || err[/SC_Info/,0]
|
@@ -150,8 +150,8 @@ module Luffa
|
|
150
150
|
true
|
151
151
|
end
|
152
152
|
|
153
|
-
def idevice_id_bin_path
|
154
|
-
|
153
|
+
def self.idevice_id_bin_path
|
154
|
+
@@idevice_id_bin_path ||= `which idevice_id`.chomp!
|
155
155
|
end
|
156
156
|
end
|
157
157
|
end
|
data/lib/luffa/version.rb
CHANGED