run_loop 2.6.2 → 2.6.3
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/run_loop/device_agent/app/DeviceAgent-Runner.app.zip +0 -0
- data/lib/run_loop/device_agent/client.rb +39 -7
- data/lib/run_loop/device_agent/ios_device_manager.rb +1 -1
- data/lib/run_loop/device_agent/ipa/DeviceAgent-Runner.app.zip +0 -0
- data/lib/run_loop/simctl.rb +4 -2
- data/lib/run_loop/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: ba7fb2a997b1945eab1c23eed06b9325be079588
|
4
|
+
data.tar.gz: ab1d0925001a3f3db097f913d1d77848394e1c22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac48671513f197677f38a24dfceb115d5a2bb7eca0cc6fc53aed8de41c2430d154b2be619f44f53f9b40c537f5da8280ae497fd097186e506d3f1b8f93f5a728
|
7
|
+
data.tar.gz: d717c970286ad652ba9f2ab25671b8a77116783eaceb0cdb8a24444582df129abd16ba7de930529d1a2f93d8a3dcb51de12f5f25e7a89009d33b6e22d14efd9b
|
Binary file
|
@@ -286,6 +286,10 @@ INSTANCE METHODS
|
|
286
286
|
to_s
|
287
287
|
end
|
288
288
|
|
289
|
+
def launcher_options!(new_options)
|
290
|
+
@launcher_options = new_options.dup
|
291
|
+
end
|
292
|
+
|
289
293
|
# @!visibility private
|
290
294
|
def launch
|
291
295
|
start = Time.now
|
@@ -1237,11 +1241,24 @@ PRIVATE
|
|
1237
1241
|
end
|
1238
1242
|
|
1239
1243
|
# @!visibility private
|
1240
|
-
def
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
response
|
1244
|
+
def process_pid(bundle_identifier)
|
1245
|
+
request = request("pid", { bundleID: bundle_identifier })
|
1246
|
+
client = http_client(http_options)
|
1247
|
+
response = client.post(request)
|
1248
|
+
expect_300_response(response)["pid"]
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# @!visibility private
|
1252
|
+
def app_running?(bundle_identifier)
|
1253
|
+
process_pid(bundle_identifier) != "0"
|
1254
|
+
end
|
1255
|
+
|
1256
|
+
# @!visibility private
|
1257
|
+
def terminate_app(bundle_identifier, strategy=nil)
|
1258
|
+
request = request("terminate", { bundleID: bundle_identifier,
|
1259
|
+
strategy: strategy})
|
1260
|
+
client = http_client(http_options)
|
1261
|
+
response = client.post(request)
|
1245
1262
|
expect_300_response(response)
|
1246
1263
|
end
|
1247
1264
|
|
@@ -1258,12 +1275,27 @@ PRIVATE
|
|
1258
1275
|
def session_delete
|
1259
1276
|
# https://xamarin.atlassian.net/browse/TCFW-255
|
1260
1277
|
# httpclient is unable to send a valid DELETE
|
1261
|
-
args = ["curl", "
|
1278
|
+
args = ["curl", "--insecure", "--silent", "--request", "DELETE",
|
1279
|
+
%Q[#{url}#{versioned_route("session")}]]
|
1262
1280
|
|
1263
1281
|
begin
|
1264
|
-
run_shell_command(args, {:log_cmd => true, :timeout => 10})
|
1282
|
+
hash = run_shell_command(args, {:log_cmd => true, :timeout => 10})
|
1283
|
+
|
1284
|
+
begin
|
1285
|
+
JSON.parse(hash[:out])
|
1286
|
+
rescue TypeError, JSON::ParserError => _
|
1287
|
+
raise RunLoop::DeviceAgent::Client::HTTPError, %Q[
|
1288
|
+
Could not parse response from server:
|
1289
|
+
|
1290
|
+
body => "#{hash[:out]}"
|
1291
|
+
|
1292
|
+
If the body empty, the DeviceAgent has probably crashed.
|
1293
|
+
|
1294
|
+
]
|
1295
|
+
end
|
1265
1296
|
rescue Shell::TimeoutError => _
|
1266
1297
|
RunLoop.log_debug("Timed out calling DELETE session/ after 10 seconds")
|
1298
|
+
{}
|
1267
1299
|
end
|
1268
1300
|
end
|
1269
1301
|
|
@@ -139,7 +139,7 @@ Expected :device_agent_install_timeout key in options:
|
|
139
139
|
end
|
140
140
|
|
141
141
|
if provisioning_profile
|
142
|
-
args = args + ["--
|
142
|
+
args = args + ["--profile-path", provisioning_profile]
|
143
143
|
end
|
144
144
|
|
145
145
|
start = Time.now
|
Binary file
|
data/lib/run_loop/simctl.rb
CHANGED
@@ -58,8 +58,10 @@ module RunLoop
|
|
58
58
|
options = {timeout: 5 }
|
59
59
|
begin
|
60
60
|
hash = Shell.run_shell_command(args, options)
|
61
|
-
hash[:exit_status]
|
62
|
-
|
61
|
+
return false if hash[:exit_status] != 0
|
62
|
+
return false if hash[:out][/Failed to locate a valid instance of CoreSimulatorService/]
|
63
|
+
return false if hash[:out][/CoreSimulatorService connection became invalid/]
|
64
|
+
true
|
63
65
|
rescue RunLoop::Shell::TimeoutError, RunLoop::Shell::Error => _
|
64
66
|
false
|
65
67
|
end
|
data/lib/run_loop/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: run_loop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|