bin/briar_console.rb in briar-0.1.3 vs bin/briar_console.rb in briar-0.1.4.b1

- old
+ new

@@ -1,8 +1,9 @@ require_relative './briar_dot_xamarin' require_relative './briar_env' + require 'ansi/logger' @log = ANSI::Logger.new(STDOUT) # returns an iOS version string based on a canonical key # @@ -32,20 +33,23 @@ # make a screenshot directory if one does not exist FileUtils.mkdir(path) unless File.exists?(path) path end +#noinspection RubyStringKeysInHashInspection def logging_level {'DEBUG' => ENV['DEBUG'] || '1', 'CALABASH_FULL_CONSOLE_OUTPUT' => ENV['CALABASH_FULL_CONSOLE_OUTPUT'] || '1'} end +#noinspection RubyStringKeysInHashInspection def simulator_variables(sdk_version) {'DEVICE_TARGET' => 'simulator', 'SKD_VERSION' => sdk_version} end +#noinspection RubyStringKeysInHashInspection def device_variables(device) {'DEVICE_TARGET' => read_device_info(device, :udid), 'DEVICE_ENDPOINT' => read_device_info(device, :ip), 'BUNDLE_ID' => expect_bundle_id() } @@ -88,15 +92,19 @@ ### unexpected ### # do not be tempted to use IRB.start # this can cause some terrible problems at > exit ################## - -default_opts = default_console_opts() + default_opts = default_console_opts() opts = default_opts.merge(opts) cmd = ios_console_cmd(device, opts) puts Rainbow(cmd).green - exec cmd + + if RUBY_VERSION.start_with?('1.8') + raise 'not supported in ruby 1.8' + else + exec cmd + end end def briar_console(args) arg_len = args.length \ No newline at end of file