Sha256: 16143297a4d3b3b86aff78ec71177c889b33967ec62417324f876db7afc2671b

Contents?: true

Size: 1.57 KB

Versions: 9

Compression:

Stored size: 1.57 KB

Contents

require 'tempfile'
require 'json'
require "rubygems"


def msg(title, &block)
  puts "\n" + "-"*10 + title + "-"*10
  block.call
  puts "-"*10 + "-------" + "-"*10 + "\n"
end

def print_usage
  puts <<EOF
  Usage: calabash-android <command-name> [parameters] [options]
  <command-name> can be one of
    help
      prints more detailed help information.
    gen
      generate a features folder structure.
    setup 
      sets up the current folder to run calabash against your 
      application.
      Will ask you some questions about you application, development
      environment and key store to user for signing.
    build <apk>
      builds the test server that will be used when testing the app.
      You need to run this command every time you make changes to the app.
    run <apk>
      runs Cucumber in the current folder with the enviroment needed.
    submit
      submits an apk along with your features to www.lesspainful.com

  <options> can be
    -v, --verbose
      Turns on verbose logging
EOF
end

def print_help
  file = File.join(File.dirname(__FILE__), '..', 'doc', 'calabash-android-help.txt')
  #system("less #{file}")
  #TODO
  print_usage
end

def is_json?(str)
  str[0..0] == '{'
end

def run_setup_if_settings_does_not_exist
  unless File.exists?(".calabash_settings")
    puts "Could not find .calabash_settings."
    puts "Should I run calabash-android setup for you?"
    puts "Please answer yes (y) or no (n)"
    if ['yes', 'y'].include? STDIN.gets.chomp
      calabash_setup
    else
      puts "Please run: calabash-android setup"
      exit 1
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
calabash-android-0.2.0 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre10 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre9 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre8 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre7 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre6 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre5 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre4 bin/calabash-android-helpers.rb
calabash-android-0.2.0.pre3 bin/calabash-android-helpers.rb