lib/run_loop/device.rb in run_loop-1.3.3 vs lib/run_loop/device.rb in run_loop-1.4.0
- old
+ new
@@ -62,11 +62,10 @@
end
return simulator if !simulator.nil?
physical_device = sim_control.xctools.instruments(:devices).detect do |device|
- puts device
device.name == udid_or_name ||
device.udid == udid_or_name
end
return physical_device if !physical_device.nil?
@@ -74,13 +73,13 @@
raise ArgumentError, "Could not find a device with a UDID or name matching '#{udid_or_name}'"
end
def to_s
if simulator?
- "Simulator: #{instruments_identifier} #{udid} #{instruction_set}"
+ "#<Simulator: #{instruments_identifier} #{udid} #{instruction_set}>"
else
- "Device: #{name} #{udid}"
+ "#<Device: #{name} #{udid}>"
end
end
# Returns and instruments-ready device identifier that is a suitable value
# for DEVICE_TARGET environment variable.
@@ -91,10 +90,10 @@
def instruments_identifier(xcode_tools=RunLoop::XCTools.new)
if physical_device?
self.udid
else
unless xcode_tools.xcode_version_gte_6?
- raise "Expected Xcode >= 6, but found version #{xcode_tools.version} - cannot create an identifier"
+ raise "Expected Xcode >= 6, but found version #{xcode_tools.xcode_version} - cannot create an identifier"
end
if self.version == RunLoop::Version.new('7.0.3')
version_part = self.version.to_s
else
version_part = "#{self.version.major}.#{self.version.minor}"