Class: RunLoop::CLI::Instruments
- Inherits:
-
Thor
- Object
- Thor
- RunLoop::CLI::Instruments
- Defined in:
- lib/run_loop/cli/instruments.rb
Instance Attribute Summary collapse
-
#signal ⇒ Object
Returns the value of attribute signal.
Instance Method Summary collapse
Instance Attribute Details
#signal ⇒ Object
Returns the value of attribute signal.
9 10 11 |
# File 'lib/run_loop/cli/instruments.rb', line 9 def signal @signal end |
Instance Method Details
#launch ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/run_loop/cli/instruments.rb', line 96 def launch debug = [:debug] original_value = ENV['DEBUG'] ENV['DEBUG'] = '1' if debug begin = { :args => parse_app_launch_args(), :udid => (), :app => detect_bundle_id_or_bundle_path() } run_loop = RunLoop.run() puts JSON.generate(run_loop) ensure ENV['DEBUG'] = original_value if debug end end |
#quit ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/run_loop/cli/instruments.rb', line 28 def quit signal = [:signal] ENV['DEBUG'] = '1' if [:debug] instruments = RunLoop::Instruments.new instruments.instruments_pids.each do |pid| terminator = RunLoop::ProcessTerminator.new(pid, signal, 'instruments') unless terminator.kill_process terminator = RunLoop::ProcessTerminator.new(pid, 'KILL', 'instruments') terminator.kill_process end end end |