Sha256: 8e3dd2b71013a8248e374e9e81061d9ece59e21e75b11a19179b9989a3372f96

Contents?: true

Size: 1.37 KB

Versions: 13

Compression:

Stored size: 1.37 KB

Contents

require 'irb/completion'
require 'irb/ext/save-history'

IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = '.irb-history'

ARGV.concat [ '--readline',
              '--prompt-mode',
              'simple']

begin
  require 'pry'
  Pry.config.history.file = '.pry-history'
  require 'pry-nav'
rescue LoadError => _

end

begin
  require 'awesome_print'
  AwesomePrint.irb!
rescue LoadError => e
  msg = ["Caught a LoadError: could not load 'awesome_print'",
         "#{e}",
         '',
         'Use bundler (recommended) or uninstall awesome_print.',
         '',
         '# Use bundler (recommended)',
         '$ bundle update',
         '$ bundle exec calabash console [path to apk]',
         '',
         '# Uninstall',
         '$ gem update --system',
         '$ gem uninstall -Vax --force --no-abort-on-dependent awesome_print']
  puts msg
  exit(1)
end

begin

  require 'calabash/ios'

  extend Calabash::IOS
  extend Calabash::ConsoleHelpers

  Calabash::IOS.setup_defaults!

  embed_lambda = lambda do |*_|
    Calabash::Logger.info 'Embed is not available in the console.'
    true
  end

  Calabash.new_embed_method!(embed_lambda)

  Calabash::Screenshot.screenshot_directory_prefix = 'console_'

  puts_console_details
  message_of_the_day
rescue Exception => e
  puts 'Unable to start console:'
  puts "#{e.class}: #{e.message}"
  puts "#{e.backtrace.join("\n")}"
  exit(1)
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
calabash-2.0.0.pre10 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre9 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.prelegacy4 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.prelegacy3 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.prelegacy2 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.prelegacy lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre6 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre5 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre4 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre3 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre2 lib/calabash/ios/lib/.irbrc
calabash-2.0.0.pre1 lib/calabash/ios/lib/.irbrc
calabash-1.9.9.pre3 lib/calabash/ios/lib/.irbrc