Sha256: 096f53cd5041067c8b54870cd13243f5e80b7a7ff287ee1a21d4054f2b02f462
Contents?: true
Size: 1.24 KB
Versions: 5
Compression:
Stored size: 1.24 KB
Contents
require "rubygems" require 'fileutils' #------------------------------- # Helpers #------------------------------- def print_usage puts <<EOF Usage: kraken-mobile <command-name> [parameters] [options] <command-name> can be one of run <apk> runs Cucumber in the current folder with the environment needed. version prints the gem version. devices prints the list of devices attached. setup creates kraken-settings file specifying in what devices the tests are going to be run. gen generate a features folder structure. resign <apk> resigns the app with the currently configured keystore. EOF end def print_devices runner = KrakenMobile::Constants::CALABASH_ANDROID device_manager = KrakenMobile::DevicesHelper::Manager.new({runner: runner}) puts "List of devices attached" device_manager.connected_devices.each_with_index do |device, index| puts "user#{index+1} - #{device.id} - #{device.model}" end end 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_path) end def msg(title, &block) puts "\n" + "-"*10 + title + "-"*10 block.call puts "-"*10 + "-------" + "-"*10 + "\n" end
Version data entries
5 entries across 5 versions & 1 rubygems