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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ac8f5feb8e43cd7a13c6cc186f36b7145364cdd
4
- data.tar.gz: 3611e687c20c4aa30dd0228a825f77b1dac8bba1
3
+ metadata.gz: f00494e4a6e3d400e924b23f8afd323f8471da96
4
+ data.tar.gz: f02f19024130baed00da98a6a66427229ad569b3
5
5
  SHA512:
6
- metadata.gz: 7a212ef8c9be279cf01c8a3652827d6f4c4b2bb6a5e1882c27b2db4b64184cc38230dc37c13c35c6503e6705d37295bb0eb3c5a0291919a88ce24ded82996c58
7
- data.tar.gz: ffda6ba34c3bbe5f72ffe9b260068cec2d7c74fb624f3c69d29ae16f02615d164992b003f3a7c0815217bf766cf3051aedc1468048a09e9c45cb3c19b4034057
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(",").map { |pid| pid.to_i }
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
- udid = run_loop[:udid]
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
- pngs = Dir.glob(File.join(results_dir, "Run 1", "*.png"))
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
 
@@ -1,3 +1,3 @@
1
1
  module RunLoop
2
- VERSION = '0.1.0.pre4'
2
+ VERSION = '0.1.0.pre5'
3
3
  end
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.pre4
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-19 00:00:00.000000000 Z
11
+ date: 2013-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor