Sha256: dc9e88bcb43ff89e7c93692ae33801eb66eb0ff370b4808dbc7ce53dbec7d4c8

Contents?: true

Size: 1.69 KB

Versions: 25

Compression:

Stored size: 1.69 KB

Contents

begin
  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'
rescue Exception => e
  puts "Error loading Calabash irbrc: #{e}"
  exit(1)
end

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

25 entries across 25 versions & 1 rubygems

Version Path
calabash-android-0.9.30 irbrc
calabash-android-0.9.29 irbrc
calabash-android-0.9.28 irbrc
calabash-android-0.9.25 irbrc
calabash-android-0.9.24 irbrc
calabash-android-0.9.22 irbrc
calabash-android-0.9.21 irbrc
calabash-android-0.9.20 irbrc
calabash-android-0.9.19 irbrc
calabash-android-0.9.18 irbrc
calabash-android-0.9.17 irbrc
calabash-android-0.9.16 irbrc
calabash-android-0.9.14 irbrc
calabash-android-0.9.12 irbrc
calabash-android-0.9.11 irbrc
calabash-android-0.9.10 irbrc
calabash-android-0.9.9 irbrc
calabash-android-0.9.8 irbrc
calabash-android-0.9.7 irbrc
calabash-android-0.9.6 irbrc