luffa 1.0.7 → 1.1.0
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 +4 -4
- data/lib/luffa/unix_command.rb +18 -2
- data/lib/luffa/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c5d68c05ecf69ea3ca0cf6dd4150ad74e797db7
|
4
|
+
data.tar.gz: 5376fe89a90277fed46b63c5954fb3e9d878413d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1c3df3d0e6a2a7ab03745e05a76dbb0435d0da4f9e7ec964698c219683571ce95445929436a52a1d01aa5527bf1e873ff5a069ef1c4d678c973a38dd558e15d
|
7
|
+
data.tar.gz: fd95cd4549c405b910ec4e7e3dbcecf10e10fe202b540f6163c5fe504ce4a54c930d1c56d7b1662cd111a1e391e0eb5f818ee03f618dd7967fbfd33c63b4eaea
|
@@ -36,7 +36,7 @@ module Luffa
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# Can only be called when RunLoop is available.
|
39
|
-
def self.physical_devices_for_testing(
|
39
|
+
def self.physical_devices_for_testing(instruments)
|
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,7 +44,7 @@ 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
|
-
devices =
|
47
|
+
devices = instruments.physical_devices
|
48
48
|
if IDeviceInstaller.idevice_id_available?
|
49
49
|
white_list = `#{self.idevice_id_bin_path} -l`.strip.split("\n")
|
50
50
|
devices.select do | device |
|
@@ -81,9 +81,9 @@ module Luffa
|
|
81
81
|
on_retry = Proc.new do |_, try, elapsed_time, next_interval|
|
82
82
|
# Retriable 2.0
|
83
83
|
if elapsed_time && next_interval
|
84
|
-
Luffa.log_info "
|
84
|
+
Luffa.log_info "ideviceinstaller: attempt #{try} failed in '#{elapsed_time}'; will retry in '#{next_interval}'"
|
85
85
|
else
|
86
|
-
Luffa.log_info "
|
86
|
+
Luffa.log_info "ideviceinstaller: attempt #{try} failed; will retry"
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
data/lib/luffa/unix_command.rb
CHANGED
@@ -5,7 +5,8 @@ module Luffa
|
|
5
5
|
:exit_on_nonzero_status => true,
|
6
6
|
:env_vars => {},
|
7
7
|
:log_cmd => true,
|
8
|
-
:obscure_fields => []
|
8
|
+
:obscure_fields => [],
|
9
|
+
:split_cmd => false}
|
9
10
|
merged_opts = default_opts.merge(opts)
|
10
11
|
|
11
12
|
obscure_fields = merged_opts[:obscure_fields]
|
@@ -29,8 +30,22 @@ module Luffa
|
|
29
30
|
end
|
30
31
|
|
31
32
|
env_vars = merged_opts[:env_vars]
|
32
|
-
|
33
|
+
|
34
|
+
if merged_opts[:split_cmd]
|
35
|
+
['|', '>', '&'].each do |character|
|
36
|
+
if cmd.include?(character)
|
37
|
+
raise "Cannot split command '#{cmd}' because it contains character '#{character}'"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
tokens = cmd.split(' ')
|
42
|
+
res = system(env_vars, tokens.shift, *tokens)
|
43
|
+
else
|
44
|
+
res = system(env_vars, cmd)
|
45
|
+
end
|
46
|
+
|
33
47
|
exit_code = $?.exitstatus
|
48
|
+
|
34
49
|
if res
|
35
50
|
Luffa.log_pass merged_opts[:pass_msg]
|
36
51
|
else
|
@@ -41,3 +56,4 @@ module Luffa
|
|
41
56
|
exit_code
|
42
57
|
end
|
43
58
|
end
|
59
|
+
|
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.1.0
|
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-
|
14
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: awesome_print
|
@@ -317,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
317
317
|
version: '0'
|
318
318
|
requirements: []
|
319
319
|
rubyforge_project:
|
320
|
-
rubygems_version: 2.4.
|
320
|
+
rubygems_version: 2.4.8
|
321
321
|
signing_key:
|
322
322
|
specification_version: 4
|
323
323
|
summary: A gem for testing the Calabash Toolchain
|