lib/appium_lib/driver.rb in appium_lib-8.0.0 vs lib/appium_lib/driver.rb in appium_lib-8.0.1

- old
+ new

@@ -81,17 +81,14 @@ toml_exists = File.exist? toml Appium::Logger.info "Exists? #{toml_exists}" if verbose fail "toml doesn't exist #{toml}" unless toml_exists - require 'toml' + require 'tomlrb' Appium::Logger.info "Loading #{toml}" if verbose - data = File.read toml - data = TOML::Parser.new(data).parsed - # TOML creates string keys. must symbolize - data = Appium.symbolize_keys data + data = Tomlrb.load_file(toml, symbolize_keys: true) Appium::Logger.ap_info data unless data.empty? if verbose if data && data[:caps] && data[:caps][:app] && !data[:caps][:app].empty? data[:caps][:app] = Appium::Driver.absolute_app_path data end @@ -319,11 +316,9 @@ end # https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile @appium_device = @caps[:platformName] @appium_device = @appium_device.is_a?(Symbol) ? @appium_device : @appium_device.downcase.strip.intern if @appium_device - fail "platformName must be set. Not found in options: #{opts}" unless @appium_device - fail 'platformName must be Android or iOS' unless [:android, :ios].include?(@appium_device) # load common methods extend Appium::Common extend Appium::Device if device_is_android?