Sha256: 9b446ce1d85da735333283de30ba0b5ee85a36d4eb5891e16305ba36aa23ad8a

Contents?: true

Size: 1.56 KB

Versions: 29

Compression:

Stored size: 1.56 KB

Contents

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

begin
  require 'awesome_print'
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-android console <path to apk>',
         '',
         '# Uninstall',
         '$ gem update --system',
         '$ gem uninstall -Vax --force --no-abort-on-dependent awesome_print']
  puts msg
  exit(1)
end

AwesomePrint.irb!

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

# 50 entries in the list
IRB.conf[:SAVE_HISTORY] = 50

# Store results in home directory with specified file name
IRB.conf[:HISTORY_FILE] = ".irb-history"

require 'calabash-android/defaults'
require 'calabash-android/operations'

module Calabash
  module Android
    module Operations
      def embed(*args)
        puts "Embed is a Cucumber method and is not available in this console."
      end
    end
  end
end

module Cucumber
  class << self
    wants_to_quit = false
  end
end

extend Calabash::Android::Operations


def preferences
  Calabash::Android::Preferences.new
end

def disable_usage_tracking
  preferences.usage_tracking = "none"
  puts "Calabash will not collect usage information."
  "none"
end

def enable_usage_tracking(level="system_info")
  preferences.usage_tracking = level
  puts "Calabash will collect statistics using the '#{level}' rule."
  level
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
calabash-android-0.7.3.pre1 irbrc
calabash-android-0.7.2 irbrc
calabash-android-0.7.1 irbrc
calabash-android-0.7.0 irbrc
calabash-android-0.6.1.pre2 irbrc
calabash-android-0.6.1.pre1 irbrc
calabash-android-0.6.0.prelatestcrosswalk irbrc
calabash-android-0.6.0 irbrc
calabash-android-0.6.0.pre4 irbrc