lib/calabash-android/operations.rb in calabash-android-0.6.1.pre2 vs lib/calabash-android/operations.rb in calabash-android-0.7.0

- old
+ new

@@ -18,16 +18,18 @@ require 'calabash-android/environment' require 'calabash-android/dot_dir' require 'calabash-android/logging' require 'calabash-android/store/preferences' require 'calabash-android/usage_tracker' +require 'calabash-android/dependencies' require 'retriable' require 'cucumber' require 'date' require 'time' require 'shellwords' +Calabash::Android::Dependencies.setup module Calabash module Android module Operations include Calabash::Android::EnvironmentHelpers @@ -556,11 +558,11 @@ response['message'] end def adb_command - "#{Env.adb_path} -s #{serial}" + "\"#{Calabash::Android::Dependencies.adb_path}\" -s #{serial}" end def default_serial devices = connected_devices log "connected_devices: #{devices}" @@ -593,10 +595,10 @@ def server_port_configuration File.expand_path(ENV['CALABASH_SERVER_PORTS'] || "~/.calabash.yaml") end def connected_devices - lines = `#{Env.adb_path} devices`.split("\n") + lines = `"#{Calabash::Android::Dependencies.adb_path}" devices`.split("\n") start_index = lines.index{ |x| x =~ /List of devices attached/ } + 1 lines[start_index..-1].collect { |l| l.split("\t").first } end def wake_up