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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 788f5398ad79dc3be466b7bfacebfebc7ed41845
4
- data.tar.gz: f01d3aa2b4ab91cf745021cebf9bc2349262b2e7
3
+ metadata.gz: 68615d981766a9547734862737395a68ac6d7c49
4
+ data.tar.gz: b1f9eb0a801122f3a2f164b24b88018258519bc3
5
5
  SHA512:
6
- metadata.gz: f11db976ea3fab737dd67457db0290a1673c85fc561e9d46bbae27331d542e3e3ee7f9744e53fde34c64f1a136c39f2a223fa963c16f79c9dc3a7d6f1175fb9e
7
- data.tar.gz: b45ed6f7363b9a1d95e789e0508293160da1733bbc846d0f5972d4dbeaca3672beac1f840d1f8584d2c95eca0037b7604f912f24cc8e82a7ef9fdc3e035d921a
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
- unless options.is_a? Hash
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
- @physical_devices_for_testing ||= lambda {
48
- devices = xcode_tools.instruments(:devices)
49
- if idevice_id_available?
50
- white_list = `#{idevice_id_bin_path} -l`.strip.split("\n")
51
- devices.select do | device |
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
- }.call
53
+ else
54
+ devices
55
+ end
58
56
  end
59
57
 
60
58
  private
@@ -1,5 +1,5 @@
1
1
  module Luffa
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
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.5
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-09 00:00:00.000000000 Z
14
+ date: 2015-04-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: awesome_print