run_loop 0.1.0.pre4 → 0.1.0.pre5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/run_loop/core.rb +11 -6
- 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: f00494e4a6e3d400e924b23f8afd323f8471da96
|
4
|
+
data.tar.gz: f02f19024130baed00da98a6a66427229ad569b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90763dade59e38c3ec5e283d0dba3e53ec42d659677556bdae71223c95316b2d650668b761530019e3f67a30b4e63573dacdf775dd84082953143e19bc82c88f
|
7
|
+
data.tar.gz: 95740a81fa9972f822e9620ba52834e35ed160be2089a57eb2761a7611d73933b55def5faf5d2ed38fba7de907d406dcbbccd73ac47d32c09b16a66989a1ed54
|
data/lib/run_loop/core.rb
CHANGED
@@ -288,7 +288,7 @@ module RunLoop
|
|
288
288
|
instruments_prefix = instruments_command_prefix(udid, results_dir)
|
289
289
|
|
290
290
|
pids_str = `ps x -o pid,command | grep -v grep | grep "#{instruments_prefix}" | awk '{printf "%s,", $1}'`
|
291
|
-
pids = pids_str.split(
|
291
|
+
pids = pids_str.split(',').map { |pid| pid.to_i }
|
292
292
|
if block_given?
|
293
293
|
pids.each do |pid|
|
294
294
|
block.call(pid)
|
@@ -303,7 +303,7 @@ module RunLoop
|
|
303
303
|
if udid
|
304
304
|
instruments_path = "#{instruments_path} -w #{udid}"
|
305
305
|
end
|
306
|
-
instruments_path << " -D \"#{results_dir_trace}\""
|
306
|
+
instruments_path << " -D \"#{results_dir_trace}\"" if results_dir_trace
|
307
307
|
instruments_path
|
308
308
|
end
|
309
309
|
|
@@ -407,17 +407,22 @@ module RunLoop
|
|
407
407
|
def self.stop(run_loop, out=Dir.pwd)
|
408
408
|
return if run_loop.nil?
|
409
409
|
results_dir = run_loop[:results_dir]
|
410
|
-
|
411
|
-
instruments_prefix = Core.instruments_command_prefix(udid, results_dir)
|
412
|
-
pid = run_loop[:pid] || IO.read(File.join(results_dir, "run_loop.pid"))
|
410
|
+
|
413
411
|
dest = out
|
414
412
|
|
413
|
+
|
415
414
|
Core.pids_for_run_loop(run_loop) do |pid|
|
416
415
|
Process.kill('TERM', pid.to_i)
|
417
416
|
end
|
418
417
|
|
418
|
+
|
419
419
|
FileUtils.mkdir_p(dest)
|
420
|
-
|
420
|
+
|
421
|
+
if results_dir
|
422
|
+
pngs = Dir.glob(File.join(results_dir, "Run 1", "*.png"))
|
423
|
+
else
|
424
|
+
pngs = []
|
425
|
+
end
|
421
426
|
FileUtils.cp(pngs, dest) if pngs and pngs.length > 0
|
422
427
|
end
|
423
428
|
|
data/lib/run_loop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: run_loop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karl Krukow
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|