From 68a7c1c36211bee27b264ab28814960b152c0f73 Mon Sep 17 00:00:00 2001 From: Arkadiusz Konopacki Date: Tue, 7 Jun 2016 09:31:55 +0200 Subject: [PATCH] Fix after review --- lib/run_loop/detect_aut/xcode.rb | 6 +++--- lib/run_loop/plist_buddy.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/run_loop/detect_aut/xcode.rb b/lib/run_loop/detect_aut/xcode.rb index 07c1652a..bf1dca4e 100644 --- a/lib/run_loop/detect_aut/xcode.rb +++ b/lib/run_loop/detect_aut/xcode.rb @@ -1,10 +1,10 @@ -require 'etc' module RunLoop # @!visibility private module DetectAUT # @!visibility private module Xcode + require "etc" # @!visibility private def xcode_project? @@ -166,8 +166,8 @@ def pbuddy # @!visibility private def self.detect_selected_device file_name = find_user_state_file - pbuddy ||= RunLoop::PlistBuddy.new - selected_device = pbuddy.plist_find_device(file_name) + @pbuddy ||= RunLoop::PlistBuddy.new + selected_device = @pbuddy.plist_find_device(file_name) if selected_device != '' && !selected_device.nil? udid = selected_device.split(':')[1] selected_device = RunLoop::Device.device_with_identifier(udid) diff --git a/lib/run_loop/plist_buddy.rb b/lib/run_loop/plist_buddy.rb index aaae3314..1e0924a4 100644 --- a/lib/run_loop/plist_buddy.rb +++ b/lib/run_loop/plist_buddy.rb @@ -26,7 +26,7 @@ def plist_read(key, file, opts={}) end end - # !!Experimental!! find device in xcuserstate file. + # @!visibility private # @param [String] file the plist to read # @return [String] the UDID of device def plist_find_device(file)