luffa 1.0.5 → 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 +4 -4
- data/lib/luffa/ios/ideviceinstaller.rb +14 -16
- data/lib/luffa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68615d981766a9547734862737395a68ac6d7c49
|
4
|
+
data.tar.gz: b1f9eb0a801122f3a2f164b24b88018258519bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98fd49d02bd2e5f44f05aff150cb614f894cfcc82972c25c768b3d275ee7ac96c47a14027433f3c1867854144e6a6030be4dbc05e1049a4ad7f3a0f35d47c0bb
|
7
|
+
data.tar.gz: 392b369b42d408bbabee85cfa6adf5988131c8b69735f2249a7ac2e9e96e98569458ba1d06f20af13b4a02e58c99208f31b119f9380499d1da32c0541a0e0e59
|
@@ -12,23 +12,23 @@ module Luffa
|
|
12
12
|
@bundle_id = bundle_id
|
13
13
|
end
|
14
14
|
|
15
|
-
def ideviceinstaller_available?
|
15
|
+
def self.ideviceinstaller_available?
|
16
16
|
path = bin_path
|
17
17
|
path and File.exist? bin_path
|
18
18
|
end
|
19
19
|
|
20
|
-
def idevice_id_available?
|
20
|
+
def self.idevice_id_available?
|
21
21
|
path = idevice_id_bin_path
|
22
22
|
path and File.exist? path
|
23
23
|
end
|
24
24
|
|
25
25
|
def install(udid, options={})
|
26
|
-
|
26
|
+
if options.is_a? Hash
|
27
|
+
merged_options = DEFAULT_OPTIONS.merge(options)
|
28
|
+
else
|
27
29
|
Luffa.log_warn 'API CHANGE: install now takes an options hash as 2nd arg'
|
28
30
|
Luffa.log_warn "API CHANGE: ignoring '#{options}'; will use defaults"
|
29
31
|
merged_options = DEFAULT_OPTIONS
|
30
|
-
else
|
31
|
-
merged_options = DEFAULT_OPTIONS.merge(options)
|
32
32
|
end
|
33
33
|
|
34
34
|
uninstall(udid, merged_options)
|
@@ -36,7 +36,7 @@ module Luffa
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# Can only be called when RunLoop is available.
|
39
|
-
def physical_devices_for_testing(xcode_tools)
|
39
|
+
def self.physical_devices_for_testing(xcode_tools)
|
40
40
|
# Xcode 6 + iOS 8 - devices on the same network, whether development or
|
41
41
|
# not, appear when calling $ xcrun instruments -s devices. For the
|
42
42
|
# purposes of testing, we will only try to connect to devices that are
|
@@ -44,17 +44,15 @@ module Luffa
|
|
44
44
|
#
|
45
45
|
# Also idevice_id, which ideviceinstaller relies on, will sometimes report
|
46
46
|
# devices 2x which will cause ideviceinstaller to fail.
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
white_list.include?(device.udid) && white_list.count(device.udid) == 1
|
53
|
-
end
|
54
|
-
else
|
55
|
-
devices
|
47
|
+
devices = xcode_tools.instruments(:devices)
|
48
|
+
if self.idevice_id_available?
|
49
|
+
white_list = `#{idevice_id_bin_path} -l`.strip.split("\n")
|
50
|
+
devices.select do | device |
|
51
|
+
white_list.include?(device.udid) && white_list.count(device.udid) == 1
|
56
52
|
end
|
57
|
-
|
53
|
+
else
|
54
|
+
devices
|
55
|
+
end
|
58
56
|
end
|
59
57
|
|
60
58
|
private
|
data/lib/luffa/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: luffa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Maturana Larsen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-04-
|
14
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: awesome_print
|