class RunLoop::DeviceAgent::LauncherStrategy
@!visibility private
A base class for something that can launch the DeviceAgent-Runner on a device.
Attributes
device[R]
@!visibility private
Public Class Methods
dot_dir()
click to toggle source
@!visibility private
# File lib/run_loop/device_agent/launcher_strategy.rb, line 48 def self.dot_dir path = File.join(RunLoop::DotDir.directory, "DeviceAgent") legacy_path = File.join(RunLoop::DotDir.directory, "xcuitest") if File.directory?(legacy_path) FileUtils.cp_r(legacy_path, path) FileUtils.rm_rf(legacy_path) else if !File.exist?(path) FileUtils.mkdir_p(path) end end path end
new(device)
click to toggle source
@!visibility private @param [RunLoop::Device] device where to launch the DeviceAgent-Runner
# File lib/run_loop/device_agent/launcher_strategy.rb, line 18 def initialize(device) @device = device if device.version < RunLoop::Version.new("9.0") raise ArgumentError, %Q[ Invalid device: #{device} DeviceAgent is only available for iOS >= 9.0 ] end end
Public Instance Methods
launch(options)
click to toggle source
@!visibility private
Does whatever it takes to launch the DeviceAgent-Runner on the device.
# File lib/run_loop/device_agent/launcher_strategy.rb, line 43 def launch(options) abstract_method! end
name()
click to toggle source
@!visibility private The name of this launcher. Must be a symbol (keyword). This value will be used for the key :cbx_launcher in the RunLoop::Cache
so Calabash iOS can attach and reattach to a DeviceAgent
instance.
# File lib/run_loop/device_agent/launcher_strategy.rb, line 36 def name abstract_method! end