From b89268e33038fd03dacc1464ccc5091c3d29e3dd Mon Sep 17 00:00:00 2001 From: Jon Wilson Date: Fri, 10 Jun 2016 11:55:02 +0100 Subject: [PATCH] Not having the IP address package installed is no longer a blocker --- device_api-ios.gemspec | 2 +- lib/device_api/ios/ipaddress.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/device_api-ios.gemspec b/device_api-ios.gemspec index d148e6d..8fe5082 100644 --- a/device_api-ios.gemspec +++ b/device_api-ios.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'device_api-ios' - s.version = '1.0.5' + s.version = '1.0.6' s.date = Time.now.strftime("%Y-%m-%d") s.summary = 'IOS Device Management API' s.description = 'iOS implementation of DeviceAPI' diff --git a/lib/device_api/ios/ipaddress.rb b/lib/device_api/ios/ipaddress.rb index 118b504..eb6812f 100644 --- a/lib/device_api/ios/ipaddress.rb +++ b/lib/device_api/ios/ipaddress.rb @@ -20,7 +20,7 @@ def self.installed?(serial) if DeviceAPI::IOS::IDeviceInstaller.package_installed?( serial: serial, package: ipaddress_bundle_id ) return true else - raise IPAddressError.new('IP Address package not installed: Please see https://github.com/bbc/ios-test-helper') + warn IPAddressError.new('IP Address package not installed: Please see https://github.com/bbc/ios-test-helper') end end @@ -28,7 +28,7 @@ def self.installed?(serial) # @param [String] serial serial of the target device # @return [String] IP Address if found def self.address(serial) - installed?(serial) + return nil unless installed?(serial) result = IDeviceDebug.run(serial: serial, bundle_id: ipaddress_bundle_id ) ip_address = nil