Sha256: 243454239f39ddb2653f7e18f8ecad2a364a344e5020d860f40b1c05c397a378

Contents?: true

Size: 1.57 KB

Versions: 2

Compression:

Stored size: 1.57 KB

Contents

#!/usr/bin/env ruby

require 'fileutils'
require 'calabash-android/helpers'


require File.join(File.dirname(__FILE__), "calabash-android-helpers")
require File.join(File.dirname(__FILE__), "calabash-android-generate")
require File.join(File.dirname(__FILE__), "calabash-android-build")
require File.join(File.dirname(__FILE__), "calabash-android-run")
require File.join(File.dirname(__FILE__), "calabash-android-setup")
require File.join(File.dirname(__FILE__), "calabash-android-submit")

@features_dir = File.join(FileUtils.pwd, "features")
@support_dir = File.join(@features_dir, "support")
@source_dir = File.join(File.dirname(__FILE__), '..', 'features-skeleton')
@script_dir = File.join(File.dirname(__FILE__), '..', 'scripts')

def is_apk_file?(file_path)
  file_path.end_with? ".apk" and File.exist? file_path
end

def relative_to_full_path(file_path)
  File.expand_path(File.join(ENV["PWD"], file_path))
end

if (ARGV.length == 0)
  print_usage
  exit 0
end
cmd = ARGV.shift
if cmd == 'help'
  print_help
  exit 0
elsif cmd == 'build'
  puts "Please specify the app you want to test" if (ARGV.empty? or not is_apk_file?(ARGV.first))
  while not ARGV.empty? and is_apk_file?(ARGV.first)
    calabash_build(relative_to_full_path(ARGV.shift))
  end
  exit 0
elsif cmd == 'run'
  if ARGV.empty? or not is_apk_file?(ARGV.first)
    calabash_run(nil, ARGV)
  else
    calabash_run(relative_to_full_path(ARGV.shift))
  end
  exit 0
elsif cmd == 'gen'
  calabash_scaffold
  exit 0
elsif cmd == 'setup'
  calabash_setup
  exit 0
elsif cmd == 'submit'
  calabash_submit(ARGV)
  exit 0
else
  print_usage
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
calabash-android-0.2.0.pre5 bin/calabash-android
calabash-android-0.2.0.pre4 bin/calabash-android